Skip to content

Commit f5ff3bd

Browse files
authored
Merge branch 'develop' into refactor/inline-button
2 parents a853847 + e6be67f commit f5ff3bd

36 files changed

+1232
-1778
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Issues and Pull Requests categorized under the PATCH or MINOR Release Milestones
3838

3939
We will aim to deploy on a 1-2 month basis. Here are some dates we’re working towards:
4040

41-
2.11.0 MINOR Release: By January 10, 2023
41+
2.11.0 MINOR Release: By January 16, 2023
4242

4343
[You can read more about Semantic Versioning and the differences between a MINOR and PATCH release](https://semver.org/).
4444

client/constants.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ export const SHOW_EDITOR_OPTIONS = 'SHOW_EDITOR_OPTIONS';
9090
export const CLOSE_EDITOR_OPTIONS = 'CLOSE_EDITOR_OPTIONS';
9191
export const SHOW_KEYBOARD_SHORTCUT_MODAL = 'SHOW_KEYBOARD_SHORTCUT_MODAL';
9292
export const CLOSE_KEYBOARD_SHORTCUT_MODAL = 'CLOSE_KEYBOARD_SHORTCUT_MODAL';
93-
export const SHOW_FUNDRAISER_MODAL = 'SHOW_FUNDRAISER_MODAL';
94-
export const CLOSE_FUNDRAISER_MODAL = 'CLOSE_FUNDRAISER_MODAL';
9593
export const SHOW_TOAST = 'SHOW_TOAST';
9694
export const HIDE_TOAST = 'HIDE_TOAST';
9795
export const SET_TOAST_TEXT = 'SET_TOAST_TEXT';

client/i18n.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import {
1717
zhTW,
1818
uk,
1919
sv,
20-
tr
20+
tr,
21+
enIN
2122
} from 'date-fns/locale';
2223

2324
const fallbackLng = ['en-US'];
@@ -37,12 +38,13 @@ export const availableLanguages = [
3738
'uk-UA',
3839
'zh-CN',
3940
'zh-TW',
40-
'tr'
41+
'tr',
42+
'ur'
4143
];
4244

4345
export function languageKeyToLabel(lang) {
4446
const languageMap = {
45-
be: 'Bengali',
47+
be: 'বাংলা',
4648
de: 'Deutsch',
4749
'en-US': 'English',
4850
'es-419': 'Español',
@@ -56,7 +58,8 @@ export function languageKeyToLabel(lang) {
5658
'uk-UA': 'Українська',
5759
'zh-CN': '简体中文',
5860
'zh-TW': '正體中文',
59-
tr: 'Türkçe'
61+
tr: 'Türkçe',
62+
ur: 'اردو'
6063
};
6164
return languageMap[lang];
6265
}
@@ -77,7 +80,8 @@ export function languageKeyToDateLocale(lang) {
7780
'uk-UA': uk,
7881
'zh-CN': zhCN,
7982
'zh-TW': zhTW,
80-
tr
83+
tr,
84+
ur: enIN
8185
};
8286
return languageMap[lang];
8387
}

client/images/processing-foundation-logo.svg

Lines changed: 0 additions & 1025 deletions
This file was deleted.

client/middleware.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createListenerMiddleware } from '@reduxjs/toolkit';
2+
3+
const listenerMiddleware = createListenerMiddleware();
4+
5+
export default listenerMiddleware;

client/modules/App/App.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
22
import React, { useEffect, useRef, useState } from 'react';
33
import { useDispatch, useSelector } from 'react-redux';
44
import { useLocation } from 'react-router-dom';
5-
import getConfig from '../../utils/getConfig';
5+
import { showReduxDevTools } from '../../store';
66
import DevTools from './components/DevTools';
77
import { setPreviousPath } from '../IDE/actions/ide';
88
import { setLanguage } from '../IDE/actions/preferences';
@@ -52,9 +52,7 @@ const App = ({ children }) => {
5252
return (
5353
<div className="app">
5454
<CookieConsent hide={hide} />
55-
{isMounted &&
56-
!window.devToolsExtension &&
57-
getConfig('NODE_ENV') === 'development' && <DevTools />}
55+
{isMounted && showReduxDevTools() && <DevTools />}
5856
{children}
5957
</div>
6058
);

client/modules/IDE/actions/ide.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,6 @@ export function closeKeyboardShortcutModal() {
184184
};
185185
}
186186

