From 01fa2a75bb69747f22123e4295bf9564cd4f9962 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Fri, 27 Jun 2025 12:41:51 -0400 Subject: [PATCH 01/44] temp esc editor key, update open/close file menu aria label --- client/modules/IDE/components/Editor/index.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/Editor/index.jsx b/client/modules/IDE/components/Editor/index.jsx index 90a0b450fb..76bf2f03f2 100644 --- a/client/modules/IDE/components/Editor/index.jsx +++ b/client/modules/IDE/components/Editor/index.jsx @@ -169,6 +169,9 @@ class Editor extends React.Component { }, Enter: 'emmetInsertLineBreak', Esc: 'emmetResetAbbreviation', + [`Shift-${metaKey}-E`]: (cm) => { + cm.getInputField().blur(); + }, [`Shift-Tab`]: false, [`${metaKey}-Enter`]: () => null, [`Shift-${metaKey}-Enter`]: () => null, @@ -552,7 +555,7 @@ class Editor extends React.Component {
+
+ ); +}; + +Banner.propTypes = { + onClose: PropTypes.func.isRequired +}; + +export default Banner; diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index a9cc72f169..2544b21135 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -27,6 +27,7 @@ import { } from '../components/Editor/MobileEditor'; import IDEOverlays from '../components/IDEOverlays'; import useIsMobile from '../hooks/useIsMobile'; +import Banner from '../components/Banner'; import { P5VersionProvider } from '../hooks/useP5Version'; function getTitle(project) { @@ -105,6 +106,7 @@ const IDEView = () => { const [sidebarSize, setSidebarSize] = useState(160); const [isOverlayVisible, setIsOverlayVisible] = useState(false); const [MaxSize, setMaxSize] = useState(window.innerWidth); + const [displayBanner, setDisplayBanner] = useState(true); const cmRef = useRef({}); @@ -171,6 +173,7 @@ const IDEView = () => { {getTitle(project)} + {displayBanner && setDisplayBanner(false)} />} cmRef.current?.getContent()} /> From 882888541fb9196b89121615dab587343815cd22 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Wed, 2 Jul 2025 14:38:06 -0400 Subject: [PATCH 04/44] add styling for banner --- client/styles/components/_banner.scss | 30 +++++++++++++++++++++++++++ client/styles/main.scss | 1 + 2 files changed, 31 insertions(+) create mode 100644 client/styles/components/_banner.scss diff --git a/client/styles/components/_banner.scss b/client/styles/components/_banner.scss new file mode 100644 index 0000000000..6829f933bc --- /dev/null +++ b/client/styles/components/_banner.scss @@ -0,0 +1,30 @@ +.banner { + width: 100%; + min-height: 2.2rem; + text-align: center; + padding: 1rem; + background-color: #DFED33; // yellow from p5.js website + border-bottom: 1px solid #000; + + a { + color: #000; + } + + a:hover { + text-decoration: underline; + } + + @media (max-width: 770px) { + min-height: 3.3rem; + } +} + +.banner-close-button { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 20px; + width:20px; + float: right; +} \ No newline at end of file diff --git a/client/styles/main.scss b/client/styles/main.scss index 91e2d93483..8f97079bdd 100644 --- a/client/styles/main.scss +++ b/client/styles/main.scss @@ -55,6 +55,7 @@ @import 'components/skip-link'; @import 'components/stars'; @import 'components/admonition'; +@import 'components/banner'; @import 'layout/dashboard'; @import 'layout/ide'; From c440b8f1ef999bc6525ba39270669c73061e20c3 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:11:33 -0400 Subject: [PATCH 05/44] 2.16.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18dbabc277..dd3b148bbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "p5.js-web-editor", - "version": "2.16.8", + "version": "2.16.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "p5.js-web-editor", - "version": "2.16.8", + "version": "2.16.9", "license": "LGPL-2.1", "dependencies": { "@auth0/s3": "^1.0.0", diff --git a/package.json b/package.json index 7cb9e89311..8057081a85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p5.js-web-editor", - "version": "2.16.8", + "version": "2.16.9", "description": "The web editor for p5.js.", "scripts": { "clean": "rimraf dist", From 5ed4faf930d2bd5a53b65901d06bad0d39dc7274 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Wed, 2 Jul 2025 18:54:53 -0400 Subject: [PATCH 06/44] update banner text --- client/modules/IDE/components/Banner.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/components/Banner.jsx b/client/modules/IDE/components/Banner.jsx index 69139f31f8..cc4447557b 100644 --- a/client/modules/IDE/components/Banner.jsx +++ b/client/modules/IDE/components/Banner.jsx @@ -26,8 +26,8 @@ const Banner = ({ onClose }) => { const bannerURL = 'https://openprocessing.org/curation/89576'; const bannerCopy = ( <> - We’re accepting p5.js sketches for a special curation exploring the new - features in p5.js 2.0!{' '} + We’re accepting p5.js sketches for a special curation exploring mental + health and the newest features in p5.js 2.0!{' '} Submit by July 13! ); From 2c3a6e11bf6e899724ac490140263c20200c6b53 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Wed, 2 Jul 2025 18:57:09 -0400 Subject: [PATCH 07/44] set default color on hover for banner link --- client/styles/components/_banner.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/styles/components/_banner.scss b/client/styles/components/_banner.scss index 6829f933bc..3bab55ae5b 100644 --- a/client/styles/components/_banner.scss +++ b/client/styles/components/_banner.scss @@ -7,10 +7,11 @@ border-bottom: 1px solid #000; a { - color: #000; + color: $black; } a:hover { + color: $black; text-decoration: underline; } From 9c2d0e2e0008597b00cb3235b92948af09fa7c86 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Wed, 2 Jul 2025 19:37:23 -0400 Subject: [PATCH 08/44] update icon styling --- client/common/icons.jsx | 8 ++++---- client/images/cross.svg | 2 +- client/modules/IDE/components/Banner.jsx | 2 +- client/styles/components/_banner.scss | 9 +++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/client/common/icons.jsx b/client/common/icons.jsx index 1184945dea..668330c400 100644 --- a/client/common/icons.jsx +++ b/client/common/icons.jsx @@ -35,20 +35,20 @@ import Copy from '../images/copy.svg'; function withLabel(SvgComponent) { const StyledIcon = styled(SvgComponent)` &&& { - color: ${prop('Icon.default')}; + color: ${(props) => props.Icon?.default}; & g, & path, & polygon { opacity: 1; - fill: ${prop('Icon.default')}; + fill: ${(props) => props.Icon?.default}; } &:hover { - color: ${prop('Icon.hover')}; + color: ${(props) => props.Icon?.hover}; & g, & path, & polygon { opacity: 1; - fill: ${prop('Icon.hover')}; + fill: ${(props) => props.Icon?.hover}; } } } diff --git a/client/images/cross.svg b/client/images/cross.svg index f84379208a..4fdbf6a715 100644 --- a/client/images/cross.svg +++ b/client/images/cross.svg @@ -1,3 +1,3 @@ - + diff --git a/client/modules/IDE/components/Banner.jsx b/client/modules/IDE/components/Banner.jsx index cc4447557b..02a224387d 100644 --- a/client/modules/IDE/components/Banner.jsx +++ b/client/modules/IDE/components/Banner.jsx @@ -36,7 +36,7 @@ const Banner = ({ onClose }) => { ); diff --git a/client/styles/components/_banner.scss b/client/styles/components/_banner.scss index 3bab55ae5b..ae7eeb724e 100644 --- a/client/styles/components/_banner.scss +++ b/client/styles/components/_banner.scss @@ -8,11 +8,11 @@ a { color: $black; - } - a:hover { - color: $black; - text-decoration: underline; + &:hover { + color: $black; + text-decoration: underline; + } } @media (max-width: 770px) { @@ -28,4 +28,5 @@ height: 20px; width:20px; float: right; + cursor: pointer; } \ No newline at end of file From 00e8c00a122c4afa9ba33e89eb3c2ec1ac400763 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Wed, 2 Jul 2025 19:44:39 -0400 Subject: [PATCH 09/44] update nav snapshots --- .../Header/__snapshots__/Nav.unit.test.jsx.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap b/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap index 2a85f86887..efe1f24ff4 100644 --- a/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap +++ b/client/modules/IDE/components/Header/__snapshots__/Nav.unit.test.jsx.snap @@ -335,7 +335,7 @@ exports[`Nav renders dashboard version for mobile 1`] = ` >