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

Always highlight the OK button when installing an add-on #16802

Merged
merged 1 commit into from
Nov 21, 2019

Conversation

gusandrianos
Copy link
Contributor

@gusandrianos gusandrianos commented Oct 18, 2019

Description

This solves #16754.
Admittedly this is somewhat of a personal opinion issue, although I think it is a valid one. It can probably be a better fix by highlighting the "cancel" button first, in order to prevent accidental clicks to the "OK" button.

Motivation and Context

How Has This Been Tested?

I tested on Linux Mint 19.2

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@a1rwulf
Copy link
Member

a1rwulf commented Oct 18, 2019

Please set Milestone and Labels ;-)
I think it's perfectly fine to set the default selection to OK when you want to install something.
We discussed this at devcon as well.

@gusandrianos
Copy link
Contributor Author

@a1rwulf I can't recall we did, I will.

@a1rwulf
Copy link
Member

a1rwulf commented Oct 18, 2019

Probably you weren't part of the discussion, but @kib and some others talked about the exact same thing.
Highlighting OK" is ok when you ask for confirmation of an action like installing. If you want to prevent the user from a mistake, Cancel` should be the default.
Eg.:
Do you really want to delete this file?

@a1rwulf a1rwulf added Type: Improvement non-breaking change which improves existing functionality v19 Matrix labels Oct 18, 2019
@a1rwulf a1rwulf added this to the Matrix 19.0-alpha 1 milestone Oct 18, 2019
@Hitcher
Copy link
Contributor

Hitcher commented Oct 18, 2019

Just to be certain - this only applies when installing addons right?

@gusandrianos
Copy link
Contributor Author

@HitcherUK AFAIK-tested, yes.

@ronie
Copy link
Member

ronie commented Oct 18, 2019

i'm afraid this isn't correct.
afaik the code you've modified is used to set focus to the 'detailed list' when needed.

skins hardcode the focus to the simple list. kodi forces focus to the detailed list in case the detailed list is visible.

you check check it is broken now by going to Settings > Interface > Skin.
it should focus the list of skins, but with this pr the 'get more' button is focused.

@da-anda
Copy link
Member

da-anda commented Oct 19, 2019

Probably you weren't part of the discussion, but @kib and some others talked about the exact same thing.
Highlighting OK" is ok when you ask for confirmation of an action like installing. If you want to prevent the user from a mistake, Cancel` should be the default.
Eg.:
Do you really want to delete this file?

correct, that's what we decided on during devcon

@garbear
Copy link
Member

garbear commented Oct 19, 2019

My comment here might be of some use

@gusandrianos gusandrianos force-pushed the gui-fix-ok-btn-highlighted branch 2 times, most recently from b149d9f to 9349292 Compare October 23, 2019 11:25
@gusandrianos gusandrianos force-pushed the gui-fix-ok-btn-highlighted branch 2 times, most recently from cf37f09 to 7687778 Compare October 30, 2019 14:33
xbmc/dialogs/GUIDialogSelect.h Outdated Show resolved Hide resolved
@gusandrianos
Copy link
Contributor Author

Jenkins build this please

@DaveTBlake
Copy link
Member

@ronie are you happy with this now?

@ronie
Copy link
Member

ronie commented Nov 21, 2019

@DaveTBlake yup, works ok now.

@gusandrianos gusandrianos merged commit 5d30ef7 into xbmc:master Nov 21, 2019
@Montellese
Copy link
Member

This breaks the possibility to focus a dependency in the list of dependencies and view its details.

@Montellese
Copy link
Member

c3bc22d should fix the issue.

@gusandrianos
Copy link
Contributor Author

@Montellese This was the intention. If you want to view the details in one of the items, you move to it and you do so. More often than not, you just install the add-on and it makes sense to have "OK" highlighted. This was discussed during this year's devcon and it was a team decision.

@ronie
Copy link
Member

ronie commented Jan 1, 2020

you move to it and you do so

please try that ;-)

i can confirm the issue @Montellese reported.

@Montellese
Copy link
Member

I'm perfectly fine with having the OK button pre-select but now it is impossible to move the focus to one of the dependencies in the list because your changes to CGUIDialogSelect::OnMessage() prevent the possibility to focus the list at all if m_focusToButton has been set. I'm pretty sure that was not the intention.

With my change the OK button is still pre-focused and you can also change the focus to all the other controls in the dialog (including the list of dependencies).

@gusandrianos
Copy link
Contributor Author

gusandrianos commented Jan 1, 2020

I'll take a look tomorrow, thanks for the heads up, I don't think I noticed it but maybe I didn't look for it to do so (?)

I'm having a bit of a transition period due to getting a new job, if @ronie approves go ahead and merge it otherwise I'll review it tomorrow night.

@Montellese
Copy link
Member

See #17115 for a PR containing the commit mentioned above.

@Montellese
Copy link
Member

@gusandrianos I also only found out by accident that I can select one of the dependencies and navigate to its details.

Maven85 pushed a commit to Maven85/kodi that referenced this pull request Jan 21, 2020
…ghted

Always highlight the OK button when installing an add-on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement non-breaking change which improves existing functionality v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants