Skip to content

Commit a7c2487

Browse files
authored
Merge branch 'develop' into refactor/menubar-a11y-keyboard-mouse
2 parents 3caa2c9 + 1b09307 commit a7c2487

24 files changed

+183
-113
lines changed

client/modules/IDE/components/KeyboardShortcutModal.jsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ function KeyboardShortcutModal() {
7676
<span>{t('KeyboardShortcuts.CodeEditing.CreateNewFile')}</span>
7777
</li>
7878
</ul>
79-
<h3 className="keyboard-shortcuts__title">General</h3>
79+
<h3 className="keyboard-shortcuts__title">
80+
{t('KeyboardShortcuts.General')}
81+
</h3>
8082
<ul className="keyboard-shortcuts__list">
8183
<li className="keyboard-shortcut-item">
8284
<span className="keyboard-shortcut__command">{metaKeyName} + S</span>
@@ -86,29 +88,33 @@ function KeyboardShortcutModal() {
8688
<span className="keyboard-shortcut__command">
8789
{metaKeyName} + Enter
8890
</span>
89-
<span>{t('KeyboardShortcuts.General.StartSketch')}</span>
91+
<span>{t('KeyboardShortcuts.GeneralSelection.StartSketch')}</span>
9092
</li>
9193
<li className="keyboard-shortcut-item">
9294
<span className="keyboard-shortcut__command">
9395
{metaKeyName} + Shift + Enter
9496
</span>
95-
<span>{t('KeyboardShortcuts.General.StopSketch')}</span>
97+
<span>{t('KeyboardShortcuts.GeneralSelection.StopSketch')}</span>
9698
</li>
9799
<li className="keyboard-shortcut-item">
98100
<span className="keyboard-shortcut__command">
99101
{metaKeyName} + Shift + 1
100102
</span>
101-
<span>{t('KeyboardShortcuts.General.TurnOnAccessibleOutput')}</span>
103+
<span>
104+
{t('KeyboardShortcuts.GeneralSelection.TurnOnAccessibleOutput')}
105+
</span>
102106
</li>
103107
<li className="keyboard-shortcut-item">
104108
<span className="keyboard-shortcut__command">
105109
{metaKeyName} + Shift + 2
106110
</span>
107-
<span>{t('KeyboardShortcuts.General.TurnOffAccessibleOutput')}</span>
111+
<span>
112+
{t('KeyboardShortcuts.GeneralSelection.TurnOffAccessibleOutput')}
113+
</span>
108114
</li>
109115
<li className="keyboard-shortcut-item">
110116
<span className="keyboard-shortcut__command">Shift + Right</span>
111-
<span>Go to Reference for Selected Item in Hinter</span>
117+
<span>{t('KeyboardShortcuts.GeneralSelection.Reference')}</span>
112118
</li>
113119
</ul>
114120
</div>

client/modules/IDE/components/Preferences/Preferences.unit.test.jsx

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -442,45 +442,43 @@ describe('<Preferences />', () => {
442442
);
443443
});
444444
});
445+
describe('start wordwrap at false', () => {
446+
it('wordwrap toggle, starting at false', () => {
447+
// render the component with wordwrap prop set to false
448+
subject({ wordwrap: false });
445449

446-
describe('start linewrap at false', () => {
447-
it('linewrap toggle, starting at false', () => {
448-
// render the component with linewrap prop set to false
449-
subject({ linewrap: false });
450-
451-
// get ahold of the radio buttons for toggling linewrap
452-
const linewrapRadioFalse = screen.getByRole('radio', {
453-
name: /linewrap off/i
450+
// get ahold of the radio buttons for toggling wordwrap
451+
const wordwrapRadioFalse = screen.getByRole('radio', {
452+
name: /wordwrap off/i
454453
});
455-
const linewrapRadioTrue = screen.getByRole('radio', {
456-
name: /linewrap on/i
454+
const wordwrapRadioTrue = screen.getByRole('radio', {
455+
name: /wordwrap on/i
457456
});
458457

459458
testToggle(
460-
linewrapRadioFalse,
461-
linewrapRadioTrue,
459+
wordwrapRadioFalse,
460+
wordwrapRadioTrue,
462461
props.setLinewrap,
463462
true
464463
);
465464
});
466465
});
466+
describe('start wordwrap at true', () => {
467+
it('wordwrap toggle, starting at true', () => {
468+
// render the component with wordwrap prop set to true
469+
subject({ wordwrap: true });
467470

468-
describe('start linewrap at true', () => {
469-
it('linewrap toggle, starting at true', () => {
470-
// render the component with linewrap prop set to false
471-
subject({ linewrap: true });
472-
473-
// get ahold of the radio buttons for toggling linewrap
474-
const linewrapRadioFalse = screen.getByRole('radio', {
475-
name: /linewrap off/i
471+
// get ahold of the radio buttons for toggling wordwrap
472+
const wordwrapRadioFalse = screen.getByRole('radio', {
473+
name: /wordwrap off/i
476474
});
477-
const linewrapRadioTrue = screen.getByRole('radio', {
478-
name: /linewrap on/i
475+
const wordwrapRadioTrue = screen.getByRole('radio', {
476+
name: /wordwrap on/i
479477
});
480478

481479
testToggle(
482-
linewrapRadioTrue,
483-
linewrapRadioFalse,
480+
wordwrapRadioTrue,
481+
wordwrapRadioFalse,
484482
props.setLinewrap,
485483
false
486484
);
@@ -513,7 +511,7 @@ describe('<Preferences />', () => {
513511
});
514512

515513
const generalElement1 = screen.getByRole('radio', {
516-
name: /linewrap on/i
514+
name: /wordwrap on/i
517515
});
518516
expect(generalElement1).toBeInTheDocument();
519517
});

client/modules/IDE/components/Preferences/index.jsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function Preferences() {
3838
tabIndex,
3939
fontSize,
4040
autosave,
41-
linewrap,
41+
wordwrap,
4242
lineNumbers,
4343
lintWarning,
4444
textOutput,
@@ -386,27 +386,27 @@ export default function Preferences() {
386386
<input
387387
type="radio"
388388
onChange={() => dispatch(setLinewrap(true))}
389-
aria-label={t('Preferences.LineWrapOnARIA')}
390-
name="linewrap"
391-
id="linewrap-on"
389+
aria-label={t('Preferences.WordWrapOnARIA')}
390+
name="wordwrap"
391+
id="wordwrap-on"
392392
className="preference__radio-button"
393393
value="On"
394-
checked={linewrap}
394+
checked={wordwrap}
395395
/>
396-
<label htmlFor="linewrap-on" className="preference__option">
396+
<label htmlFor="wordwrap-on" className="preference__option">
397397
{t('Preferences.On')}
398398
</label>
399399
<input
400400
type="radio"
401401
onChange={() => dispatch(setLinewrap(false))}
402-
aria-label={t('Preferences.LineWrapOffARIA')}
403-
name="linewrap"
404-
id="linewrap-off"
402+
aria-label={t('Preferences.WordWrapOffARIA')}
403+
name="wordwrap"
404+
id="wordwrap-off"
405405
className="preference__radio-button"
406406
value="Off"
407-
checked={!linewrap}
407+
checked={!wordwrap}
408408
/>
409-
<label htmlFor="linewrap-off" className="preference__option">
409+
<label htmlFor="wordwrap-off" className="preference__option">
410410
{t('Preferences.Off')}
411411
</label>
412412
</fieldset>

client/modules/IDE/hooks/useP5Version.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export const p5Versions = [
1111
'2.0.2',
1212
'2.0.1',
1313
'2.0.0',
14+
'1.11.7',
15+
'1.11.6',
1416
'1.11.5',
1517
'1.11.4',
1618
'1.11.3',

client/styles/components/_preferences.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.preferences {
44
width: 100%;
5-
width: #{math.div(640, $base-font-size)}rem;
5+
width: #{math.div(720, $base-font-size)}rem;
66
max-width: 100%;
77
max-height: 100%;
88
z-index: 9999;
@@ -21,7 +21,7 @@
2121
}
2222

2323
@media (min-width: 770px) {
24-
max-height: #{math.div(460, $base-font-size)}rem;
24+
max-height: #{math.div(520, $base-font-size)}rem;
2525
}
2626
}
2727

@@ -204,6 +204,12 @@ input[type="number"]::-webkit-outer-spin-button {
204204
font-weight: bold;
205205
}
206206
}
207+
.preference__radio-button:focus + .preference__option,
208+
.preference__radio-button:focus-visible + .preference__option {
209+
outline: 2px solid $dodgerblue;
210+
outline-offset: 2px;
211+
border-radius: 4px;
212+
}
207213

208214
.preference--hidden {
209215
@extend %hidden-element;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.js-web-editor",
3-
"version": "2.16.3",
3+
"version": "2.16.4",
44
"description": "The web editor for p5.js.",
55
"scripts": {
66
"clean": "rimraf dist",

server/domain-objects/createDefaultFiles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ function draw() {
99
export const defaultHTML = `<!DOCTYPE html>
1010
<html lang="en">
1111
<head>
12-
<script src="https://cdn.jsdelivr.net/npm/[email protected].5/lib/p5.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.3/addons/p5.sound.min.js"></script>
12+
<script src="https://cdn.jsdelivr.net/npm/[email protected].7/lib/p5.js"></script>
13+
<script src="https://cdn.jsdelivr.net/npm/p5@1.11.7/lib/addons/p5.sound.min.js"></script>
1414
<link rel="stylesheet" type="text/css" href="style.css">
1515
<meta charset="utf-8" />
1616

translations/locales/be/translations.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@
168168
"AutocompleteHinterOnARIA": "অটোকমপ্লিট হিন্টার চালু",
169169
"AutocompleteHinterOffARIA": "অটোকম",
170170
"WordWrap": "শব্দ বিন্যাস",
171-
"LineWrapOnARIA": "লাইন বিন্যাস অন",
172-
"LineWrapOffARIA": "লাইন বিন্যাস অফ",
171+
"WordWrapOnARIA": "লাইন বিন্যাস অন",
172+
"WordWrapOffARIA": "লাইন বিন্যাস অফ",
173173
"LineNumbers": "লাইন সংখ্যা",
174174
"LineNumbersOnARIA": "লাইন সংখ্যা অন",
175175
"LineNumbersOffARIA": "লাইন সংখ্যা অফ",
@@ -203,7 +203,7 @@
203203
"CodeEditing": "কোড এডিটিং",
204204
"ColorPicker": "ইনলাইন রঙ নির্বাচক দেখান"
205205
},
206-
"General": {
206+
"GeneralSelection": {
207207
"StartSketch": "স্কেচ শুরু",
208208
"StopSketch": "স্কেচ বন্ধ",
209209
"TurnOnAccessibleOutput": "ব্যবহারযোগ্য আউটপুট চালু করুন",

translations/locales/de/translations.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@
159159
"AutocloseBracketsQuotesOnARIA": "Klammern und Anführungszeichen automatisch schließen an",
160160
"AutocloseBracketsQuotesOffARIA": "Klammern und Anführungszeichen automatisch schließen aus",
161161
"WordWrap": "Wortumbruch",
162-
"LineWrapOnARIA": "zeilenumbruch an",
163-
"LineWrapOffARIA": "zeilenumbruch aus",
162+
"WordWrapOnARIA": "zeilenumbruch an",
163+
"WordWrapOffARIA": "zeilenumbruch aus",
164164
"LineNumbers": "Zeilennummerierung",
165165
"LineNumbersOnARIA": "Zeilennummerierung an",
166166
"LineNumbersOffARIA": "Zeilennummerierung aus",
@@ -193,7 +193,7 @@
193193
"FindPreviousTextMatch": "Vorherigen Text-Treffer finden",
194194
"CodeEditing": "Code editieren"
195195
},
196-
"General": {
196+
"GeneralSelection": {
197197
"StartSketch": "Sketch starten",
198198
"StopSketch": "Sketch stoppen",
199199
"TurnOnAccessibleOutput": "Barrierefreie Ausgabe einschalten",

0 commit comments

Comments
 (0)