Skip to content

Commit cb502dd

Browse files
authored
Merge branch 'develop' into dependabot/npm_and_yarn/lodash-4.17.23
2 parents 5c2e37f + fd809bf commit cb502dd

12 files changed

Lines changed: 56 additions & 28 deletions

File tree

client/modules/About/pages/About.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const About = () => {
167167
<a
168168
href="https://github.com/processing/p5.js-web-editor/releases"
169169
target="_blank"
170-
rel="noreferrer"
170+
rel="noopener noreferrer"
171171
>
172172
{t('About.WebEditor')}: <span>v{packageData?.version}</span>
173173
</a>
@@ -176,7 +176,7 @@ export const About = () => {
176176
<a
177177
href="https://github.com/processing/p5.js/releases"
178178
target="_blank"
179-
rel="noreferrer"
179+
rel="noopener noreferrer"
180180
>
181181
p5.js: <span>v{p5version}</span>
182182
</a>

client/modules/IDE/actions/assets.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export function getAssets() {
3030
export function deleteAssetRequest(assetKey) {
3131
return async (dispatch) => {
3232
try {
33-
await apiClient.delete(`/S3/${assetKey}`);
33+
const path = assetKey.split('/').pop();
34+
await apiClient.delete(
35+
`/S3/delete?objectKey=${encodeURIComponent(path)}`
36+
);
3437
dispatch(deleteAsset(assetKey));
3538
} catch (error) {
3639
dispatch({

client/modules/IDE/components/AssetListRow.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const AssetMenu = ({ item: asset }) => {
2222
return (
2323
<TableDropdown aria-label={t('AssetList.ToggleOpenCloseARIA')}>
2424
<MenuItem onClick={handleAssetDelete}>{t('AssetList.Delete')}</MenuItem>
25-
<MenuItem href={asset.url} target="_blank">
25+
<MenuItem href={asset.url} target="_blank" rel="noopener noreferrer">
2626
{t('AssetList.OpenNewTab')}
2727
</MenuItem>
2828
</TableDropdown>

client/modules/IDE/components/Preferences/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default function Preferences() {
118118
const markdownComponents = useMemo(() => {
119119
// eslint-disable-next-line react/no-unstable-nested-components
120120
const ExternalLink = ({ children, ...props }) => (
121-
<a {...props} target="_blank">
121+
<a {...props} target="_blank" rel="noopener noreferrer">
122122
{children}
123123
</a>
124124
);
@@ -618,7 +618,7 @@ export default function Preferences() {
618618
<legend className="preference__warning">
619619
<a
620620
target="_blank"
621-
rel="noreferrer"
621+
rel="noopener noreferrer"
622622
href={`https://${
623623
versionInfo.isVersion2 ? 'beta.' : ''
624624
}p5js.org/reference/p5.sound`}

client/modules/IDE/components/QuickAddList/QuickAddList.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const Item = ({ isAdded, onSelect, name, url }) => {
3737
className="quick-add__item-view"
3838
to={url}
3939
target="_blank"
40+
rel="noopener noreferrer"
4041
onClick={(e) => e.stopPropagation()}
4142
>
4243
{t('QuickAddList.View')}

client/modules/IDE/components/show-hint.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,15 @@ import CodeMirror from 'codemirror';
323323
return `<div class="hint-container">${hintHTML}</div>`;
324324
}
325325
}
326-
326+
327+
327328
function getInlineHintSuggestion(cm, focus, token) {
328329
let tokenLength = token.string.length;
329330
if (token.string === '.') {
330331
tokenLength -= 1;
331332
}
332333
const name = focus.item?.text;
334+
333335
const suggestionItem = focus.item;
334336
// builds the remainder of the suggestion excluding what user already typed
335337
const baseCompletion = `<span class="inline-hinter-suggestion">${suggestionItem.text.slice(

contributor_docs/preparing_a_pull_request.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,17 @@ Then ask git about the latest changes.
5151
git status
5252

5353
## Pull Request Templates
54-
Once you've opened your pull request, please ensure that you follow the guidelines.
54+
55+
Once you've opened your pull request, please ensure that you follow the guidelines **and verify the following before submitting for review:**
56+
57+
- ✅ Your code has no linting errors (`npm run lint`)
58+
- ✅ All tests pass successfully (`npm run test`)
59+
- ✅ Your branch name is unique and based off the latest `develop` branch
60+
- ✅ The pull request title and description clearly describe the change
61+
- ✅ Your pull request links to the related issue number (e.g., `Fixes #1234`)
62+
- ✅ Screenshots or videos are included if the change affects the user interface
63+
64+
Following these steps helps maintain code quality and makes it easier for maintainers to review and merge your contribution.
5565

5666
## CONFLICTS
5767
You may have some conflicts! It's okay. Feel free to ask for help. If merging with the latest upstream `develop` branch causes conflicts, you can always make a pull request with the upstream repository, which makes the merge conflicts public.

contributor_docs/styling.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Style Guide
2+
3+
Currently in progress.
4+
5+
---
6+
Additional Resources:
7+
- [Zeplin File with Official Colors](google.com/url?q=https://github.com/processing/p5.js-web-editor/wiki/Color-Combinations-for-Accessibility&sa=D&source=docs&ust=1769528946688435&usg=AOvVaw2626esAvAi1JMEjarRcDcT)
8+
- [Accessible Links Color Combinations](https://scene.zeplin.io/project/55f746c54a02e1e50e0632c3)
9+
10+
Tips when making styling contributions:
11+
- Define color specifications and other design tokens as CSS custom properties (e.g. `--var(primary-color)`) instead of hard coded values like HEX, RGB ..etc.
12+
- Ensure your changes only affect what you intend. For example, review what uses a variable before modifying it to avoid unintended changes.
13+
- Before creating a new CSS, check for utility classes and variables that provide styling you need.

package-lock.json

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/controllers/aws.controller.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ export async function deleteObjectsFromS3(keyList) {
6565
}
6666

6767
export async function deleteObjectFromS3(req, res) {
68-
const { objectKey, userId } = req.params;
69-
const fullObjectKey = userId ? `${userId}/${objectKey}` : objectKey;
68+
const userId = req.user.id;
69+
const { objectKey } = req.query;
70+
const fullObjectKey = `${userId}/${objectKey}`;
7071

7172
try {
7273
await deleteObjectsFromS3([fullObjectKey]);

0 commit comments

Comments
 (0)