Skip to content

Commit 8029b0e

Browse files
Merge branch 'develop' into run-stop-icon-refactor
2 parents a19e88c + eab6aa4 commit 8029b0e

13 files changed

Lines changed: 77 additions & 17 deletions

File tree

‎.github/ISSUE_TEMPLATE/existing-feature-enhancement.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ body:
1212
- type: textarea
1313
attributes:
1414
label: Feature enhancement details
15+
description: |
16+
If you want to include screenshots or screen recordings, paste them into the markdown editor below.
1517
validations:
1618
required: true

‎.github/ISSUE_TEMPLATE/feature-request.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ body:
1212
- type: textarea
1313
attributes:
1414
label: Feature request details
15+
description: |
16+
If you want to include screenshots or screen recordings, paste them into the markdown editor below.
1517
validations:
1618
required: true

‎.github/ISSUE_TEMPLATE/found-a-bug.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@ body:
3838
- type: textarea
3939
attributes:
4040
label: Actual Behavior
41-
placeholder: What is currently happening.
41+
description: |
42+
Screenshots or screen recordings are preferred if possible. Please paste them into the markdown editor below.
43+
placeholder: What is currently happening. Screenshots or other visuals are appreciated.
4244
validations:
4345
required: true
4446

4547
- type: textarea
4648
attributes:
4749
label: Expected Behavior
4850
description: |
49-
If you want to include screenshots, paste them into the markdown editor below.
51+
If you want to include screenshots or screen recordings, paste them into the markdown editor below.
5052
placeholder: What were you expecting?
5153
validations:
5254
required: true

