Skip to content

Commit 690103c

Browse files
bmxeddEdward Jung
and
Edward Jung
authored
Bug fixes to shortcut modal (#127)
* Update shortcut modal to a responsive design layout * Fix display of ctrl keys in the shortcut dialog * Allow shortcut dialog to be navigatible using keyboard * Add default san-serif font for consistent font display --------- Co-authored-by: Edward Jung <edwardjung@google.com>
1 parent 67f6703 commit 690103c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export enum LOGGING_MSG_TYPE {
6868
* Platform specific modifier key used in shortcuts.
6969
*/
7070
export enum MODIFIER_KEY {
71-
Window = 'Ctrl',
71+
Windows = 'Ctrl',
7272
ChromeOS = 'Ctrl',
7373
macOS = '⌘ Command',
7474
Linux = 'Meta',

src/shortcut_dialog.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class ShortcutDialog {
108108

109109
let modalContents = `<div class="modal-container">
110110
<dialog class="shortcut-modal">
111-
<div class="shortcut-container">
111+
<div class="shortcut-container" tabindex="0">
112112
<div class="header">
113113
<button class="close-modal">
114114
<span class="material-symbols-outlined">close</span>
@@ -298,7 +298,7 @@ Blockly.Css.register(`
298298
.shortcut-container {
299299
font-size: 0.95em;
300300
overflow: auto;
301-
padding-inline-end: .5em;
301+
padding: 0.5em;
302302
}
303303
304304
.shortcut-combo {
@@ -339,5 +339,4 @@ Blockly.Css.register(`
339339
width: 45%;
340340
}
341341
}
342-
343342
`);

test/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
<meta charset="utf-8" />
55
<title>Blockly Plugin Test</title>
66
<link rel="preconnect" href="https://fonts.googleapis.com" />
7+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap">
78
<link
89
rel="stylesheet"
910
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
1011
<style>
1112
body {
13+
font-family: Roboto, sans-serif;
14+
font-size: 15px;
1215
margin: 0;
1316
max-width: 100vw;
1417
}

0 commit comments

Comments
 (0)