-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
[NEW] Adds a Keyboard Shortcut option to the flextab #5902
Conversation
Hi @cnash, can you paste screen shots of your implementation here? |
{ "Description": "Move to the end of the message", "Keys": "<kbd>Command</kbd> (or <kbd>Alt</kbd>) + <kbd>Down Arrow</kbd>"}, | ||
{ "Description": "New line in message compose input", "Keys": "<kbd>Shift</kbd> + <kbd>Enter</kbd>"} | ||
] | ||
}, |
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.
Heads up! We never used structured json for translations. Not sure how Lingohub will behave.
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.
Do I need to change this then? I was hoping to use the list structure to make it easier to add more shortcuts in the future.
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.
I am not sure :( let's see if someone has more info on this one regarding lingohub.
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.
I think we will need to change this, LingoHub won't parse this.
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.
Let's make it a fixed list, with unique keys, rather than a loop to iterate over an array.
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.
Okay
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.
Change the tree-structured i18n json to fixed list with unique keys.
@cnash Hey! Do you still have interest in finishing this PR? |
Yeah. Sorry. Work got crazy, and then I forgot about this. I'll try to fix it up this evening. |
35f30ef
to
9a83a8a
Compare
icon: 'icon-keyboard', | ||
template: 'keyboardShortcuts', | ||
order: 4 | ||
}); |
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.
I keep adding newlines to this file, and @codacy-bot keeps complaining.
# Conflicts: # packages/rocketchat-theme/client/imports/general/base_old.css
groups: ['channel', 'privategroup', 'directmessage'], | ||
id: 'keyboard-shortcut-list', | ||
i18nTitle: 'Keyboard_Shortcuts.Title', | ||
icon: 'icon-keyboard', |
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.
@karlprieb Please fix this icon on new design
@RocketChat/core
Closes #46
I added a button to the "FlexTabBar" on the side that opens a tab for displaying the Keyboard Shortcuts. The shortcuts are defined in en.i18n.json (sorry, I only know english). They are in a list, so you can add more in the future without modifying the template.