Improve Hint and Solve action visibility and enabled state
ClosedPublic

Authored by gregormi on May 16 2018, 12:04 AM.

Details

Summary

BUG: 357996

  • Action visibility improvement because some actions not needed in specific modes
    • Enter new puzzle: 'Hint' and 'Solve' not visible
    • Play puzzle: 'Check' not visible
    • Start page: 'Hint', 'Solve' and 'Check' not visible
  • For Bug 357996 ("Finishing a game should disable hint and solve buttons and menu items")
    • Disable Hint and Solve action after puzzle was solved

Diff Detail

Repository
R417 KSudoku
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gregormi created this revision.May 16 2018, 12:04 AM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptMay 16 2018, 12:04 AM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
gregormi requested review of this revision.May 16 2018, 12:04 AM
gregormi updated this revision to Diff 34695.May 23 2018, 8:28 AM
  • Enable Hint button again when after solved puzzle Undo was used
gregormi retitled this revision from WIP: Improve Hint and Solve action enabledness and visibility to Improve Hint and Solve action visibility and enabled state.May 23 2018, 8:29 AM
gregormi edited the summary of this revision. (Show Details)
gregormi edited the summary of this revision. (Show Details)
aacid added a subscriber: aacid.May 25 2018, 11:07 PM

Are you sure about that? I remember a discussion i had long time ago with an usability person and i think he mentioned showing and hiding menu actions is usually not the best of the ideas because it confuses the user that things the action was there and when it isn't gets confused and thinks it's either somewhere else or that he misremembered, but if instead the action is disabled, usually the user thinks "ah, i need to move to a different state to enable this".

But this was a discussion from almost 10 years ago, maybe the usability recommendations have changed or maybe i didn't even understand it correctly :D

I agree with the general UI best practice. But this change is different. As far as I understood the program, there are two modes: "Enter/edit a game" and "Play the game". The "Check" action is currently always grayed out during "Play the game" because it makes no sense there. And the "Hint" action only makes sense when playing the game not when creating one. In either mode, the user gets more confused because a deactivated button indicates that it might come available which is not true (as far as I can see it).

aacid added a comment.Jun 4 2018, 9:46 PM

Well, you're the de-facto mainitaner now, so i'll have to trust you, i'd say if noone complains in a week, just commit this. (with the two small things fixed if possible)

src/gui/ksudokugame.cpp
582

the spacing here is a bit wonky :)

src/gui/ksudokugame.h
262

this looks like it could be const

aacid accepted this revision.Jun 11 2018, 9:08 PM
This revision is now accepted and ready to land.Jun 11 2018, 9:08 PM
gregormi updated this revision to Diff 36905.Jun 29 2018, 8:38 PM
gregormi edited the summary of this revision. (Show Details)
  • Fix spacing: use tabs instead of spaces
  • Make method const
gregormi marked 2 inline comments as done.Jun 29 2018, 8:39 PM
This revision was automatically updated to reflect the committed changes.