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",

translations/locales/en-US/translations.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@
201201
"AutocompleteHinterOnARIA": "autocomplete hinter on",
202202
"AutocompleteHinterOffARIA": "autocomplete hinter off",
203203
"WordWrap": "Word Wrap",
204-
"LineWrapOnARIA": "linewrap on",
205-
"LineWrapOffARIA": "linewrap off",
204+
"WordWrapOnARIA": "wordwrap on",
205+
"WordWrapOffARIA": "wordwrap off",
206206
"LineNumbers": "Line numbers",
207207
"LineNumbersOnARIA": "line numbers on",
208208
"LineNumbersOffARIA": "line numbers off",
@@ -251,11 +251,13 @@
251251
"ColorPicker": "Show Inline Color Picker",
252252
"CreateNewFile": "Create New File"
253253
},
254-
"General": {
254+
"General": "General",
255+
"GeneralSelection": {
255256
"StartSketch": "Start Sketch",
256257
"StopSketch": "Stop Sketch",
257258
"TurnOnAccessibleOutput": "Turn On Accessible Output",
258-
"TurnOffAccessibleOutput": "Turn Off Accessible Output"
259+
"TurnOffAccessibleOutput": "Turn Off Accessible Output",
260+
"Reference": "Go to Reference for Selected Item in Hinter"
259261
}
260262
},
261263
"Sidebar": {

translations/locales/es-419/translations.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
"Settings": "Configuración",
139139
"GeneralSettings": "Configuración general",
140140
"Accessibility": "Accesibilidad",
141+
"LibraryManagement": "Gestión de biblioteca",
141142
"Theme": "Modo de visualización",
142143
"LightTheme": "Claro",
143144
"LightThemeARIA": "Modo de visualización claro activado",
@@ -159,8 +160,8 @@
159160
"Off": "Desactivar",
160161
"AutosaveOffARIA": "Grabado automático desactivado",
161162
"WordWrap": "Ajuste automático de línea",
162-
"LineWrapOnARIA": "Ajuste automático de línea activado",
163-
"LineWrapOffARIA": "Ajuste automático de línea desactivado",
163+
"WordWrapOnARIA": "Ajuste automático de línea activado",
164+
"WordWrapOffARIA": "Ajuste automático de línea desactivado",
164165
"LineNumbers": "Número de línea",
165166
"LineNumbersOnARIA": "Número de línea activado",
166167
"LineNumbersOffARIA": "Número de línea desactivado",
@@ -174,7 +175,13 @@
174175
"PlainText": "Texto sin formato",
175176
"TextOutputARIA": "Salida de texto activado",
176177
"TableText": "Tablero de texto",
177-
"TableOutputARIA": "Salida de tablero activado"
178+
"TableOutputARIA": "Salida de tablero activado",
179+
"LibraryVersion": "p5.js Versión",
180+
"LibraryVersionInfo": "Aquí hay una [nueva versión 2.0](https://github.com/processing/p5.js/releases/) ¡Ya está disponible la versión p5.js! Se convertirá en la predeterminada en agosto de 2026, así que aprovecha este tiempo para probarla y reportar errores. ¿Te interesa migrar tus bocetos de la versión 1.x a la 2.0? Mira el [recursos de compatibilidad y transición.](https://github.com/processing/p5.js-compatibility)",
181+
"SoundAddon": "p5.sound.js Add-on Biblioteca",
182+
"PreloadAddon": "p5.js 1.x Compatibility Add-on Biblioteca — Precarga",
183+
"ShapesAddon": "p5.js 1.x Compatibility Add-on Biblioteca — formas",
184+
"DataAddon": "p5.js 1.x Compatibility Add-on Biblioteca — Estructuras de datos"
178185
},
179186
"KeyboardShortcuts": {
180187
"Title": " Atajos de teclado",
@@ -193,7 +200,7 @@
193200
"FindPreviousTextMatch": "Encontrar la ocurrencia previa de texto",
194201
"CodeEditing": "Editando Código"
195202
},
196-
"General": {
203+
"GeneralSelection": {
197204
"StartSketch": "Iniciar bosquejo",
198205
"StopSketch": "Detener bosquejo",
199206
"TurnOnAccessibleOutput": "Activar salida accesible",

translations/locales/fr-CA/translations.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
"Settings": "Paramètres",
140140
"GeneralSettings": "Paramètres généraux",
141141
"Accessibility": "Accessibilité",
142+
"LibraryManagement": "Gestion de bibliothèque",
142143
"Theme": "Thème",
143144
"LightTheme": "Clair",
144145
"LightThemeARIA": "Thème clair activé",
@@ -160,8 +161,8 @@
160161
"AutocloseBracketsQuotesOnARIA": "fermeture automatique des crochets et des guillemets activée",
161162
"AutocloseBracketsQuotesOffARIA": "fermeture automatique des crochets et des guillemets désactivée",
162163
"WordWrap": "Retour à la ligne automatique",
163-
"LineWrapOnARIA": "retour à la ligne automatique activé",
164-
"LineWrapOffARIA": "retour à la ligne automatique désactivé",
164+
"WordWrapOnARIA": "retour à la ligne automatique activé",
165+
"WordWrapOffARIA": "retour à la ligne automatique désactivé",
165166
"LineNumbers": "Numéros de lignes",
166167
"LineNumbersOnARIA": "numéros de lignes activés",
167168
"LineNumbersOffARIA": "numéros de lignes désactivés",
@@ -176,6 +177,12 @@
176177
"TextOutputARIA": "sortie texte activée",
177178
"TableText": "Tableau de texte",
178179
"TableOutputARIA": "sortie tableau de texte activée",
180+
"LibraryVersion": "Version de p5.js",
181+
"LibraryVersionInfo": "Une [nouvelle version 2.0](https://github.com/processing/p5.js/releases/) de p5.js est disponible ! Elle deviendra la version par défaut en août 2026, alors profitez de ce temps pour la tester et signaler les bogues. Intéressé à migrer vos esquisses de 1.x vers 2.0 ? Consultez les [ressources de compatibilité et de transition.](https://github.com/processing/p5.js-compatibility)",
182+
"SoundAddon": "p5.sound.js Add-on Bibliothèque",
183+
"PreloadAddon": "p5.js 1.x Compatibility Add-on Bibliothèque — Préchargement",
184+
"ShapesAddon": "p5.js 1.x Compatibility Add-on Bibliothèque — Formes",
185+
"DataAddon": "p5.js 1.x Compatibility Add-on Bibliothèque — Structures de données",
179186
"Sound": "Son",
180187
"SoundOutputARIA": "sortie son activée"
181188
},
@@ -196,7 +203,7 @@
196203
"FindPreviousTextMatch": "Correspondance texte précédente",
197204
"CodeEditing": "Édition de code"
198205
},
199-
"General": {
206+
"GeneralSelection": {
200207
"StartSketch": "Exécuter le croquis",
201208
"StopSketch": "Arrêter le croquis",
202209
"TurnOnAccessibleOutput": "Activer la sortie accessible",

0 commit comments

Comments
 (0)