-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
dialog: fix button order of ConfirmSaveDialog
#12559
dialog: fix button order of ConfirmSaveDialog
#12559
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure that this is the correct approach to this issue. First off, we have some regressions with this:
I believe a refactoring of the ConfirmSaveDialog
is in order. I'm not perfectly sure that the dialog should be in charge of actually executing the change. Instead, I would like to see it being decoupled from ConfirmDialog
and returning some sort of enum:
enum ConfirmSaveResult {
Cancel,
Save,
DontSave
}
That way we can actually save outside of the dialog and also make it easier to order the buttons, without needing to touch the ConfirmDialog
at all.
Yeah, you are right, refactoring ConfirmSaveDialog is the better approach. I'll get on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I led you down the wrong path. I've refactored this a bit more to reduce some of the duplication. Looks good to me now 👍
Thanks for the changes Mark, I realize how much I overcomplicated some stuff. |
What it does
This PR fixes #12246 by making changes to the UI as per the defined conventions. It reorders the dialog buttons in the
ConfirmSaveDialog
to followCancel
>Don't save
>Save all
sequence. This PR also makes sure that only one primary button is highlighted, which is theSave all
button.How to test
File
->AutoSave
Cancel
>Don't save
>Save all
)Review checklist
Reminder for reviewers