‎client/modules/IDE/components/FileNode.jsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ const FileNode = ({
231231
if (!canEdit) {
232232
return;
233233
}
234+
if (!isOptionsOpen) {
235+
fileOptionsRef.current?.focus();
236+
}
234237
setIsOptionsOpen(!isOptionsOpen);
235238
};
236239

‎client/modules/IDE/components/Header/MobileNav.jsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { availableLanguages, languageKeyToLabel } from '../../../../i18n';
3333
import { showToast } from '../../actions/toast';
3434
import { setLanguage } from '../../actions/preferences';
3535
import { Overlay } from '../../../App/components/Overlay';
36+
import packageData from '../../../../../package.json';
3637
import ProjectName from './ProjectName';
3738
import CollectionCreate from '../../../User/components/CollectionCreate';
3839

@@ -456,6 +457,11 @@ const MoreMenu = () => {
456457
{t('Nav.Help.Reference')}
457458
</MobileMenuItem>
458459
<MobileMenuItem href="/about">{t('About.Title')}</MobileMenuItem>
460+
<MobileMenuItem
461+
href={`https://github.com/processing/p5.js-web-editor/releases/tag/v${packageData.version}`}
462+
>
463+
{t('Nav.Help.WebEditorVersion', { version: packageData.version })}
464+
</MobileMenuItem>
459465
</ParentMenuContext.Provider>
460466
</ul>
461467
</div>

‎client/modules/IDE/components/Header/Nav.jsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
} from '../../actions/ide';
3030
import { logoutUser } from '../../../User/actions';
3131
import { CmControllerContext } from '../../pages/IDEView';
32+
import packageData from '../../../../../package.json';
3233
import MobileNav from './MobileNav';
3334
import useIsMobile from '../../hooks/useIsMobile';
3435

@@ -334,6 +335,12 @@ const ProjectMenu = () => {
334335
>
335336
{t('Nav.Help.PostOnTheForum')}
336337
</MenubarItem>
338+
<MenubarItem
339+
id="help-web-editor-version"
340+
href={`https://github.com/processing/p5.js-web-editor/releases/tag/v${packageData.version}`}
341+
>
342+
{t('Nav.Help.WebEditorVersion', { version: packageData.version })}
343+
</MenubarItem>
337344
</MenubarSubmenu>
338345
{getConfig('TRANSLATIONS_ENABLED') && <LanguageMenu />}
339346
</ul>

‎client/modules/IDE/components/Header/Nav.unit.test.jsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import Nav from './Nav';
66

77
jest.mock('../../../../utils/generateRandomName');
88

9+
// Mock the editor version so the snapshot stays stable across releases.
10+
// The component reads the real version from package.json at runtime (it bumps
11+
// every release), which would otherwise break these snapshots each release day.
12+
jest.mock('../../../../../package.json', () => ({ version: '1.2.3' }));
13+
914
// mock Menubar
1015
jest.mock('../../../../components/Menubar/Menubar', () => ({
1116
Menubar: ({ children, className = 'nav__menubar' }) => (

‎client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,16 @@ exports[`Nav renders dashboard version for mobile 1`] = `
478478
About
479479
</a>
480480
</li>
481+
<li>
482+
<a
483+
aria-disabled="false"
484+
href="https://github.com/processing/p5.js-web-editor/releases/tag/v1.2.3"
485+
rel="noopener noreferrer"
486+
target="_blank"
487+
>
488+
Web Editor v1.2.3
489+
</a>
490+
</li>
481491
</ul>
482492
</div>
483493
</div>
@@ -659,6 +669,9 @@ exports[`Nav renders editor version for desktop 1`] = `
659669
<li>
660670
Post on the Forum
661671
</li>
672+
<li>
673+
Web Editor v1.2.3
674+
</li>
662675
</ul>
663676
</li>
664677
</ul>
@@ -1090,6 +1103,16 @@ exports[`Nav renders editor version for mobile 1`] = `
10901103
About
10911104
</a>
10921105
</li>
1106+
<li>
1107+
<a
1108+
aria-disabled="false"
1109+
href="https://github.com/processing/p5.js-web-editor/releases/tag/v1.2.3"
1110+
rel="noopener noreferrer"
1111+
target="_blank"
1112+
>
1113+
Web Editor v1.2.3
1114+
</a>
1115+
</li>
10931116
</ul>
10941117
</div>
10951118
</div>

‎client/styles/components/_toast.scss‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,32 @@
55
color: getThemifyVariable('toast-text-color');
66
background-color: getThemifyVariable('toast-background-color');
77
}
8-
padding: #{math.div(10, $base-font-size)}rem;
8+
padding: #{math.div(10, $base-font-size)}rem #{math.div(20, $base-font-size)}rem;
99
position: fixed;
10-
top: 0;
10+
top: #{math.div(20, $base-font-size)}rem;
1111
left: 50%;
12-
transform: translate(-50%, 0);
13-
min-width: #{math.div(375, $base-font-size)}rem; //500px
14-
font-size: #{math.div(20, $base-font-size)}rem;
12+
transform: translateX(-50%);
13+
min-width: #{math.div(360, $base-font-size)}rem;
14+
font-size: #{math.div(16, $base-font-size)}rem;
15+
border-radius: #{math.div(8, $base-font-size)}rem;
1516
display: flex;
16-
z-index: 9999;
1717
align-items: center;
1818
justify-content: space-between;
19+
z-index: 9999;
20+
transition: all 0.3s ease-in-out;
1921
box-shadow: 0 6px 6px 0 rgba(0,0,0,0.10);
2022
}
2123

2224
.toast__close {
2325
@include themify() {
2426
@extend %icon-toast;
2527
}
26-
padding-top: #{math.div(10, $base-font-size)}rem;
27-
margin-left: #{math.div(40, $base-font-size)}rem;
28-
}
28+
padding-top: #{math.div(6, $base-font-size)}rem;
29+
margin-left: #{math.div(24, $base-font-size)}rem;
30+
cursor: pointer;
31+
opacity: 0.7;
32+
33+
&:hover {
34+
opacity: 1;
35+
}
36+
}

‎common/p5Versions.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
export const currentP5Version = '2.3.2';
1+
export const currentP5Version = '2.3.4';
22

33
// Generated from https://www.npmjs.com/package/p5?activeTab=versions
44
// Run this in the console:
55
// JSON.stringify([...document.querySelectorAll('._132722c7')].map(n => n.innerText), null, 2)
66
// TODO: use their API for this to grab these at build time?
77
export const p5Versions = [
8-
{ version: '2.3.3', label: '(Latest)' },
8+
{ version: '2.3.4', label: '(Latest)' },
9+
'2.3.2',
910
'2.3.2',
1011
'2.3.1',
1112
'2.3.0',

0 commit comments

Comments
 (0)