mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 16:13:15 +00:00
fix: show the extend-selection shortcut as Shift + ↓ or Shift + ↑ in the shortcuts help
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { SHORTCUT_APPS } from '@/lib/keyboard-shortcuts';
|
||||
import { shortcutAlternatives } from '@/lib/shortcut-keys';
|
||||
|
||||
// The shortcuts help shows " / " as "or" between whole keys. "Shift + ↓ / ↑"
|
||||
// read as "Shift + ↓ or ↑", which says plain ↑ also extends the selection.
|
||||
|
||||
describe('shortcut alternatives', () => {
|
||||
it('spell out the modifier in every alternative', () => {
|
||||
const bad: string[] = [];
|
||||
for (const app of SHORTCUT_APPS) {
|
||||
for (const section of app.sections) {
|
||||
for (const entry of section.entries) {
|
||||
const alternatives = shortcutAlternatives(entry.key);
|
||||
const modified = alternatives.some((key) => key.includes(' + '));
|
||||
if (modified && alternatives.some((key) => !key.includes(' + '))) bad.push(`${app.id}: ${entry.key}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
expect(bad).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -27,7 +27,7 @@ export const MAIL_SHORTCUTS = {
|
||||
{ key: "/", description: "shortcuts.global.search" },
|
||||
{ key: "Shift + G", description: "shortcuts.global.refresh" },
|
||||
{ key: "Mod + A", description: "shortcuts.global.select_all" },
|
||||
{ key: "Shift + ↓ / ↑", description: "shortcuts.global.extend_selection" },
|
||||
{ key: "Shift + ↓ / Shift + ↑", description: "shortcuts.global.extend_selection" },
|
||||
],
|
||||
threads: [
|
||||
{ key: "x", description: "shortcuts.threads.expand_collapse", layout: "default" },
|
||||
|
||||
Reference in New Issue
Block a user