mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
hotkey: Add deprecation notice for '*' hotkey.
This commit is contained in:
@@ -252,7 +252,7 @@ run_test('basic_chars', () => {
|
|||||||
assert_mapping('d', 'drafts.launch');
|
assert_mapping('d', 'drafts.launch');
|
||||||
|
|
||||||
// Next, test keys that only work on a selected message.
|
// Next, test keys that only work on a selected message.
|
||||||
var message_view_only_keys = '@*+>RjJkKsSuvi:GM';
|
var message_view_only_keys = '@+>RjJkKsSuvi:GM';
|
||||||
|
|
||||||
// Check that they do nothing without a selected message
|
// Check that they do nothing without a selected message
|
||||||
global.current_msg_list.empty = return_true;
|
global.current_msg_list.empty = return_true;
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ var keydown_either_mappings = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var keypress_mappings = {
|
var keypress_mappings = {
|
||||||
|
42: {name: 'star_deprecated', message_view_only: true}, // '*'
|
||||||
43: {name: 'thumbs_up_emoji', message_view_only: true}, // '+'
|
43: {name: 'thumbs_up_emoji', message_view_only: true}, // '+'
|
||||||
45: {name: 'toggle_message_collapse', message_view_only: true}, // '-'
|
45: {name: 'toggle_message_collapse', message_view_only: true}, // '-'
|
||||||
47: {name: 'search', message_view_only: false}, // '/'
|
47: {name: 'search', message_view_only: false}, // '/'
|
||||||
@@ -660,6 +661,9 @@ exports.process_hotkey = function (e, hotkey) {
|
|||||||
case 'C_deprecated':
|
case 'C_deprecated':
|
||||||
ui.maybe_show_deprecation_notice('C');
|
ui.maybe_show_deprecation_notice('C');
|
||||||
return true;
|
return true;
|
||||||
|
case 'star_deprecated':
|
||||||
|
ui.maybe_show_deprecation_notice('*');
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_msg_list.empty()) {
|
if (current_msg_list.empty()) {
|
||||||
|
|||||||
@@ -128,6 +128,8 @@ exports.maybe_show_deprecation_notice = function (key) {
|
|||||||
var message;
|
var message;
|
||||||
if (key === 'C') {
|
if (key === 'C') {
|
||||||
message = i18n.t('We\'ve replaced the "C" hotkey with "x" to make this common shortcut easier to trigger.');
|
message = i18n.t('We\'ve replaced the "C" hotkey with "x" to make this common shortcut easier to trigger.');
|
||||||
|
} else if (key === '*') {
|
||||||
|
message = i18n.t('We\'ve replaced the "*" hotkey with "Ctrl + s" to make this common shortcut easier to trigger.');
|
||||||
} else {
|
} else {
|
||||||
blueslip.error("Unexpected deprecation notice for hotkey:", key);
|
blueslip.error("Unexpected deprecation notice for hotkey:", key);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user