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

Replace "Leave a Power Token" checkbox with radio buttons #702

Merged

Conversation

gereon77
Copy link
Collaborator

Closes #697

I decided to replace the checkbox with radio buttons to avoid regularly dialogs. They now behave the following way.

If canLeavePowerToken() returns false, this.leavePowerToken is set to false and causes the No radio to be preselected:

screen1

If canLeavePowerToken() returns true, this.leavePowerToken is set to undefined which forces the player to actively make a decision:

screen2

If Confirm is clicked without a decision, an alert is shown, which seemed to be better to me than disabling Confirm:

screen3

@Longwelwind
Copy link
Owner

Why not a normal prompt like the other flows?

With this flow, if the player forgets to toggle the radio buttons, he will get the prompt, need to close it, toggle the radio and then click the "Confirm" button again, when with the prompt, it happens in one action. The only issue is that when we will roll out the update, people might get confused that there's no more checkbox and so they might wonder how they can leave a PT, but that's only a temporary issue I think.

@gereon77
Copy link
Collaborator Author

gereon77 commented Jul 1, 2020

I did it this way for three reasons:

  1. ATM we use prompts to ensure special moves like removing a March order without moving, to not do it by accident. I didn’t want to integrate them in a regular flow.

  2. Browsers suggests „Do not show messages again“ at some point when there are too much dialogs... That might be weird for live games when users clicks that by accident.

  3. Most Browsers only offer Ok and Cancel for window.confirm(). It's hard to find a good question which implies Cancel will continue without leaving a PT...

@gereon77
Copy link
Collaborator Author

gereon77 commented Jul 1, 2020

@Longwelwind I prepared a commit for the suggested change with disabling Confirm instead of the alert. It now would look this way:

image

If you agree on this I would rebase and squash both commits together. Otherwise I'll go for window.confirm().

@gereon77
Copy link
Collaborator Author

gereon77 commented Jul 1, 2020

In addition I thought it might make sense to improve Ux for ResolveSingleMarchOrderGameState when touching it.

I changed it to show messages just if they make sense. The flow would now be:

image

image
(No power question because no target has been selected)

image
(The good new dialog because there is still a unit which could be additionally moved somewhere else)

image
(The text to click troops is gone as all troops are already chosen to be moved somewhere)

@gereon77 gereon77 force-pushed the replace-leave-pt-checkbox-with-radio branch from e40385f to 7392350 Compare July 1, 2020 14:19
@gereon77 gereon77 force-pushed the replace-leave-pt-checkbox-with-radio branch from 7392350 to ad0b4b8 Compare August 3, 2020 08:13
@gereon77 gereon77 force-pushed the replace-leave-pt-checkbox-with-radio branch from ad0b4b8 to 8b5f8c0 Compare August 3, 2020 08:38
@gereon77 gereon77 merged commit e88568a into Longwelwind:master Aug 3, 2020
@gereon77 gereon77 deleted the replace-leave-pt-checkbox-with-radio branch August 3, 2020 08:58
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.

Replace "Leave Power Token" checkbox by a dialog
2 participants