-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat(NcAppNavigation): add n
hotkey to toggle navigation
#6311
Conversation
/backport to next |
a981dc8
to
357e99c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Could you also add aria-keyshortcuts
to the toggle button for accessibility as well as something like [n]
to the button's title (tooltip)? So users can find the shortcut.
Should we also close navigation by n?
Sure :)
We could do escape instead, assuming if we're in focus within the navigation 🤔 |
357e99c
to
8d2349d
Compare
Done @ShGKme |
8d2349d
to
7a3af7a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
7a3af7a
to
fab334a
Compare
Done @ShGKme |
return this.open ? t('Close navigation') : t('Open navigation') | ||
return this.open | ||
? t('Close navigation') | ||
: t('Open navigation {shortcut}', { shortcut: disableKeyboardShortcuts ? '' : '[n]' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To not change strings. It doesn't change the string meaning, no translation is required.
: t('Open navigation {shortcut}', { shortcut: disableKeyboardShortcuts ? '' : '[n]' }) | |
: t('Open navigation') + (disableKeyboardShortcuts ? '' : ' [n]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it's not compatible with rtl languages then :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, yes, because n
is inherently LTR and not neutral like []
, -
or numbers, it is kept on the right on RTL.
But I'd still not add a new translation string for something that is not a text but a technical concatenation.
What about adding a utility to @nextcloud/l10n
to concatenate strings taking RTL into account? So we never need to ask many translators to translate such things.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: skjnldsv <[email protected]>
Signed-off-by: skjnldsv <[email protected]>
Signed-off-by: skjnldsv <[email protected]>
0ed33e1
to
9c685e9
Compare
Done @ShGKme
|
So there is no way to close navigation with a hotkey without putting the focus on the navigation first? |
I think that would lead to issues otherwise |
Subset of nextcloud/server#30484