Skip to content

Commit aa439b3

Browse files
authored
Merge branch 'develop' into Issue#2986
2 parents da3f4f3 + d497382 commit aa439b3

File tree

154 files changed

+32195
-30423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+32195
-30423
lines changed

.github/workflows/deploy-staging.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Check out the repo
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323
- name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v1
24+
uses: docker/setup-buildx-action@v2
2525
- name: Login to Docker Hub
26-
uses: docker/login-action@v1
26+
uses: docker/login-action@v2
2727
with:
2828
username: ${{ secrets.DOCKER_USERNAME }}
2929
password: ${{ secrets.DOCKER_PASSWORD }}
3030
- name: Build and push to Docker Hub
31-
uses: docker/build-push-action@v2
31+
uses: docker/build-push-action@v4
3232
with:
3333
context: .
3434
file: ./Dockerfile

.github/workflows/deploy.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Check out the repo
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323
with:
2424
ref: release
2525
- name: Set up Docker Buildx
2626
uses: docker/setup-buildx-action@v2
2727
with:
2828
platforms: linux/amd64,linux/arm64
2929
- name: Login to Docker Hub
30-
uses: docker/login-action@v1
30+
uses: docker/login-action@v2
3131
with:
3232
username: ${{ secrets.DOCKER_USERNAME }}
3333
password: ${{ secrets.DOCKER_PASSWORD }}
3434
- name: Build and push to Docker Hub
35-
uses: docker/build-push-action@v2
35+
uses: docker/build-push-action@v4
3636
with:
3737
context: .
3838
file: ./Dockerfile

