Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 72b060d

Browse files
authored
Merge branch 'develop' into translating-donate-link-from-react
2 parents 0015d21 + f98e7d6 commit 72b060d

File tree

15 files changed

+5627
-1327
lines changed

15 files changed

+5627
-1327
lines changed

‎client/modules/About/pages/About.jsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const About = () => {
5252

5353
const p5version = useSelector((state) => {
5454
const index = state.files.find((file) => file.name === 'index.html');
55-
return index?.content.match(/\/p5\.js\/([\d.]+)\//)?.[1];
55+
return index?.content.match(/\/p5@([\d.]+)\//)?.[1];
5656
});
5757

5858
return (

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

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -442,43 +442,44 @@ 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 });
449-
450-
// get ahold of the radio buttons for toggling wordwrap
451-
const wordwrapRadioFalse = screen.getByRole('radio', {
445+
// TODO: Consolidate "linewrap" (reference from backend/User model) and "word wrap" (currently used in UI) into consistent naming.
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', {
452453
name: /wordwrapoff/i
453454
});
454-
const wordwrapRadioTrue = screen.getByRole('radio', {
455+
const linewrapRadioTrue = screen.getByRole('radio', {
455456
name: /wordwrapon/i
456457
});
457458

458459
testToggle(
459-
wordwrapRadioFalse,
460-
wordwrapRadioTrue,
460+
linewrapRadioFalse,
461+
linewrapRadioTrue,
461462
props.setLinewrap,
462463
true
463464
);
464465
});
465466
});
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 });
467+
describe('start linewrap at true', () => {
468+
it('linewrap toggle, starting at true', () => {
469+
// render the component with linewrap prop set to true
470+
subject({ linewrap: true });
470471

471-
// get ahold of the radio buttons for toggling wordwrap
472-
const wordwrapRadioFalse = screen.getByRole('radio', {
472+
// get ahold of the radio buttons for toggling linewrap
473+
const linewrapRadioFalse = screen.getByRole('radio', {
473474
name: /wordwrapoff/i
474475
});
475-
const wordwrapRadioTrue = screen.getByRole('radio', {
476+
const linewrapRadioTrue = screen.getByRole('radio', {
476477
name: /wordwrapon/i
477478
});
478479

479480
testToggle(
480-
wordwrapRadioTrue,
481-
wordwrapRadioFalse,
481+
linewrapRadioTrue,
482+
linewrapRadioFalse,
482483
props.setLinewrap,
483484
false
484485
);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default function Preferences() {
4343
tabIndex,
4444
fontSize,
4545
autosave,
46-
wordwrap,
46+
linewrap,
4747
lineNumbers,
4848
lintWarning,
4949
textOutput,
@@ -398,7 +398,7 @@ export default function Preferences() {
398398
id="wordwrap-on"
399399
className="preference__radio-button"
400400
value="On"
401-
checked={wordwrap}
401+
checked={linewrap}
402402
/>
403403
<label htmlFor="wordwrap-on" className="preference__option">
404404
{t('Preferences.On')}
@@ -411,7 +411,7 @@ export default function Preferences() {
411411
id="wordwrap-off"
412412
className="preference__radio-button"
413413
value="Off"
414-
checked={!wordwrap}
414+
checked={!linewrap}
415415
/>
416416
<label htmlFor="wordwrap-off" className="preference__option">
417417
{t('Preferences.Off')}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /