Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI changes on Private sketch feature #3108

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
8099087
Revoke outdated blob urls.
lindapaiste Jun 8, 2023
a418d43
Revoke blob inside setTimeout.
lindapaiste Jun 8, 2023
c1cbdc6
Merge branch 'develop' into fix/revoke-blob
lindapaiste Jun 8, 2023
133c5d9
Convert APIKeyForm to a function component and connect to Redux.
lindapaiste Jul 16, 2023
b3af12d
Merge branch 'develop' into refactor/api-key-form
lindapaiste Jul 16, 2023
ade7d2b
Connect `ShareModal` to Redux.
lindapaiste Jul 26, 2023
966d138
Merge branch 'develop' into refactor/share-modal
lindapaiste Aug 7, 2023
8846d40
Merge branch 'develop' into refactor/share-modal
lindapaiste Aug 7, 2023
bdf8f5e
Merge branch 'release-2.7.3' into release
raclim Aug 16, 2023
813ae96
Merge branch 'develop' into fix/revoke-blob
raclim Aug 30, 2023
d9ad5d9
Merge branch 'release-2.8.0' into release
raclim Oct 18, 2023
fabd0c5
Merge branch 'release-2.9.0' into release
Oct 27, 2023
a4d790a
Merge branch 'release-2.9.1' into release
Oct 31, 2023
b857763
Merge branch 'release-2.9.2' into release
Nov 3, 2023
2c40ce8
Merge branch 'release-2.9.3' into release
Nov 20, 2023
3efa347
Merge remote-tracking branch 'upstream/develop' into refactor/share-m…
lindapaiste Nov 25, 2023
184487f
Merge remote-tracking branch 'upstream/develop' into refactor/api-key…
lindapaiste Nov 25, 2023
d376ad2
Merge branch 'release-2.10.0' into release
Nov 29, 2023
83bc610
Converted about block into all available language
Swarnendu0123 Dec 8, 2023
bc57dea
Lint Fix
Swarnendu0123 Dec 8, 2023
86762d8
some terms added
Swarnendu0123 Dec 8, 2023
f957036
Merge branch 'release-2.10.1' into release
Dec 15, 2023
b8de731
Merge branch 'release-2.10.2' into release
Dec 16, 2023
0230e1e
Merge branch 'develop' into about-fix
Swarnendu0123 Dec 18, 2023
97c2c50
Merge branch 'develop' into about-fix
Swarnendu0123 Dec 25, 2023
f7ae9a1
fix signup issue
sourav-sm Jan 9, 2024
b899d88
Merge branch 'release-2.11.0' into release
raclim Jan 16, 2024
fbe2b91
Merge branch 'develop' into release
raclim Jan 16, 2024
e5f379a
fixed scroll
rahulrangers Jan 19, 2024
a9c11d8
Fix : [#2866] Change width to 100%
Ri-Sharma Jan 20, 2024
72a3986
Merge branch 'develop' into about-fix
Swarnendu0123 Jan 25, 2024
c8fa7c1
Merge branch 'develop' into dev1
raclim Jan 25, 2024
558726e
Merge branch 'develop' into about-fix
Swarnendu0123 Jan 26, 2024
59296b8
Merge branch 'develop' into about-fix
raclim Jan 26, 2024
1216d2b
fixed signup translaton issue
sourav-sm Jan 27, 2024
c0f319e
Merge branch 'develop' into dev1
sourav-sm Jan 27, 2024
98a136c
Merge remote-tracking branch 'origin/dev1' into dev1
sourav-sm Jan 27, 2024
c89a613
Refactor ThemeProvider
adityagarg06 Feb 5, 2024
48c4d97
Refactor loading actions
adityagarg06 Feb 6, 2024
e8aa084
fix/projects.unit.test and reverting changes made in AddToCollectionL…
adityagarg06 Feb 8, 2024
a008d24
Merge branch 'develop' into about-fix
Swarnendu0123 Feb 14, 2024
6b27ea1
Delete unused callback on `isSlugUnique` function.
lindapaiste Feb 14, 2024
07a4b6e
Convert project.controller to async/await syntax.
lindapaiste Feb 15, 2024
40b979c
Fixed #3021
aditya3011ai Feb 15, 2024
fb51be5
Merge branch 'develop' into about-fix
Swarnendu0123 Feb 17, 2024
36d1ab0
Adjustments to error handling, additional comments.
lindapaiste Feb 17, 2024
034c520
Convert user.controller.js to async/await syntax.
lindapaiste Feb 17, 2024
77a628f
Merge branch 'develop' into fixing-bug
lindapaiste Feb 17, 2024
38ba23f
Merge pull request #3026 from aditya3011ai/fixing-bug
lindapaiste Feb 19, 2024
d411771
Fixed SearchBox styling Issue
Feb 19, 2024
e7637de
Merge branch 'develop' into develop
Parikshit2001 Feb 19, 2024
96c5470
Merge pull request #3037 from Parikshit2001/develop
lindapaiste Feb 19, 2024
88f6526
Merge branch 'develop' into refactor/loading
lindapaiste Feb 21, 2024
a9e518c
Merge pull request #2996 from adityagarg06/refactor/loading
lindapaiste Feb 21, 2024
93fd554
Centralised Breakpoints
Keshav-0907 Feb 21, 2024
f78ca67
Merge branch 'develop' into centralising-breakpoints
Keshav-0907 Feb 21, 2024
fd86567
Fixed Passport handles expected errors as exceptions
letscodedanish Feb 24, 2024
1f7427b
Fixed Passport handles expected errors as exceptions
letscodedanish Feb 24, 2024
02ccddd
Merge remote-tracking branch 'letscodedanish/fixed/Passport_handles_e…
lindapaiste Feb 24, 2024
8980fe5
Merge pull request #3050 from letscodedanish/fixed/Passport_handles_e…
lindapaiste Feb 24, 2024
da26b2b
Fix issue where `theme` is undefined in Preferences unit test.
lindapaiste Feb 24, 2024
8018155
Merge branch 'develop' into refactor/themeprovider
lindapaiste Feb 24, 2024
64c36ca
Merge pull request #2994 from adityagarg06/refactor/themeprovider
lindapaiste Feb 24, 2024
c9a220c
2.12.0
raclim Feb 27, 2024
49543b3
Merge branch 'release-2.12.0' into release
raclim Feb 27, 2024
5b5d388
Merge branch 'release-2.12.0' into develop
raclim Feb 27, 2024
03ff33d
Update createDefaultFiles.js to p5.js version 1.9.1
Qianqianye Mar 1, 2024
ecc37e7
Merge pull request #3056 from processing/Qianqianye-patch-1
raclim Mar 1, 2024
f93f4d7
2.12.1
raclim Mar 1, 2024
73f364c
Merge branch 'release-2.12.1' into release
raclim Mar 1, 2024
64525fc
Merge branch 'release-2.12.1' into develop
raclim Mar 1, 2024
1be928c
Merge branch 'develop' into refactor/user.controller
raclim Mar 5, 2024
a36830b
Merge pull request #3032 from lindapaiste/refactor/user.controller
raclim Mar 5, 2024
fd50239
Merge branch 'develop' into cleanup/cb
raclim Mar 8, 2024
47aa8fd
Merge pull request #3022 from lindapaiste/cleanup/cb
raclim Mar 8, 2024
90a5bdb
Merge branch 'develop' into refactor/project.controller
raclim Mar 8, 2024
9db1073
Merge pull request #3025 from lindapaiste/refactor/project.controller
raclim Mar 8, 2024
6a39fe7
Update createDefaultFiles.js to p5.js version 1.9.2
Qianqianye Mar 21, 2024
6f60066
Merge pull request #3063 from processing/Qianqianye-patch-1
raclim Mar 21, 2024
a0d0512
2.12.2
raclim Mar 21, 2024
adf9056
Merge branch 'release-2.12.2' into release
raclim Mar 21, 2024
92a6f05
Merge branch 'release-2.12.2' into develop
raclim Mar 21, 2024
90a7b25
Bump webpack-dev-middleware from 5.3.1 to 5.3.4
dependabot[bot] Mar 24, 2024
a25da50
Merge pull request #3064 from processing/dependabot/npm_and_yarn/webp…
raclim Mar 25, 2024
20b0bce
Merge branch 'develop' into main
raclim Mar 25, 2024
c4de266
Merge pull request #2930 from rahulrangers/main
raclim Mar 25, 2024
d89f115
Modify the REGEX to support .mtl file
deepan190703 Mar 27, 2024
a872415
Fix .mtl file upload
deepan190703 Mar 27, 2024
7647d68
add media query and set overflow to auto
raclim Mar 27, 2024
288a99b
fix .mtl file issue
deepan190703 Mar 28, 2024
7ba2857
Merge branch 'develop' into about-fix
raclim Mar 28, 2024
b27492a
Merge pull request #2699 from Swarnendu0123/about-fix
raclim Mar 28, 2024
c026a36
Merge branch 'develop' into dev1
raclim Mar 28, 2024
b652759
make 's' in 'signing' lowercase
raclim Mar 28, 2024
4f12279
Merge pull request #2875 from sourav-sm/dev1
raclim Mar 28, 2024
414ab18
Merge branch 'develop' into scroll-in-policy-container
raclim Mar 28, 2024
fc4bdbb
fix .mtl file issue
deepan190703 Mar 28, 2024
07ca319
Merge branch 'develop' into deepan190703/fix-.mtl
raclim Mar 28, 2024
54b63f2
minisize
raclim Mar 28, 2024
e11f56a
Merge pull request #3071 from deepan190703/deepan190703/fix-.mtl
raclim Mar 28, 2024
680bffb
Remove outdated info from README.md
raclim Mar 28, 2024
3232034
Merge branch 'develop' into centralising-breakpoints
raclim Mar 29, 2024
5d4c746
Merge branch 'develop' into fix/revoke-blob
raclim Mar 29, 2024
740203b
Merge pull request #2235 from lindapaiste/fix/revoke-blob
raclim Mar 29, 2024
43e9bbe
Merge branch 'develop' into Issue#2866
raclim Mar 29, 2024
7b88f75
set width to max-width for scrollbar placement
raclim Mar 29, 2024
6c108f8
Merge pull request #2932 from Ri-Sharma/Issue#2866
raclim Mar 29, 2024
498f995
Merge branch 'develop' into refactor/share-modal
raclim Mar 29, 2024
1ac9b91
Merge pull request #2328 from lindapaiste/refactor/share-modal
raclim Mar 29, 2024
994b370
Merge branch 'develop' into refactor/api-key-form
raclim Mar 29, 2024
795ae09
Merge pull request #2307 from lindapaiste/refactor/api-key-form
raclim Mar 29, 2024
5486751
Merge branch 'develop' into centralising-breakpoints
raclim Mar 29, 2024
0df9082
Merge pull request #3042 from Keshav-0907/centralising-breakpoints
raclim Mar 29, 2024
b00d2e3
Merge branch 'develop' into scroll-in-policy-container
raclim Apr 1, 2024
f9bd6db
Add links and clarify instructions in `installation.md`
beccyabraham Apr 12, 2024
e90c53c
Create s3_configuration.md
beccyabraham Apr 12, 2024
2c7ceed
Update s3 configuration section to refer to `s3_configuration.md`
beccyabraham Apr 12, 2024
f347a5d
Fix hyperlinks
beccyabraham Apr 12, 2024
44faf23
Fix hyperlink
beccyabraham Apr 12, 2024
229f86c
Merge pull request #3082 from beccyabraham/feature/update-contributor…
raclim Apr 12, 2024
ebb5e3a
Merge branch 'develop' into scroll-in-policy-container
raclim Apr 12, 2024
6e4c816
refactor getUser function to async/await
raclim Apr 23, 2024
616b1fd
refactor mail utils to async/await
raclim Apr 23, 2024
3e06e70
refactor local strategy is passport to async/await
raclim Apr 23, 2024
8022ee1
refactor createUser to async/await
raclim Apr 23, 2024
affaf55
Merge pull request #3093 from processing/fix/editor-crash
raclim Apr 23, 2024
bb7e07e
2.12.3
raclim Apr 23, 2024
dd00029
Merge branch 'release-2.12.3' into release
raclim Apr 23, 2024
264ea8e
Merge branch 'release-2.12.3' into develop
raclim Apr 23, 2024
8e6350c
check if pw exists before calling brcypt, add error msging
raclim Apr 23, 2024
abe1927
Merge pull request #3094 from processing/fix/undefined-password
raclim Apr 23, 2024
1298dea
2.12.4
raclim Apr 23, 2024
f7e0a89
Merge branch 'release-2.12.4' into release
raclim Apr 23, 2024
9d0b539
Merge branch 'release-2.12.4' into develop
raclim Apr 23, 2024
5ab1671
conditionally render change password settings
raclim Apr 23, 2024
b9d9718
Merge pull request #3095 from processing/fix/password-settings
raclim Apr 23, 2024
40c8631
2.12.5
raclim Apr 23, 2024
6f3f5c7
Merge branch 'release-2.12.5' into release
raclim Apr 23, 2024
3c933e9
Merge branch 'release-2.12.5' into develop
raclim Apr 23, 2024
6c83843
Merge branch 'develop' into scroll-in-policy-container
raclim Apr 23, 2024
25c4980
remove min-height for mobile only
raclim Apr 23, 2024
10c843e
change 'none' to 'unset' for min-height
raclim Apr 23, 2024
6c708e1
Merge pull request #3072 from processing/scroll-in-policy-container
raclim Apr 23, 2024
cd1e36c
return false instead of throwing error at comparePassword
raclim Apr 24, 2024
ba794cc
add optional chaining operator for listing s3 objects
raclim Apr 24, 2024
6412f36
update status codes for getSession, clear cookies
raclim Apr 24, 2024
b7daa88
remove clearCookie, affects cookie-consent
raclim Apr 24, 2024
3ee8258
remove null value for user in getSession response
raclim Apr 24, 2024
ce2e83a
exit getUser if user session doesn't exist
raclim Apr 25, 2024
bf324af
only specify if data.user is null, remove extra space
raclim Apr 25, 2024
31d4ded
Merge pull request #3097 from processing/fix/address-outage-issues
raclim Apr 25, 2024
2a26658
2.12.6
raclim Apr 25, 2024
a65572b
Merge branch 'release-2.12.6' into release
raclim Apr 25, 2024
e10ca44
Merge branch 'release-2.12.6' into develop
raclim Apr 25, 2024
42b19f3
remove console error, simply return 'false'
raclim Apr 26, 2024
7bcfde0
return error if there is no user data to serialize
raclim Apr 26, 2024
92c252f
refactor passport routes with clearer errors for no user
raclim Apr 26, 2024
0c30f11
refactor portions related to deleting in aws and project controllers
raclim Apr 26, 2024
f983698
update deleteProject test with async/await syntax
raclim Apr 26, 2024
883ae9a
remove unused argument
raclim Apr 26, 2024
d1be6eb
add comment to remove callback from deleteObjectsFromS3
raclim Apr 26, 2024
19367cb
Merge pull request #3098 from processing/fix/updates-address-outage
raclim Apr 26, 2024
c41d920
2.12.7
raclim Apr 26, 2024
9190d0e
Merge branch 'release-2.12.7' into release
raclim Apr 26, 2024
eda9e3e
Merge branch 'release-2.12.7' into develop
raclim Apr 26, 2024
0c384d4
remove optional cb from findByEmailOrUsername
raclim Apr 26, 2024
d460fbc
add try/catch blocks for sending mail
raclim Apr 26, 2024
1053155
Merge pull request #3099 from processing/fix/timeout-errors
raclim Apr 26, 2024
c804889
2.12.8
raclim Apr 26, 2024
0b6959d
Merge branch 'release-2.12.8' into release
raclim Apr 26, 2024
aa0db22
Merge branch 'release-2.12.8' into develop
raclim Apr 26, 2024
2d6d803
change back findByEmailOrUsername
raclim Apr 27, 2024
c077141
2.12.9
raclim Apr 27, 2024
7212f3f
Merge branch 'release-2.12.9' into release
raclim Apr 27, 2024
7dab896
Merge branch 'release-2.12.9' into develop
raclim Apr 27, 2024
2722c3f
Update deploy-staging.yml for release testing
raclim Apr 29, 2024
8dfb3b8
remove deleteResult variable
raclim Apr 29, 2024
1f687e0
add console logs
raclim Apr 29, 2024
4dcc4aa
remove console logs, change if statement condition
raclim Apr 29, 2024
e2ee3c5
rearrange function
raclim Apr 29, 2024
7c8b9a6
remove try/catch, refactor sending response
raclim Apr 30, 2024
942f248
rearrange line in deleteProject test
raclim Apr 30, 2024
37c853e
update gh workflow
raclim Apr 30, 2024
6ca140e
Update deploy-staging.yml
raclim Apr 30, 2024
ac91d0a
test commit
raclim Apr 30, 2024
9c5cc5c
change back staging workflow to develop branch
raclim Apr 30, 2024
7bce0ed
Merge branch 'develop' into release-delete-sketch
raclim Apr 30, 2024
7526a12
Merge pull request #3105 from processing/release-delete-sketch
raclim Apr 30, 2024
9ad7dae
revert some changes from previous updates to deleteProject
raclim Apr 30, 2024
8dc7b64
Merge pull request #3106 from processing/revert-changes
raclim Apr 30, 2024
f4a8abb
update some methods in user model to async await
raclim Apr 30, 2024
12adbd4
refactor passport to use async/await
raclim Apr 30, 2024
f48253d
update errors for aws controller
raclim Apr 30, 2024
f93132e
update tests for getProjectsForUser to async/await
raclim Apr 30, 2024
801cbb1
reimplement refactor for deleteProjects
raclim Apr 30, 2024
b81ebe0
Merge pull request #3107 from processing/fix/retry-addressing-errors
raclim Apr 30, 2024
c881b67
2.12.10
raclim Apr 30, 2024
b223f5e
Merge branch 'release-2.12.10' into develop
raclim Apr 30, 2024
ae08e56
UI changes
vivekbopaliya May 4, 2024
02726cb
Merge branch 'develop' of https://github.com/processing/p5.js-web-edi…
vivekbopaliya May 4, 2024
70b8df1
snapshots updated
vivekbopaliya May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ If you have found a bug in the p5.js Web Editor, you can file it under the ["iss

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).

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!


### When Will the Next Production Release Be?

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

2.12.0 MINOR Release: By February 27, 2024

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


## References for Contributing to the p5.js Web Editor

Expand Down
4 changes: 0 additions & 4 deletions client/common/icons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import CircleInfo from '../images/circle-info.svg';
import Add from '../images/add.svg';
import Filter from '../images/filter.svg';
import Cross from '../images/cross.svg';
import Lock from '../images/lock.svg';
import UnLock from '../images/unlock.svg';

// HOC that adds the right web accessibility props
// https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html
Expand Down Expand Up @@ -104,5 +102,3 @@ export const CircleFolderIcon = withLabel(CircleFolder);
export const CircleInfoIcon = withLabel(CircleInfo);
export const AddIcon = withLabel(Add);
export const FilterIcon = withLabel(Filter);
export const LockIcon = withLabel(Lock);
export const UnlockIcon = withLabel(UnLock);
6 changes: 2 additions & 4 deletions client/components/Dropdown/TableDropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import React from 'react';
import { useMediaQuery } from 'react-responsive';
import styled from 'styled-components';
import { prop, remSize } from '../../theme';
import DropdownMenu from './DropdownMenu';

import DownFilledTriangleIcon from '../../images/down-filled-triangle.svg';
import MoreIconSvg from '../../images/more.svg';
import useIsMobile from '../../modules/IDE/hooks/useIsMobile';

const DotsHorizontal = styled(MoreIconSvg)`
transform: rotate(90deg);
`;

const TableDropdownIcon = () => {
// TODO: centralize breakpoints
const isMobile = useMediaQuery({ maxWidth: 770 });

const isMobile = useIsMobile();
return isMobile ? (
<DotsHorizontal focusable="false" aria-hidden="true" />
) : (
Expand Down
3 changes: 0 additions & 3 deletions client/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ export const SET_SORT_PARAMS = 'SET_SORT_PARAMS';
export const SET_SEARCH_TERM = 'SET_SEARCH_TERM';
export const CLOSE_SKETCHLIST_MODAL = 'CLOSE_SKETCHLIST_MODAL';

export const START_LOADING = 'START_LOADING';
export const STOP_LOADING = 'STOP_LOADING';

export const START_SAVING_PROJECT = 'START_SAVING_PROJECT';
export const END_SAVING_PROJECT = 'END_SAVING_PROJECT';

Expand Down
2 changes: 0 additions & 2 deletions client/images/lock.svg

This file was deleted.

Binary file removed client/images/lockgif.gif
Binary file not shown.
5 changes: 0 additions & 5 deletions client/images/unlock.svg

This file was deleted.

25 changes: 10 additions & 15 deletions client/modules/App/components/ThemeProvider.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { useSelector } from 'react-redux';
import { ThemeProvider } from 'styled-components';
import theme from '../../../theme';

import theme, { Theme } from '../../../theme';

const Provider = ({ children, currentTheme }) => (
<ThemeProvider theme={{ ...theme[currentTheme] }}>{children}</ThemeProvider>
);
const Provider = ({ children }) => {
const currentTheme = useSelector((state) => state.preferences.theme);
return (
<ThemeProvider theme={{ ...theme[currentTheme] }}>{children}</ThemeProvider>
);
};

Provider.propTypes = {
children: PropTypes.node.isRequired,
currentTheme: PropTypes.oneOf(Object.keys(Theme)).isRequired
children: PropTypes.node.isRequired
};

function mapStateToProps(state) {
return {
currentTheme: state.preferences.theme
};
}

export default connect(mapStateToProps)(Provider);
export default Provider;
2 changes: 1 addition & 1 deletion client/modules/IDE/actions/assets.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import apiClient from '../../../utils/apiClient';
import * as ActionTypes from '../../../constants';
import { startLoader, stopLoader } from './loader';
import { startLoader, stopLoader } from '../reducers/loading';
import { assetsActions } from '../reducers/assets';

const { setAssets, deleteAsset } = assetsActions;
Expand Down
6 changes: 3 additions & 3 deletions client/modules/IDE/actions/collections.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import browserHistory from '../../../browserHistory';
import apiClient from '../../../utils/apiClient';
import * as ActionTypes from '../../../constants';
import { startLoader, stopLoader } from './loader';
import { startLoader, stopLoader } from '../reducers/loading';
import { setToastText, showToast } from './toast';

const TOAST_DISPLAY_TIME_MS = 1500;
Expand Down Expand Up @@ -80,7 +80,7 @@ export function addToCollection(collectionId, projectId) {

const collectionName = response.data.name;

dispatch(setToastText(`Added to "${collectionName}`));
dispatch(setToastText(`Added to "${collectionName}"`));
dispatch(showToast(TOAST_DISPLAY_TIME_MS));

return response.data;
Expand Down Expand Up @@ -110,7 +110,7 @@ export function removeFromCollection(collectionId, projectId) {

const collectionName = response.data.name;

dispatch(setToastText(`Removed from "${collectionName}`));
dispatch(setToastText(`Removed from "${collectionName}"`));
dispatch(showToast(TOAST_DISPLAY_TIME_MS));

return response.data;
Expand Down
9 changes: 0 additions & 9 deletions client/modules/IDE/actions/loader.js

This file was deleted.

4 changes: 2 additions & 2 deletions client/modules/IDE/actions/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export function deleteProject(id) {
};
}

export function changeVisibility(projectId, visibility) {
export function changeVisibility(projectId, projectName, visibility) {
return (dispatch) =>
apiClient
.patch('/project/visibility', { projectId, visibility })
Expand All @@ -423,7 +423,7 @@ export function changeVisibility(projectId, visibility) {
payload: { visibility: response.data.visibility }
});

dispatch(setToastText(`Sketch is ${newVisibility}`));
dispatch(setToastText(`The ${projectName} is now ${newVisibility}!`));
dispatch(showToast(2000));
})
.catch((error) => {
Expand Down
2 changes: 1 addition & 1 deletion client/modules/IDE/actions/projects.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import apiClient from '../../../utils/apiClient';
import * as ActionTypes from '../../../constants';
import { startLoader, stopLoader } from './loader';
import { startLoader, stopLoader } from '../reducers/loading';

// eslint-disable-next-line
export function getProjects(username) {
Expand Down
5 changes: 3 additions & 2 deletions client/modules/IDE/actions/projects.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { rest } from 'msw';

import * as ProjectActions from './projects';
import * as ActionTypes from '../../../constants';
import { startLoader, stopLoader } from '../reducers/loading';
import {
initialTestState,
mockProjects
Expand Down Expand Up @@ -33,9 +34,9 @@ describe('projects action creator tests', () => {
store = mockStore(initialTestState);

const expectedActions = [
{ type: ActionTypes.START_LOADING },
{ type: startLoader.type },
{ type: ActionTypes.SET_PROJECTS, projects: mockProjects },
{ type: ActionTypes.STOP_LOADING }
{ type: stopLoader.type }
];

return store
Expand Down
14 changes: 14 additions & 0 deletions client/modules/IDE/components/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ function About(props) {
{t('About.Discord')}
</a>
</p>
<p className="about__content-column-list">
<a
href="https://p5js.org/download/support.html"
target="_blank"
rel="noopener noreferrer"
>
<AsteriskIcon
className="about__content-column-asterisk"
aria-hidden="true"
focusable="false"
/>
Donate
</a>
</p>
<p className="about__content-column-list">
<Link to="/privacy-policy">
<AsteriskIcon
Expand Down
2 changes: 1 addition & 1 deletion client/modules/IDE/components/Editor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class Editor extends React.Component {
mode = 'application/json';
} else if (fileName.match(/.+\.(frag|glsl)$/i)) {
mode = 'x-shader/x-fragment';
} else if (fileName.match(/.+\.(vert|stl)$/i)) {
} else if (fileName.match(/.+\.(vert|stl|mtl)$/i)) {
mode = 'x-shader/x-vertex';
} else {
mode = 'text/plain';
Expand Down
51 changes: 47 additions & 4 deletions client/modules/IDE/components/Header/MobileNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { setLanguage } from '../../actions/preferences';
import Overlay from '../../../App/components/Overlay';
import ProjectName from './ProjectName';
import CollectionCreate from '../../../User/components/CollectionCreate';
import { changeVisibility } from '../../actions/project';

const Nav = styled(NavBar)`
background: ${prop('MobilePanel.default.background')};
Expand Down Expand Up @@ -75,6 +76,13 @@ const Title = styled.div`
margin: 0;
}

> section {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
}

> h5 {
font-size: ${remSize(13)};
font-weight: normal;
Expand Down Expand Up @@ -203,6 +211,7 @@ const LanguageSelect = styled.div`
const MobileNav = () => {
const project = useSelector((state) => state.project);
const user = useSelector((state) => state.user);
const dispatch = useDispatch();

const { t } = useTranslation();

Expand All @@ -228,19 +237,53 @@ const MobileNav = () => {
}

const title = useMemo(resolveTitle, [pageName, project.name]);
const userIsOwner = user?.username === project.owner?.username;

const Logo = AsteriskIcon;

const toggleVisibility = (e) => {
try {
const isChecked = e.target.checked;

dispatch(
changeVisibility(
project.id,
project.name,
isChecked ? 'Private' : 'Public'
)
);
} catch (error) {
console.log(error);
}
};
return (
<Nav>
<LogoContainer>
<Logo />
</LogoContainer>
<Title>
<h1>{title === project.name ? <ProjectName /> : title}</h1>
{project?.owner && title === project.name && (
<h5>by {project?.owner?.username}</h5>
)}
<h1>{title === project?.name ? <ProjectName /> : title}</h1>
{(() => {
if (project?.owner && title === project.name && userIsOwner) {
return (
<main className="toolbar__makeprivate">
<p>Private</p>
<input
className="toolbar__togglevisibility"
type="checkbox"
onChange={toggleVisibility}
defaultChecked={project.visibility === 'Private'}
/>
</main>
);
}
if (project?.owner && title === project.name) {
return <h5>by {project?.owner?.username}</h5>;
}
return null;
})()}
</Title>

{/* check if the user is in login page */}
{pageName === 'login' || pageName === 'signup' ? (
// showing the CrossIcon
Expand Down
28 changes: 13 additions & 15 deletions client/modules/IDE/components/Header/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { sortBy } from 'lodash';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next';
import MediaQuery from 'react-responsive';
import NavDropdownMenu from '../../../../components/Nav/NavDropdownMenu';
import NavMenuItem from '../../../../components/Nav/NavMenuItem';
import { availableLanguages, languageKeyToLabel } from '../../../../i18n';
Expand All @@ -30,21 +29,20 @@ import {
import { logoutUser } from '../../../User/actions';
import { CmControllerContext } from '../../pages/IDEView';
import MobileNav from './MobileNav';
import useIsMobile from '../../hooks/useIsMobile';

const Nav = ({ layout }) => (
<MediaQuery minWidth={770}>
{(matches) =>
matches ? (
<NavBar>
<LeftLayout layout={layout} />
<UserMenu />
</NavBar>
) : (
<MobileNav />
)
}
</MediaQuery>
);
const Nav = ({ layout }) => {
const isMobile = useIsMobile();

return isMobile ? (
<MobileNav />
) : (
<NavBar>
<LeftLayout layout={layout} />
<UserMenu />
</NavBar>
);
};

Nav.propTypes = {
layout: PropTypes.oneOf(['dashboard', 'project'])
Expand Down
Loading
Loading