Skip to content

Commit e967dfc

Browse files
authored
Merge branch 'develop' into nityam/fix-loop-protect-shader-strings-4080
2 parents a1872ad + a0f91f9 commit e967dfc

23 files changed

Lines changed: 44 additions & 88 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Stay in touch with Processing Foundation across other platforms:
1515
- [Instagram](https://www.instagram.com/p5xjs)
1616
- [Youtube](https://www.youtube.com/@ProcessingFoundation)
1717
- [X](https://x.com/p5xjs)
18-
- [Discord](https://discord.com/invite/esmGA6H6wm)
18+
- [Discord](https://discord.p5js.org)
1919
- [Forum](https://discourse.processing.org)
2020

2121
## Using the p5.js Editor 🤔

client/modules/About/statics/aboutData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const ContactSectionLinks: ContactSectionLink[] = [
1919
{ label: 'About.X', href: 'https://x.com/p5xjs' },
2020
{
2121
label: 'About.Discord',
22-
href: 'https://discord.gg/esmGA6H6wm'
22+
href: 'https://discord.p5js.org'
2323
},
2424
{
2525
label: 'About.Forum',
@@ -87,7 +87,7 @@ export const AboutSectionInfo: AboutSectionInfoSection[] = [
8787
description: 'About.LinkDescriptions.Forum'
8888
},
8989
{
90-
url: 'https://discord.com/invite/esmGA6H6wm',
90+
url: 'https://discord.p5js.org',
9191
title: 'About.DiscordCTA',
9292
description: 'About.LinkDescriptions.Discord'
9393
}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,7 @@ const ProjectMenu = () => {
321321
>
322322
{t('Nav.Help.ReportBug')}
323323
</MenubarItem>
324-
<MenubarItem
325-
id="help-discord"
326-
href="https://discord.com/invite/SHQ8dH25r9"
327-
>
324+
<MenubarItem id="help-discord" href="https://discord.p5js.org">
328325
{t('Nav.Help.ChatOnDiscord')}
329326
</MenubarItem>
330327
<MenubarItem

client/modules/User/components/CollectionItemRow.jsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { useTranslation } from 'react-i18next';
55
import { useDispatch } from 'react-redux';
66
import { removeFromCollection } from '../../IDE/actions/collections';
77
import { formatDateToString } from '../../../utils/formatDate';
8-
import RemoveIcon from '../../../images/close.svg';
9-
import { Tooltip } from '../../../common/Tooltip';
8+
import { TableDropdown } from '../../../components/Dropdown/TableDropdown';
9+
import { MenuItem } from '../../../components/Dropdown/MenuItem';
1010

1111
const CollectionItemRow = ({ collection, item, isOwner }) => {
1212
const { t } = useTranslation();
@@ -47,17 +47,16 @@ const CollectionItemRow = ({ collection, item, isOwner }) => {
4747
<th scope="row">{name}</th>
4848
<td>{formatDateToString(item.createdAt)}</td>
4949
<td>{sketchOwnerUsername}</td>
50-
<td className="collection-row__action-column">
50+
<td className="sketch-list__dropdown-column">
5151
{isOwner && (
52-
<Tooltip content={t('Collection.SketchRemoveARIA')}>
53-
<button
54-
className="collection-row__remove-button"
55-
onClick={handleSketchRemove}
56-
aria-label={t('Collection.SketchRemoveARIA')}
57-
>
58-
<RemoveIcon focusable="false" aria-hidden="true" />
59-
</button>
60-
</Tooltip>
52+
<TableDropdown
53+
aria-label={t('SketchList.ToggleLabelARIA')}
54+
className="collection-item__dropdown"
55+
>
56+
<MenuItem onClick={handleSketchRemove}>
57+
{t('Collection.SketchRemoveLabel')}
58+
</MenuItem>
59+
</TableDropdown>
6160
)}
6261
</td>
6362
</tr>

client/modules/User/components/CollectionItemRow.unit.test.jsx

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import thunk from 'redux-thunk';
33
import configureStore from 'redux-mock-store';
4-
import { reduxRender, screen, fireEvent, act } from '../../../test-utils';
4+
import { reduxRender, screen } from '../../../test-utils';
55
import { initialTestState } from '../../../testData/testReduxStore';
66
import CollectionItemRow from './CollectionItemRow';
77

@@ -56,9 +56,9 @@ describe('<CollectionItemRow />', () => {
5656
expect(screen.getByText('testuser')).toBeInTheDocument();
5757
});
5858

59-
it('shows the remove button when user is the owner', () => {
59+
it('shows the dropdown menu when user is the owner', () => {
6060
subject();
61-
expect(screen.getByRole('button', { name: /remove/i })).toBeInTheDocument();
61+
expect(screen.getByRole('button', { name: /toggle/i })).toBeInTheDocument();
6262
});
6363

6464
describe('when user is not the owner', () => {
@@ -70,24 +70,14 @@ describe('<CollectionItemRow />', () => {
7070
subjectProps = { ...subjectProps, isOwner: true };
7171
});
7272

73-
it('does not show the remove button', () => {
73+
it('does not show the dropdown menu', () => {
7474
subject();
7575
expect(
76-
screen.queryByRole('button', { name: /remove/i })
76+
screen.queryByRole('button', { name: /toggle/i })
7777
).not.toBeInTheDocument();
7878
});
7979
});
8080

81-
it('wraps the remove button with a tooltip', async () => {
82-
subject();
83-
84-
const button = screen.getByRole('button', { name: /remove/i });
85-
await act(async () => {
86-
fireEvent.mouseEnter(button);
87-
});
88-
expect(button).toHaveClass('tooltipped');
89-
});
90-
9181
describe('when the project is deleted', () => {
9282
beforeAll(() => {
9383
subjectProps = {

client/styles/components/_collection.scss

Lines changed: 7 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
padding: #{math.div(24, $base-font-size)}rem #{math.div(66, $base-font-size)}rem;
55
position: relative;
66
flex: 1;
7-
overflow: hidden;
7+
overflow: visible;
88
display: flex;
99
flex-direction:column;
1010

@@ -116,7 +116,7 @@
116116
display: flex;
117117
flex-direction: column;
118118
flex: 1;
119-
overflow: hidden;
119+
overflow: visible;
120120
max-width: #{math.div(1012, $base-font-size)}rem;
121121
margin: 0 auto;
122122
width: 100%;
@@ -127,7 +127,6 @@
127127
}
128128

129129
.collection-table-wrapper {
130-
overflow-y: auto;
131130
max-width: 100%;
132131
min-height: 100%;
133132
}
@@ -145,57 +144,11 @@
145144
font-size: #{math.div(16, $base-font-size)}rem;
146145
}
147146

148-
.collection-row__action-column {
149-
width: #{math.div(60, $base-font-size)}rem;
150-
position: relative;
151-
152-
.tooltip-wrapper {
153-
display: inline-flex;
154-
width: auto;
155-
156-
.tooltipped::after {
157-
right: 0;
158-
left: auto;
159-
}
160-
161-
.tooltipped-n::before,
162-
.tooltipped::before {
163-
right: #{math.div(10, $base-font-size)}rem;
164-
left: auto;
165-
}
147+
.collection-item__dropdown {
148+
& ul {
149+
width: #{math.div(180, $base-font-size)}rem;
150+
top: 74%;
151+
right: calc(100% - 26px);
166152
}
167153
}
168154

169-
.collection-row__remove-button {
170-
display: inline-block;
171-
width:#{math.div(35, $base-font-size)}rem;
172-
height:#{math.div(35, $base-font-size)}rem;
173-
@include icon();
174-
@include themify() {
175-
// icon graphic
176-
path {
177-
fill: getThemifyVariable('table-button-color');
178-
}
179-
180-
// icon background circle
181-
path:first-child {
182-
fill: getThemifyVariable('table-button-background-color');
183-
}
184-
185-
& svg {
186-
width:#{math.div(35, $base-font-size)}rem;
187-
height:#{math.div(35, $base-font-size)}rem;
188-
}
189-
190-
&:hover,
191-
&:focus {
192-
path {
193-
fill: getThemifyVariable('table-button-hover-color');
194-
}
195-
196-
path:first-child {
197-
fill: getThemifyVariable('table-button-background-hover-color');
198-
}
199-
}
200-
}
201-
}

translations/locales/bn/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@
473473
"AddSketch": "স্কেচ যোগ করুন",
474474
"DeleteFromCollection": "{{name_sketch}} কে এই সংগ্রহ থেকে সরাতে চান কি না?",
475475
"SketchDeleted": "স্কেচ ডিলিট হয়েছে",
476+
"SketchRemoveLabel": "Remove from Collection",
476477
"SketchRemoveARIA": "সংগ্রহ থেকে স্কেচ রিমুভ করুন",
477478
"DescriptionPlaceholder": "বর্ণনা যোগ করুন",
478479
"NumSketches": "{{count}} স্কেচ",

translations/locales/de/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@
432432
"AddSketch": "Sketch hinzufügen",
433433
"DeleteFromCollection": "Bist Du sicher, dass Du {{name_sketch}} aus dieser Sammlung entfernen willst?",
434434
"SketchDeleted": "Sketch gelöscht",
435+
"SketchRemoveLabel": "Remove from Collection",
435436
"SketchRemoveARIA": "Sketch aus der Sammlung entfernen",
436437
"DescriptionPlaceholder": "Beschreibung hinzufügen",
437438
"Description": "Beschreibung",

translations/locales/en-US/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@
516516
"DeleteFromCollection": "Are you sure you want to remove {{name_sketch}} from this collection?",
517517
"SketchDeleted": "Sketch deleted",
518518
"SketchRemoveARIA": "Remove sketch from collection",
519+
"SketchRemoveLabel": "Remove from Collection",
519520
"DescriptionPlaceholder": "Add description",
520521
"Description": "description",
521522
"NumSketches": "{{count}} sketch",

translations/locales/es-419/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@
442442
"AddSketch": "Agregar Bosquejo",
443443
"DeleteFromCollection": "¿Estás seguro que quieres remover {{name_sketch}} de esta colección?",
444444
"SketchDeleted": "El bosquejo fue eliminado",
445+
"SketchRemoveLabel": "Remove from Collection",
445446
"SketchRemoveARIA": "Remover bosquejo de la colección",
446447
"DescriptionPlaceholder": "Agregar descripción",
447448
"Description": "descripción",

0 commit comments

Comments
 (0)