-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
BUG: Click outside of the node creation dialog closes the dialog #3531
Comments
Oh yes. It happened a lot of time to me aswell, especially when selecting the text in the text inputs and releasing the mouse outside of the dialog. I think having the NodeType Selection dialog still be closable by mouse would be nice as sometimes I have the wrong element selected when trying to insert a node. For this dialog, having it only trigger the close action when the MosueDown happened outside of the dialog aswell would be a welcome addition for these cases. |
Bildschirmaufnahme.2023-07-08.um.10.11.42.movwell it happened again in another presentation 😂 |
@grebaldi do we have the necessary infrastructure for a simple fix? If yes it would be cool if you could point me into the right direction. Im suggesting a "you have pending changes" overlay which needs to be confirmed. |
@mhsdesign isn't it enough to add a check inside |
It would still lead to the popup closing when, for example, the user tries to select text inputs for properties with defaultValue set and then releasing the mouse outside. It would still be annoying occasionaly because the text inputs are so close to the left popup edge that it will happen from time to time. The origin for this behaviour is the onClick listener in dialog.tsx, because ev.target only refers to the element where the MouseUp event triggered, eg. the target for MouseDown could have been the popup, and not the sorrounding section. private readonly handleOverlayClick = (ev: React.MouseEvent) => {
if (ev.target === ev.currentTarget) {
this.props.onRequestClose();
}
} |
@patricekaufmann why would that still happen when releasing the mouse? |
i think we should go with the solution #3573 and display a orange boarder around the nod creation dialog when one tries to escape without pressing the "back" button. |
I refer to a state in which the values haven't changed yet. When the user first interacts with a input field with |
Thanks for defending your point ;) But I think we should focus mostly on pending changes as this ist annoying to have to fill out again. It seems you’re describing a second strongly related problem / improvement. And I do understand your point and also agree that this is discussable behaviour, but let’s discuss this separately so we can fastly move forward with the main objective;) |
To add to the previous post, the MouseUp / MouseDown mechanic also applies to other dialogs: jfgR0lk4O5.mp4When the MouseDown event triggers on the Button and MouseUp on the outside overlay section, it should not trigger the close event. Edit: You are absolutely right. While related to this issue, it probably needs attention in a separate issue :) Btw, I love that orange border! |
I couldn't get the flashing to work, but that would be easy: Bildschirmaufnahme.2023-07-11.um.10.02.53.mov(alternatively i could send a flash message as well) Nested dialogs a doable, but they must be registered deep in redux and it would be a more complex bugfix. |
I love the solution! First i thought it would be good to have an alert for the editor too as notice. But i think this is already enough. |
I don't like that it's called "back" and would prefer "cancel". But that's a topic for another day. I'm fine with this visual solution for now! |
I love it dearly, this is one of my major UX issues and I accidentally closed many large creation dialogs in the past :) And I agree with @Sebobo that "cancel" would be a better fit |
@grebaldi and me found an even better solution: we introduce the same shake animation as in the login. Bildschirmaufnahme.2023-07-11.um.11.59.33.mov(And yes escape is covered / prevented as well) |
Good idea! But I would still make the border orange. The green does not fit so well in this case. |
If you are for approach 1 or 2 i would rather put it into another improvement/fix pr together with sebs proposed renaming:
|
3 of course;) |
Like this @crydotsnake ? Bildschirmaufnahme.2023-07-12.um.09.57.42.movinitially i was about to always prevent any accidental closing independent of pending changes but @bwaidelich requested on slack
so now i only prevent the closing via escape and mouse-click if there are pending changes as shown |
Yes. This looks way better IMO. |
I wouldn't say I requested it, but I think it makes a lot of sense to be able to quickly close a modal if I accidentally opened it so +100 for the current implementation! <3 |
I know I'm a bit late to the game but I'm not sure the following part of the change was a wise choice:
Why? I now don't have the opportunity to simply escape this modal if I really do want to discard my changes. IMHO this use case was overlooked in your discussion. Imagine we would have more steps than the NodeType selection and the edit form. I know @Sebobo thought about this. How would you cancel your edit mode without clicking the "back" button multiple times in the worst case? If I'm an impatient person, which I personally can be 😉, I could only escape this situation by reloading the backend. Is that really good UX? |
hmm yes indeed. 🤔 ^^ Im fully convinced to not let people off the hook that easily when they have pending changes in the node creation dialog. As this is released with https://discuss.neos.io/t/neos-ui-bugfix-releases-8-3-3-8-2-11-8-1-11-8-0-14-7-3-19/6362 already i like to propose to move any follow up discussions (and i dont fully object, its just that we had definitely enough votes ^^) into a separate issue. Okay? |
Ah I missed it was already released. There you go: #3582 |
I think making this decision is to simple and a bit unexpected user behavior. If you fill out a more complex dialog and accidentally click into the darkened space around, it is immediately closed without asking what to do with the pending changes.
I would rather:
A: Do nothing (one should use the escape key or the "back" button)
B: Show an popup warning that we will now proceed to close
... Fun fact, due to my nervous clicking, this bit me in a customer presentation ^^
The text was updated successfully, but these errors were encountered: