Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form now scrolls up if warning is shown #699

Merged
merged 3 commits into from
Aug 12, 2023

Conversation

balsa-asanovic
Copy link
Contributor

Problem

Forms generally show errors on top, so when the submit is clicked again if the error is shown again, it seems as if nothing happens.

fixes #468

Solution

I've attached a useRef hook to the alert and whenever the component is rendered with the error it will scroll up to it.

Testing

No unit test for this component.
Tested manually.

Screenshots

image
image

Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @balsa-asanovic! The change looks good. Please, add an entry to the changes file that includes a reference to the bug (gh##468).

@balsa-asanovic
Copy link
Contributor Author

@imobachgs added entry to the changes file.

Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM. I will merge as soon as the tests run.

@imobachgs imobachgs merged commit ff4b61c into agama-project:master Aug 12, 2023
5 checks passed
@balsa-asanovic balsa-asanovic deleted the improve-form-errors branch September 18, 2023 19:44
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve form errors
2 participants