Skip to content

Add grid view to collection list #2403

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

Merged
merged 9 commits into from
Apr 23, 2025
Merged

Conversation

emma-sg
Copy link
Member

@emma-sg emma-sg commented Feb 17, 2025

Closes #2498

Yay for consistency!

Changes

Adds a grid view to the collections list, alongside the default list view.

  • Refactors edit dialog into collections-grid-with-edit-dialog component for dashboard — collections list already has its own edit dialog, so no need for this to be duplicated in the grid component
  • Adds getter/setter for page property of pagination component, which fixes the dashboard not switching back to page 1 when switching between "Public" and "All" collection views

Manual testing

  1. On the collections list page, click between "View as Grid" and "View as List" in the toolbar
  2. Verify that pagination, the collection editing dialog, and the action menu works in grid view
  3. On the dashboard in an org with multiple pages of collections, switch to the second page of "All" collections, then switch back to "Public" collections. Verify that the page search param disappears when switching between views.

Screenshots

Page Screenshot
Collection list Screenshot 2025-04-17 at 3 46 55 PM
Collection list (detail) Screenshot 2025-04-17 at 3 46 29 PM

Remaining things to do:

  • Add full actions menu from list view to grid view, instead of just having pencil icon
  • Reuse collection editing dialog from existing list view, instead of the grid view having its own separate dialog instance

emma-sg added 6 commits April 17, 2025 15:23
this makes collection grid simpler: it doesn't include extra editing dialog when not
needed

Extract collection edit dialog into dedicated component

- Move dialog from collections-grid to collections-grid-with-edit-dialog
- Update dashboard page to use new composite component
@emma-sg emma-sg force-pushed the frontend-collection-list-grid branch from b66b482 to 835dd0a Compare April 17, 2025 19:24
@emma-sg emma-sg marked this pull request as ready for review April 17, 2025 19:49
@emma-sg emma-sg requested a review from SuaYoo April 17, 2025 19:49
@emma-sg emma-sg requested a review from SuaYoo April 23, 2025 00:02
Copy link
Member

@SuaYoo SuaYoo left a comment

Choose a reason for hiding this comment

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

Looks great!

@emma-sg emma-sg merged commit 76ab3e7 into main Apr 23, 2025
27 checks passed
@emma-sg emma-sg deleted the frontend-collection-list-grid branch April 23, 2025 18:08
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.

Add grid view to collections list
2 participants