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

fix(files): remove focus outline on file list item click and make the link focusable #41619

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Nov 20, 2023

Summary

There is an outline on focus-visible state, which appears also on click making a glitch effect.

At the same time, focus-visible state was not useful because the link was not focusable.

Todo

  • Show outline only on real focus state
  • Make the link focusable by tabindex (links usually should not be focusable, but in this case it works close to the button)
  • Refactor linkTo: replace deprecated is attr on <a> with a dynamic component:
    • Special attribute is is deprecated and removed in Vue 3
    • It is confusing, that <a> element is rendered as <span> sometimes
Before After
Click
click-before click-after
Tab
tab-before tab-after

Checklist

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.

Looks good from the videos, thanks! :)

@jancborchardt jancborchardt mentioned this pull request Nov 20, 2023
13 tasks
@ShGKme ShGKme force-pushed the fix/files--active-state-on-list-item-click branch from 753e8f3 to 59f183b Compare November 20, 2023 14:06
@ShGKme
Copy link
Contributor Author

ShGKme commented Nov 20, 2023

Updates:

  1. Set tabindex in linkTo computed, not on <a> in template, because <a> is not guaranteed to be rendered as <a> here.
  2. Refactor linkTo: replace deprecated is attr on <a> with a dynamic component:
    • Special attribute is is deprecated and removed in Vue 3
    • It is confusing, that <a> element is rendered as <span> sometimes

Copy link
Member

@nimishavijay nimishavijay left a comment

Choose a reason for hiding this comment

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

Nice! Looks great design-wise!

@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
…omponent

- Special attribute `is` is deprecated and removed in Vue 3
- It is confusing, that `<a>` element is rendered as `span` sometimes

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the fix/files--active-state-on-list-item-click branch from 59f183b to c90ae20 Compare November 28, 2023 21:52
@ShGKme
Copy link
Contributor Author

ShGKme commented Nov 28, 2023

Rebased onto master.

@ShGKme ShGKme enabled auto-merge November 28, 2023 21:54
@ShGKme ShGKme merged commit 3f041ef into master Nov 28, 2023
42 checks passed
@ShGKme ShGKme deleted the fix/files--active-state-on-list-item-click branch November 28, 2023 22:35
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 8, 2024

/backport to stable28

@backportbot-nextcloud
Copy link

The backport to stable28 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable28
git pull origin stable28

# Create the new backport branch
git checkout -b fix/foo-stable28

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable28

Error: Unknown error

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 8, 2024

/backport 2f18651 fedd531 e6bdbdb to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Clicking folder names for navigation shows black border for a split second
6 participants