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

Improve activity list highlighting/keyboard item selection #4781

Merged
merged 1 commit into from Sep 7, 2022

Conversation

claucambra
Copy link
Collaborator

@claucambra claucambra commented Jul 26, 2022

This PR improves our keyboard navigation of activity list items in the activity list (especially in terms of highlights).

This partially addresses #4220 (navigation within activity list items, such as to highlight action buttons, is still a bit funky)

Screen.Recording.2022-07-27.at.14.32.23.mov

Signed-off-by: Claudio Cambra claudio.cambra@gmail.com

@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #4781 (6c52480) into master (2e2ed97) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4781      +/-   ##
==========================================
- Coverage   57.23%   57.22%   -0.02%     
==========================================
  Files         138      138              
  Lines       17144    17144              
==========================================
- Hits         9812     9810       -2     
- Misses       7332     7334       +2     
Impacted Files Coverage Δ
src/libsync/discovery.cpp 84.56% <0.00%> (-0.30%) ⬇️
src/libsync/propagatedownload.cpp 65.03% <0.00%> (-0.15%) ⬇️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 74.71% <0.00%> (+0.45%) ⬆️

@claucambra
Copy link
Collaborator Author

@nimishavijay @jancborchardt what do you think about keyboard highlights? Should they be different from mouse-hovering highlights? At the moment I have made them the same (on keyboard navigation un clickable list items have an outline instead)

@jancborchardt
Copy link
Member

@claucambra same style is good – I'd also say that the outline is not necessary but rather confusing. Can just be the same style. Ideally every entry has an action (in the case of your todos opening the Tasks app for example) but that's of course a server/app issue.

Can the action buttons be focused too?

@claucambra
Copy link
Collaborator Author

@claucambra same style is good – I'd also say that the outline is not necessary but rather confusing. Can just be the same style. Ideally every entry has an action (in the case of your todos opening the Tasks app for example) but that's of course a server/app issue.

Sorry, to clarify, the outline is only for list items that are un-clickable -- the intention behind the outline was distinguishing between an item that is "enabled" (i.e. clicking has some effect) vs. one that isn't. On hover with the mouse, these items aren't highlighted in any way, but with keyboard navigation you'd still need some indication that the outlined item is the one currently selected. Whenever we get, say, todos to be clickable and have them open the tasks app, the highlight will not be the outline but the full background change.

Having said all of this, I can change the highlight to be just like the mouse hover even on disabled items if that is preferable :)

Can the action buttons be focused too?

Under the hood the code relating to the buttons is a mess and making them focus-able in a coherent/predictable/functional way will require some serious refactoring. I've started with #4784 but it will likely take several more PRs of cleaning up things component by component. So I decided to keep this PR to just fixing keyboard navigation in the list view itself, but intra-listitem navigation is being worked on :)

@claucambra claucambra force-pushed the bugfix/keyboard-activity-list-selection branch 2 times, most recently from 1ca18d5 to b2c1ebc Compare August 2, 2022 11:20
@claucambra
Copy link
Collaborator Author

claucambra commented Aug 2, 2022

@claucambra same style is good – I'd also say that the outline is not necessary but rather confusing. Can just be the same style. Ideally every entry has an action (in the case of your todos opening the Tasks app for example) but that's of course a server/app issue.

Sorry, to clarify, the outline is only for list items that are un-clickable -- the intention behind the outline was distinguishing between an item that is "enabled" (i.e. clicking has some effect) vs. one that isn't. On hover with the mouse, these items aren't highlighted in any way, but with keyboard navigation you'd still need some indication that the outlined item is the one currently selected. Whenever we get, say, todos to be clickable and have them open the tasks app, the highlight will not be the outline but the full background change.

@jancborchardt @nimishavijay thoughts on the focus effect on pressable vs unpressable buttons? :)

@mgallien
Copy link
Collaborator

mgallien commented Aug 2, 2022

@claucambra same style is good – I'd also say that the outline is not necessary but rather confusing. Can just be the same style. Ideally every entry has an action (in the case of your todos opening the Tasks app for example) but that's of course a server/app issue.

Sorry, to clarify, the outline is only for list items that are un-clickable -- the intention behind the outline was distinguishing between an item that is "enabled" (i.e. clicking has some effect) vs. one that isn't. On hover with the mouse, these items aren't highlighted in any way, but with keyboard navigation you'd still need some indication that the outlined item is the one currently selected. Whenever we get, say, todos to be clickable and have them open the tasks app, the highlight will not be the outline but the full background change.

Having said all of this, I can change the highlight to be just like the mouse hover even on disabled items if that is preferable :)

I fear that the current implementation is pushing an implementation detail into the user
if I want to scroll through the list, do I really care if something is user interactive or not ?
when interacting with a mouse, I can try to click to see if this is interactive or not and interacting via a screen reader can be done in the same way (and visually impaired people will not really see the visual distinction anyway)

@jancborchardt
Copy link
Member

Yup, agree with @mgallien – and as said, would be less confusing if the focus highlight is the same as for hover. :)

@claucambra claucambra force-pushed the bugfix/keyboard-activity-list-selection branch 2 times, most recently from de2676d to 66b11c1 Compare August 10, 2022 09:32
@claucambra
Copy link
Collaborator Author

claucambra commented Aug 10, 2022

Okay @jancborchardt the highlight is now the same on all activity items

Screen.Recording.2022-08-10.at.11.39.19.mov

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! :)

@claucambra claucambra force-pushed the bugfix/keyboard-activity-list-selection branch from 66b11c1 to 6c52480 Compare August 26, 2022 18:22
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
@claucambra claucambra force-pushed the bugfix/keyboard-activity-list-selection branch from 6c52480 to b820df9 Compare September 7, 2022 16:35
@claucambra claucambra merged commit ee513b6 into master Sep 7, 2022
@claucambra claucambra deleted the bugfix/keyboard-activity-list-selection branch September 7, 2022 16:36
@sonarcloud
Copy link

sonarcloud bot commented Sep 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-4781-b820df90b9a400f7791e1c62cad1d657293e3de5-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien mgallien added this to the 3.7.0 milestone Oct 3, 2022
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.

None yet

5 participants