187-
export function showFundraiserModal() {
188-
return {
189-
type: ActionTypes.SHOW_FUNDRAISER_MODAL
190-
};
191-
}
192-
193-
export function closeFundraiserModal() {
194-
return {
195-
type: ActionTypes.CLOSE_FUNDRAISER_MODAL
196-
};
197-
}
198-
199187
export function setUnsavedChanges(value) {
200188
return {
201189
type: ActionTypes.SET_UNSAVED_CHANGES,

client/modules/IDE/components/About.jsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,20 +162,6 @@ function About(props) {
162162
Discord
163163
</a>
164164
</p>
165-
<p className="about__content-column-list">
166-
<a
167-
href="https://p5js.org/download/support.html"
168-
target="_blank"
169-
rel="noopener noreferrer"
170-
>
171-
<AsteriskIcon
172-
className="about__content-column-asterisk"
173-
aria-hidden="true"
174-
focusable="false"
175-
/>
176-
Donate
177-
</a>
178-
</p>
179165
<p className="about__content-column-list">
180166
<Link to="/privacy-policy">
181167
<AsteriskIcon

client/modules/IDE/components/FloatingActionButton.jsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,20 @@ const Button = styled.button`
3838
}
3939
`;
4040

41-
const FloatingActionButton = (props) => {
41+
const FloatingActionButton = ({ syncFileContent, offsetBottom }) => {
4242
const isPlaying = useSelector((state) => state.ide.isPlaying);
4343
const dispatch = useDispatch();
4444

4545
return (
4646
<Button
4747
className={classNames({ stop: isPlaying })}
48-
style={{ paddingLeft: isPlaying ? 0 : remSize(5) }}
48+
style={{
49+
paddingLeft: isPlaying ? 0 : remSize(5),
50+
marginBottom: offsetBottom
51+
}}
4952
onClick={() => {
5053
if (!isPlaying) {
51-
props.syncFileContent();
54+
syncFileContent();
5255
dispatch(startSketch());
5356
} else dispatch(stopSketch());
5457
}}
@@ -59,7 +62,8 @@ const FloatingActionButton = (props) => {
5962
};
6063

6164
FloatingActionButton.propTypes = {
62-
syncFileContent: PropTypes.func.isRequired
65+
syncFileContent: PropTypes.func.isRequired,
66+
offsetBottom: PropTypes.number.isRequired
6367
};
6468

6569
export default FloatingActionButton;

client/modules/IDE/components/FundraiserModal.jsx

Lines changed: 0 additions & 36 deletions
This file was deleted.

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import {
2323
newFile,
2424
newFolder,
2525
openPreferences,
26-
showKeyboardShortcutModal,
27-
showFundraiserModal
26+
showKeyboardShortcutModal
2827
} from '../../actions/ide';
2928
import { logoutUser } from '../../../User/actions';
3029
import { useSketchActions, useWhatPage } from '../../hooks';
@@ -438,9 +437,6 @@ const MoreMenu = () => {
438437
{t('Nav.Help.Reference')}
439438
</NavMenuItem>
440439
<NavMenuItem href="/about">{t('Nav.Help.About')}</NavMenuItem>
441-
<NavMenuItem onClick={() => dispatch(showFundraiserModal())}>
442-
{t('Nav.Fundraiser')}
443-
</NavMenuItem>
444440
</ParentMenuContext.Provider>
445441
</ul>
446442
</div>

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
newFile,
2525
newFolder,
2626
showKeyboardShortcutModal,
27-
showFundraiserModal,
2827
startSketch,
2928
stopSketch
3029
} from '../../actions/ide';
@@ -38,7 +37,6 @@ const Nav = ({ layout }) => (
3837
matches ? (
3938
<NavBar>
4039
<LeftLayout layout={layout} />
41-
<FundraiserSection />
4240
<UserMenu />
4341
</NavBar>
4442
) : (
@@ -87,24 +85,6 @@ const UserMenu = () => {
8785
return null;
8886
};
8987

90-
const FundraiserSection = () => {
91-
const { t } = useTranslation();
92-
const dispatch = useDispatch();
93-
94-
return (
95-
<>
96-
<button
97-
className="nav__fundraiser-btn"
98-
onClick={() => dispatch(showFundraiserModal())}
99-
aria-label="2023-fundraiser-button"
100-
title="2023 Fundraiser Button"
101-
>
102-
{t('Nav.Fundraiser')}
103-
</button>
104-
</>
105-
);
106-
};
107-
10888
const DashboardMenu = () => {
10989
const { t } = useTranslation();
11090
const editorLink = useSelector(selectSketchPath);

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ exports[`Nav renders dashboard version for desktop 1`] = `
3939
</a>
4040
</li>
4141
</ul>
42-
<button
43-
aria-label="2023-fundraiser-button"
44-
class="nav__fundraiser-btn"
45-
title="2023 Fundraiser Button"
46-
>
47-
Support p5.js and the Processing Foundation!
48-
</button>
4942
</nav>
5043
</header>
5144
</DocumentFragment>
@@ -460,13 +453,6 @@ exports[`Nav renders dashboard version for mobile 1`] = `
460453
About
461454
</a>
462455
</li>
463-
<li
464-
class="nav__dropdown-item"
465-
>
466-
<button>
467-
Support p5.js and the Processing Foundation!
468-
</button>
469-
</li>
470456
</ul>
471457
</div>
472458
</div>
@@ -683,13 +669,6 @@ exports[`Nav renders editor version for desktop 1`] = `
683669
</ul>
684670
</li>
685671
</ul>
686-
<button
687-
aria-label="2023-fundraiser-button"
688-
class="nav__fundraiser-btn"
689-
title="2023 Fundraiser Button"
690-
>
691-
Support p5.js and the Processing Foundation!
692-
</button>
693672
</nav>
694673
</header>
695674
</DocumentFragment>
@@ -1104,13 +1083,6 @@ exports[`Nav renders editor version for mobile 1`] = `
11041083
About
11051084
</a>
11061085
</li>
1107-
<li
1108-
class="nav__dropdown-item"
1109-
>
1110-
<button>
1111-
Support p5.js and the Processing Foundation!
1112-
</button>
1113-
</li>
11141086
</ul>
11151087
</div>
11161088
</div>

client/modules/IDE/components/IDEOverlays.jsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { useLocation, useParams } from 'react-router-dom';
55
import Overlay from '../../App/components/Overlay';
66
import {
77
closeKeyboardShortcutModal,
8-
closeFundraiserModal,
98
closePreferences,
109
closeShareModal,
1110
hideErrorModal
@@ -15,7 +14,6 @@ import AddToCollectionList from './AddToCollectionList';
1514
import ErrorModal from './ErrorModal';
1615
import Feedback from './Feedback';
1716
import KeyboardShortcutModal from './KeyboardShortcutModal';
18-
import FundraiserModal from './FundraiserModal';
1917
import NewFileModal from './NewFileModal';
2018
import NewFolderModal from './NewFolderModal';
2119
import Preferences from './Preferences';
@@ -35,7 +33,6 @@ export default function IDEOverlays() {
3533
uploadFileModalVisible,
3634
preferencesIsVisible,
3735
keyboardShortcutVisible,
38-
fundraiserContentVisible,
3936
shareModalVisible,
4037
shareModalProjectId,
4138
shareModalProjectName,
@@ -109,15 +106,6 @@ export default function IDEOverlays() {
109106
<KeyboardShortcutModal />
110107
</Overlay>
111108
)}
112-
{fundraiserContentVisible && (
113-
<Overlay
114-
title={t('Fundraiser.Title')}
115-
ariaLabel={t('Fundraiser.Title')}
116-
closeOverlay={() => dispatch(closeFundraiserModal())}
117-
>
118-
<FundraiserModal />
119-
</Overlay>
120-
)}
121109
{errorType && (
122110
<Overlay
123111
title={t('Common.Error')}

0 commit comments

Comments
 (0)