Skip to content

Replace X button with dropdown menu in CollectionItemRow#4078

Merged
raclim merged 7 commits intoprocessing:developfrom
Nixxx19:nityam/replace-collection-remove-button-with-dropdown
Apr 16, 2026
Merged

Replace X button with dropdown menu in CollectionItemRow#4078
raclim merged 7 commits intoprocessing:developfrom
Nixxx19:nityam/replace-collection-remove-button-with-dropdown

Conversation

@Nixxx19
Copy link
Copy Markdown
Contributor

@Nixxx19 Nixxx19 commented Apr 12, 2026

Issue:

Fixes #3883
Fixes #3881

The "X" button in the Collection sketch list view was confusing — it wasn't clear whether it removed the sketch from the collection or deleted it entirely. This PR replaces it with a dropdown menu consistent with the rest of the editor's UI (e.g., My Sketches, My Collections pages).

Demo:

After: A dropdown menu (▾) matching the style used on the My Sketches and My Collections pages, with a "Remove sketch from collection" option.

Screenshot 2026-04-13 at 1 05 43 AM

Changes:

  • Replaced the RemoveIcon button and Tooltip with TableDropdown and MenuItem components in CollectionItemRow.jsx
  • Added a SketchlistDropdownColumn styled component for consistent positioning with other table dropdowns
  • Removed overflow: hidden from .collection-container and .collection-content to prevent the dropdown from being clipped
  • Removed unused .collection-row__action-column and .collection-row__remove-button styles from _collection.scss
  • Updated unit tests to reflect the new dropdown behavior

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

@raclim
Copy link
Copy Markdown
Collaborator

raclim commented Apr 14, 2026

Thanks so much for the quick turnaround on this! I think the changes here overall look awesome!

I think the only suggested changes I have here are UI-based:

  • Would it be possible to update the text to "Remove from Collection" add title casing, i.e ("Remove From Collection"). Currently, I feel like the text is a bit lengthy, making the dropdown appear a little awkward visually. I'm not entirely sure if shortening the text could help alleviate it, but if it's still wrapping onto the second line, then maybe we could try adjusting the width or margins of the dropdown menu as well?

Please let me know if you have any other thoughts on this as well!

@Nixxx19
Copy link
Copy Markdown
Contributor Author

Nixxx19 commented Apr 14, 2026

Thanks so much for the quick turnaround on this! I think the changes here overall look awesome!

I think the only suggested changes I have here are UI-based:

  • Would it be possible to update the text to "Remove from Collection" add title casing, i.e ("Remove From Collection"). Currently, I feel like the text is a bit lengthy, making the dropdown appear a little awkward visually. I'm not entirely sure if shortening the text could help alleviate it, but if it's still wrapping onto the second line, then maybe we could try adjusting the width or margins of the dropdown menu as well?

Please let me know if you have any other thoughts on this as well!

hey! i can definitely explore both options here either shortening the label or increasing the dropdown width slightly (and adjusting its position) so the text fits on a single line
i’ll put together both versions and share them with you let me know which one you prefer

@Nixxx19
Copy link
Copy Markdown
Contributor Author

Nixxx19 commented Apr 15, 2026

Screenshot 2026-04-15 at 2 33 24 PM Screenshot 2026-04-15 at 2 37 33 PM

hey @raclim, please do let me know which one you like more, thanks!

@raclim
Copy link
Copy Markdown
Collaborator

raclim commented Apr 15, 2026

Thanks so much for the update!

I think I personally like the bottom one better, with the text "Remove from Collection", but please let me know if you might feel otherwise!

@Nixxx19
Copy link
Copy Markdown
Contributor Author

Nixxx19 commented Apr 15, 2026

Thanks so much for the update!

I think I personally like the bottom one better, with the text "Remove from Collection", but please let me know if you might feel otherwise!

i do like that too one, its looks small and better, will push the code for that, thanks!

@Nixxx19
Copy link
Copy Markdown
Contributor Author

Nixxx19 commented Apr 15, 2026

done

"DeleteFromCollection": "Are you sure you want to remove {{name_sketch}} from this collection?",
"SketchDeleted": "Sketch deleted",
"SketchRemoveARIA": "Remove sketch from collection",
"SketchRemoveLabel": "Remove from Collection",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I think these are the last few changes—since this is a new translation key, would you be able to add this to the other translation files to help with tracking changes? You can add in their English translation as a placeholder!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the heads up! added the SketchRemoveLabel key to all locale files as a placeholder with the english value

import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import styled from 'styled-components';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also should've caught this earlier, but would you be able to actually revert the styled-components changes? Since styled-components is currently in maintenance mode, we decided to work towards removing it from the repo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry about that! removed WiderTableDropdown and SketchlistDropdownColumn and replaced them with css classes in _collection.scss and the existing sketch-list dropdown-column class instead

Copy link
Copy Markdown
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick follow up! This looks good to me.

@raclim raclim merged commit ba11aaf into processing:develop Apr 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace "X" Button with Dropdown Menu in CollectionMetadata Updates to Remove Sketch From Collection List Button

2 participants