.storybook/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const config = {
44
addons: [
55
'@storybook/addon-links',
66
'@storybook/addon-essentials',
7-
'@storybook/addon-interactions'
7+
'@storybook/addon-interactions',
8+
'@storybook/addon-mdx-gfm'
89
],
910
framework: {
1011
name: '@storybook/react-webpack5',

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM node:16.14.2 as base
1+
FROM node:16.14.2 AS base
22
ENV APP_HOME=/usr/src/app \
33
TERM=xterm
44
RUN mkdir -p $APP_HOME
55
WORKDIR $APP_HOME
66
EXPOSE 8000
77
EXPOSE 8002
88

9-
FROM base as development
9+
FROM base AS development
1010
ENV NODE_ENV development
1111
COPY package.json package-lock.json ./
1212
RUN npm install
@@ -18,11 +18,11 @@ COPY translations/locales ./translations/locales
1818
COPY public ./public
1919
CMD ["npm", "start"]
2020

21-
FROM development as build
21+
FROM development AS build
2222
ENV NODE_ENV production
2323
RUN npm run build
2424

25-
FROM base as production
25+
FROM base AS production
2626
ENV NODE_ENV=production
2727
COPY package.json package-lock.json index.js ./
2828
RUN npm install --production

README.md

-18
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,9 @@ Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn mo
2222
If you have found a bug in the p5.js Web Editor, you can file it under the ["issues" tab](https://github.com/processing/p5.js-web-editor/issues). You can also request new features here. A set of templates for reporting issues and requesting features are provided to assist you (and us!). The p5.js Editor is maintained mostly by volunteers, so we thank you for your patience as we try to address your issues as soon as we can. Please post bugs and feature requests in the correct repository if you can:
2323

2424
* p5.js library: [https://github.com/processing/p5.js/issues](https://github.com/processing/p5.js/issues)
25-
* p5.accessibility: [https://github.com/processing/p5.accessibility/issues](https://github.com/processing/p5.accessibility/issues)
26-
* p5.sound: [https://github.com/processing/p5.js-sound/issues](https://github.com/processing/p5.js-sound/issues)
2725
* p5.js website: [https://github.com/processing/p5.js-website/issues](https://github.com/processing/p5.js-website/issues)
2826

2927

30-
### How Do I Know My Issue or Pull Request is Getting Reviewed?
31-
32-
To see which pull requests and issues are currently being reviewed, check the [PR Review Board](https://github.com/processing/p5.js-web-editor/projects/9) or the following Milestones: [MINOR Release](https://github.com/processing/p5.js-web-editor/milestone/8).
33-
34-
Issues and Pull Requests categorized under the PATCH or MINOR Release Milestones will be prioritized since they are planned to be merged for the next release to Production. Please feel free to [comment on this pinned issue](https://github.com/processing/p5.js-web-editor/issues/2534) if you would like your issue to be considered for the next release!
35-
36-
37-
### When Will the Next Production Release Be?
38-
39-
We will aim to deploy on a 1-2 month basis. Here are some dates we’re working towards:
40-
41-
2.11.0 MINOR Release: By January 16, 2023
42-
43-
[You can read more about Semantic Versioning and the differences between a MINOR and PATCH release](https://semver.org/).
44-
45-
4628
## References for Contributing to the p5.js Web Editor
4729

4830
[Code of Conduct](https://editor.p5js.org/code-of-conduct)

client/common/useKeyDownHandlers.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export default function useKeyDownHandlers(keyHandlers) {
3333
const isMac = navigator.userAgent.toLowerCase().indexOf('mac') !== -1;
3434
const isCtrl = isMac ? e.metaKey : e.ctrlKey;
3535
if (e.shiftKey && isCtrl) {
36-
handlers.current[`ctrl-shift-${e.key.toLowerCase()}`]?.(e);
36+
handlers.current[
37+
`ctrl-shift-${
38+
/^\d+$/.test(e.code.at(-1)) ? e.code.at(-1) : e.key.toLowerCase()
39+
}`
40+
]?.(e);
3741
} else if (isCtrl) {
3842
handlers.current[`ctrl-${e.key.toLowerCase()}`]?.(e);
3943
}

client/components/AddRemoveButton.jsx

-32
This file was deleted.

client/components/Dropdown/DropdownMenu.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const DropdownMenu = forwardRef(
3838
};
3939

4040
return (
41-
<div ref={anchorRef} className={className}>
41+
<div ref={anchorRef} className={className} aria-haspopup="menu">
4242
<button
4343
className={classes.button}
4444
aria-label={ariaLabel}
@@ -51,6 +51,7 @@ const DropdownMenu = forwardRef(
5151
</button>
5252
{isOpen && (
5353
<DropdownWrapper
54+
role="menu"
5455
className={classes.list}
5556
align={align}
5657
onMouseUp={() => {

client/components/Dropdown/MenuItem.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function MenuItem({ hideIf, ...rest }) {
1010
}
1111

1212
return (
13-
<li>
13+
<li role="menuitem">
1414
<ButtonOrLink {...rest} />
1515
</li>
1616
);

client/components/Dropdown/TableDropdown.jsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import React from 'react';
2-
import { useMediaQuery } from 'react-responsive';
32
import styled from 'styled-components';
43
import { prop, remSize } from '../../theme';
54
import DropdownMenu from './DropdownMenu';
65

76
import DownFilledTriangleIcon from '../../images/down-filled-triangle.svg';
87
import MoreIconSvg from '../../images/more.svg';
8+
import useIsMobile from '../../modules/IDE/hooks/useIsMobile';
99

1010
const DotsHorizontal = styled(MoreIconSvg)`
1111
transform: rotate(90deg);
1212
`;
1313

1414
const TableDropdownIcon = () => {
15-
// TODO: centralize breakpoints
16-
const isMobile = useMediaQuery({ maxWidth: 770 });
17-
15+
const isMobile = useIsMobile();
1816
return isMobile ? (
1917
<DotsHorizontal focusable="false" aria-hidden="true" />
2018
) : (

client/components/Nav/NavBar.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ function NavBar({ children, className }) {
6969
return (
7070
<NavBarContext.Provider value={contextValue}>
7171
<header>
72-
<nav className={className} ref={nodeRef}>
72+
<div className={className} ref={nodeRef}>
7373
<MenuOpenContext.Provider value={dropdownOpen}>
7474
{children}
7575
</MenuOpenContext.Provider>
76-
</nav>
76+
</div>
7777
</header>
7878
</NavBarContext.Provider>
7979
);

client/components/Nav/NavDropdownMenu.jsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,20 @@ function NavDropdownMenu({ id, title, children }) {
2424

2525
return (
2626
<li className={classNames('nav__item', isOpen && 'nav__item--open')}>
27-
<button {...handlers}>
27+
<button
28+
{...handlers}
29+
role="menuitem"
30+
aria-haspopup="menu"
31+
aria-expanded={isOpen}
32+
>
2833
<span className="nav__item-header">{title}</span>
2934
<TriangleIcon
3035
className="nav__item-header-triangle"
3136
focusable="false"
3237
aria-hidden="true"
3338
/>
3439
</button>
35-
<ul className="nav__dropdown">
40+
<ul className="nav__dropdown" role="menu">
3641
<ParentMenuContext.Provider value={id}>
3742
{children}
3843
</ParentMenuContext.Provider>

client/components/Nav/NavMenuItem.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function NavMenuItem({ hideIf, className, ...rest }) {
1919

2020
return (
2121
<li className={className}>
22-
<ButtonOrLink {...rest} {...handlers} />
22+
<ButtonOrLink {...rest} {...handlers} role="menuitem" />
2323
</li>
2424
);
2525
}

client/components/NavBasic.jsx

-52
This file was deleted.

client/components/OverlayManager.jsx

-26
This file was deleted.

client/components/PreviewNav.jsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ const PreviewNav = ({ owner, project }) => {
1212
<nav className="nav preview-nav">
1313
<div className="nav__items-left">
1414
<div className="nav__item-logo">
15-
<LogoIcon
16-
role="img"
17-
aria-label={t('Common.p5logoARIA')}
18-
focusable="false"
19-
className="svg__logo"
20-
/>
15+
<Link to={`/${owner.username}/sketches`}>
16+
<LogoIcon
17+
role="img"
18+
aria-label={t('Common.p5logoARIA')}
19+
focusable="false"
20+
className="svg__logo"
21+
/>
22+
</Link>
2123
</div>
2224
<Link
2325
className="nav__item"

client/components/RootPage.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ const RootPage = styled.div`
1414
height: 100%;
1515
overflow: hidden;
1616
}
17+
@media print {
18+
@page {
19+
page-orientation: landscape;
20+
}
21+
}
1722
`;
1823

1924
export default RootPage;

0 commit comments

Comments
 (0)