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

fix the ui modal problem in the change email #2467

Merged
merged 4 commits into from
Nov 26, 2020

Conversation

azibom
Copy link
Contributor

@azibom azibom commented Nov 25, 2020

Fixes #1892

Changes proposed in this pull request:

I just add the "this.alert = null" when i get the success response in the "ChangeEmailModal" component, and now if you write your password correctly, you do not see the last error alert.

@askvortsov1 askvortsov1 merged commit 277a5c3 into flarum:master Nov 26, 2020
@askvortsov1 askvortsov1 added this to the 0.1.0-beta.15 milestone Nov 26, 2020
@franzliedke
Copy link
Contributor

Random thought: should we remove the "old" error message at the beginning of the request already, to make it more obvious that a hypothetical new error is the result of the new request? The request can take any amount of time, so having the error still visible may confuse users. If I am not mistaken, that's a pattern I've often seen with client-side validation: remove errors when submitting, show them anew if they still appear.

👋

@askvortsov1
Copy link
Member

askvortsov1 commented Jan 5, 2021

I like that approach! Is that something you'd like to PR/commit, or should I open a new issue for it?

👋

askvortsov1 added a commit that referenced this pull request Jan 26, 2021
Removing old errors at the beginning of the next request, rather than at the end of the next successful request, makes it clearer that any new errors are caused by the new inputs.

See #2467 (comment)
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.

Error alert in modal remains after request succeeds
4 participants