-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Replace "Ctrl" by "Cmd" under macOS and style the "kbd" tag in keyboard shortcuts labels #1449
Conversation
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.
umap/static/umap/js/umap.core.js
Outdated
shortcut = shortcut.split('+').map((el) => `<kbd>${el}</kbd>`).join('+') | ||
} | ||
const modifier = this.isMacOS ? 'Cmd' : 'Ctrl' | ||
label += ` ${shortcut.replace('Modifier', modifier)}` |
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.
label += ` ${shortcut.replace('Modifier', modifier)}` | |
label += ` (${shortcut.replace('Modifier', modifier)})` |
I think keeping the keyboard shortcut between parenthesis is more readable.
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.
Not intentional, but this box is derived from the buttons, and use the title element, which does not contain the tag of course. I did not put energy on changing that point, because I thought we'd totally change this box to have all the shortcuts, etc. But let's refactor to use something else than the title, you're right. |
This main help already display some of them, so let's first focus on this label refactor, and then do a refactor of that main help modal.
This happens in title attributes, for example.
No description provided.