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

OK/Cancel buttons: positioning should be standard #702

Open
NQNStudios opened this issue Mar 20, 2025 · 3 comments
Open

OK/Cancel buttons: positioning should be standard #702

NQNStudios opened this issue Mar 20, 2025 · 3 comments
Labels
dialogxml Affects the dialog system work Non coding related task

Comments

@NQNStudios
Copy link
Collaborator

NQNStudios commented Mar 20, 2025

We've got a bunch of <action>-confirm.xml dialogs where Yes/OK is on the left and No/Cancel is on the right. This tripped me up recently because we also have several dialogs where Cancel is on the Left and OK is on the right.

Examples, non-exhaustive:

Cancel on the Left:

  • edit-shop-item.xml
  • edit-item.xml
  • get-num.xml

Cancel on the right:

  • steal-item.xml
  • delete-pc-confirm.xml
  • preview-dialogs-confirm.xml

And we have 196 dialogs now, so I don't want to survey all of them right now.

Another issue raised by this for me is that whenever I've needed to add a confirmation dialog, I've done it by picking an existing confirmation dialog (quite arbitrarily) and copy-pasting, then editing. So maybe I've been proliferating new confirmation dialogs that didn't match each other, based on which one I sourced from. Not a great practice.

They're all basically the same--and yet, reordering the buttons or trying to keep their order standard is O(N) in developer time because you have to edit each XML file. I think we should probably have a text resource with confirmation texts, and a cChoiceDialog wrapper function that runs a confirmation dialog, the same base dialogxml for each one, allowing you to choose whether it's OK/Cancel or Yes/No.

I'm imagining for the ones where OK is on the left, which feels less natural to me, this was done because they are dangerous or destructive confirmations, and the idea is to prevent someone on autopilot from doing a thing they regret? Or that whichever is Default goes on the right? idk. I feel like they should all be the same and OK should always be on the right. I mean, look at the GitHub comment editor I'm typing in right now:

Image
@NQNStudios NQNStudios added dialogxml Affects the dialog system work Non coding related task labels Mar 20, 2025
@NQNStudios
Copy link
Collaborator Author

@CelticMinstrel before I decide to put in the work, what do you think about this one?

@NQNStudios
Copy link
Collaborator Author

I think a better way to really safeguard against careless destructive actions would be: add an 'I understand' LED to the dialogxml and let severe actions pass an argument to show it and require it be activated.

@CelticMinstrel
Copy link
Member

before I decide to put in the work, what do you think about this one?

After looking at a random MacOS dialog, I think putting OK on the right makes more sense.

NQNStudios added a commit to NQNStudios/cboe that referenced this issue Mar 23, 2025
NQNStudios added a commit to NQNStudios/cboe that referenced this issue Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialogxml Affects the dialog system work Non coding related task
Projects
None yet
Development

No branches or pull requests

2 participants