Skip to content

Commit 42e1a78

Browse files
committed
Merge branch 'release-2.18.1' into release
2 parents b201533 + ae49fe5 commit 42e1a78

Some content is hidden

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

74 files changed

+2042
-943
lines changed

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"tsx": "never"
3030
}
3131
],
32+
"import/prefer-default-export": "off",
3233
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }],
3334
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
3435
"default-param-last": 0,
@@ -41,6 +42,7 @@
4142
"no-restricted-exports": 1,
4243
"no-underscore-dangle": 0,
4344
"no-useless-catch": 2,
45+
"no-plusplus": "off",
4446
"prefer-object-spread": 0,
4547
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
4648
"max-classes-per-file": 0,
@@ -131,7 +133,9 @@
131133
"rules": {
132134
"no-use-before-define": "off",
133135
"import/no-extraneous-dependencies": "off",
134-
"no-unused-vars": "off"
136+
"no-unused-vars": "off",
137+
"import/no-default-export": "warn",
138+
"no-underscore-dangle": "warn",
135139
}
136140
},
137141
{

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"insertPragma": false,
66
"jsxBracketSameLine": false,
77
"jsxSingleQuote": false,
8-
"parser": "babel",
98
"printWidth": 80,
109
"proseWrap": "never",
1110
"requirePragma": false,

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ We are a community of, and in solidarity with, people from every gender identity
1010

1111
Learn more about [our community](https://p5js.org/community/) and read our [Community Statement and Code of Conduct](./.github/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by [donating to the Processing Foundation](https://processingfoundation.org/support).
1212

13+
Stay in touch with Processing Foundation across other platforms:
14+
- [Instagram](https://www.instagram.com/p5xjs)
15+
- [Youtube](https://www.youtube.com/@ProcessingFoundation)
16+
- [X](https://x.com/p5xjs)
17+
- [Discord](https://discord.com/invite/esmGA6H6wm)
18+
- [Forum](https://discourse.processing.org)
19+
20+
1321
## Using the p5.js Editor 🤔
1422

1523
Make your first sketch in the [p5.js Editor](https://editor.p5js.org/)! Learn more about sketching with p5.js on the [Get Started](https://p5js.org/tutorials/get-started/) and find everything you can do in the [Reference](https://p5js.org/reference/). You can also look at [examples](https://editor.p5js.org/p5/sketches) and remix them in the p5.js Editor.

client/common/useKeyDownHandlers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { mapKeys } from 'lodash';
22
import PropTypes from 'prop-types';
33
import { useCallback, useEffect, useRef } from 'react';
4+
import { isMac } from '../utils/device';
45

56
/**
67
* Attaches keydown handlers to the global document.
@@ -30,8 +31,7 @@ export default function useKeyDownHandlers(keyHandlers) {
3031
*/
3132
const handleEvent = useCallback((e) => {
3233
if (!e.key) return;
33-
const isMac = navigator.userAgent.toLowerCase().indexOf('mac') !== -1;
34-
const isCtrl = isMac ? e.metaKey : e.ctrlKey;
34+
const isCtrl = isMac() ? e.metaKey : e.ctrlKey;
3535
if (e.shiftKey && isCtrl) {
3636
handlers.current[
3737
`ctrl-shift-${

client/components/SkipLink.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { render, screen, fireEvent } from '@testing-library/react';
22
import React from 'react';
33
import { useTranslation } from 'react-i18next';
44
import '@testing-library/jest-dom';
5-
import SkipLink from './SkipLink';
5+
import { SkipLink } from './SkipLink';
66

77
jest.mock('react-i18next', () => ({
88
useTranslation: () => ({

client/components/SkipLink.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import React, { useState } from 'react';
22
import classNames from 'classnames';
33
import { useTranslation } from 'react-i18next';
44

5-
type SkipLinkProps = {
6-
targetId: string,
7-
text: string
8-
};
5+
interface SkipLinkProps {
6+
targetId: string;
7+
text: string;
8+
}
99

10-
const SkipLink = ({ targetId, text }: SkipLinkProps) => {
10+
export const SkipLink = ({ targetId, text }: SkipLinkProps) => {
1111
const [focus, setFocus] = useState(false);
1212
const { t } = useTranslation();
1313
const handleFocus = () => {
@@ -30,5 +30,3 @@ const SkipLink = ({ targetId, text }: SkipLinkProps) => {
3030
</a>
3131
);
3232
};
33-
34-
export default SkipLink;

client/i18n.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { initReactI18next } from 'react-i18next';
33
import Backend from 'i18next-http-backend';
44

55
import {
6-
be,
6+
bn,
77
enUS,
88
es,
99
ja,
@@ -21,12 +21,12 @@ import {
2121
enIN
2222
} from 'date-fns/locale';
2323

24-
import getPreferredLanguage from './utils/language-utils';
24+
import { getPreferredLanguage } from './utils/language-utils';
2525

2626
const fallbackLng = ['en-US'];
2727

2828
export const availableLanguages = [
29-
'be',
29+
'bn',
3030
'de',
3131
'en-US',
3232
'es-419',
@@ -61,7 +61,7 @@ if (
6161

6262
export function languageKeyToLabel(lang) {
6363
const languageMap = {
64-
be: 'বাংলা',
64+
bn: 'বাংলা',
6565
de: 'Deutsch',
6666
'en-US': 'English',
6767
'es-419': 'Español',
@@ -83,7 +83,7 @@ export function languageKeyToLabel(lang) {
8383

8484
export function languageKeyToDateLocale(lang) {
8585
const languageMap = {
86-
be,
86+
bn,
8787
de,
8888
'en-US': enUS,
8989
'es-419': es,

client/index.jsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Routing from './routes';
99
import ThemeProvider from './modules/App/components/ThemeProvider';
1010
import Loader from './modules/App/components/loader';
1111
import './i18n';
12-
import SkipLink from './components/SkipLink';
12+
import { SkipLink } from './components/SkipLink';
1313

1414
require('./styles/main.scss');
1515

@@ -34,6 +34,31 @@ const script = document.createElement('script');
3434
script.src = 'https://foundation-donate-banner.netlify.app/static/js/main.js';
3535
document.body.appendChild(script);
3636

37+
if (window.location.href.indexOf('full') === -1) {
38+
const buttonScript = document.createElement('script');
39+
buttonScript.type = 'text/javascript';
40+
buttonScript.defer = true;
41+
buttonScript.id = 'donorbox-popup-button-installer';
42+
buttonScript.src = 'https://donorbox.org/install-popup-button.js';
43+
44+
buttonScript.setAttribute(
45+
'data-href',
46+
'https://donorbox.org/back-to-school-805292'
47+
);
48+
buttonScript.setAttribute(
49+
'data-style',
50+
// eslint-disable-next-line max-len
51+
'background: #f1678e; color: #fff; text-decoration: none; font-family: Verdana, sans-serif; display: flex; gap: 8px; width: fit-content; font-size: 16px; border-radius: 0 0 5px 5px; line-height: 24px; position: fixed; top: 50%; transform-origin: center; z-index: 9999; overflow: hidden; padding: 8px 22px 8px 18px; right: 20px; left: auto; transform: translate(50%, -50%) rotate(90deg)'
52+
);
53+
buttonScript.setAttribute('data-button-cta', 'Donate');
54+
buttonScript.setAttribute(
55+
'data-img-src',
56+
'https://donorbox.org/images/white_logo.svg'
57+
);
58+
59+
document.body.appendChild(buttonScript);
60+
}
61+
3762
const App = () => (
3863
<div>
3964
<Router history={browserHistory}>

client/modules/About/statics/aboutData.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const ContactSectionLinks = [
1414
{ label: 'About.X', href: 'https://x.com/p5xjs' },
1515
{
1616
label: 'About.Discord',
17-
href: 'https://discord.gg/SHQ8dH25r9'
17+
href: 'https://discord.gg/esmGA6H6wm'
1818
},
1919
{
2020
label: 'About.Forum',
@@ -82,7 +82,7 @@ export const AboutSectionInfo = [
8282
description: 'About.LinkDescriptions.Forum'
8383
},
8484
{
85-
url: 'https://discord.com/invite/SHQ8dH25r9',
85+
url: 'https://discord.com/invite/esmGA6H6wm',
8686
title: 'About.DiscordCTA',
8787
description: 'About.LinkDescriptions.Discord'
8888
}

client/modules/IDE/actions/assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import apiClient from '../../../utils/apiClient';
1+
import { apiClient } from '../../../utils/apiClient';
22
import * as ActionTypes from '../../../constants';
33
import { startLoader, stopLoader } from '../reducers/loading';
44
import { assetsActions } from '../reducers/assets';

0 commit comments

Comments
 (0)