Errors & popup dialogs stack, some redundantly


(Iszi) #1

In running a test case for the CAPSLOCK error post I came across an odd condition. When I initially hit the “Body invalid” error, I immediately chose to cancel the post without bothering to dismiss the “Body invalid” error.

When I hit cancel, I noticed that the confirmation dialog had darkened the topic area another shade on top of what the error had already done. Without dismissing either dialog, I found I was able to hit cancel again - and the topic area darkened yet another shade. I tried this several times until the topic area was completely black, and then some.

After this, I had to dismiss every single dialog I’d generated - all the way down to the “Body invalid” error. It seems a few things are broken here:

  1. I’m not sure any error messages or confirmation dialogs should be allowed to stack at all. There may be some reasons to allow this that I’m just not considering, so I will understand if this bit is dismissed.
  2. Duplicate error messages or confirmation dialogs should definitely not stack - users should only have to dismiss one dialog for multiple identical events.
  3. The user should not be allowed to push the “cancel” button while a cancel confirmation is already pending. This is currently enforced when the user tries to cancel a post normally, but breaks when the user tries to cancel while a dialog that does not lock the post editing area is active.

I think one measure that would circumvent the need for fixing 1 & 2 directly, and fix 3, would be to separate the shading effect from the area locking and have all dialogs that perform shading like this prevent interaction with anything but the dialog box itself. This way, users are prevented from performing actions that might generate additional dialogs until the current dialog is dismissed, while the UI can still highlight areas relevant to the current dialog.


(Jeff Atwood) #2

Is this fixed by your other fix for the stacked Discourse upgrade dialogs, @sam?


(Sam Saffron) #3

Not really I just fixed one instance


(Jeff Atwood) #4

I feel like you are not giving 110% here. I feel like I am seeing at best 105, maybe 106 percent tops.


(Sam Saffron) #5

No repro anymore of this issue, we don’t really stack errors anymore.


(Sam Saffron) #6