browsertrix/frontend
Emma Segal-Grossman 76ab3e7eaa
Add grid view to collection list (#2403)
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 | <img width="1282" alt="Screenshot 2025-04-17 at 3 46
55 PM"
src="https://github.com/user-attachments/assets/f6dff74f-d56e-48f6-8d44-11b84bacbafb"
/> |
| Collection list (detail) | <img width="165" alt="Screenshot 2025-04-17
at 3 46 29 PM"
src="https://github.com/user-attachments/assets/3442c5e4-a67f-46a2-b475-ee4d3d1e0259"
/> |

---



Remaining things to do:
- [x] Add full actions menu from list view to grid view, instead of just
having pencil icon
- [x] Reuse collection editing dialog from existing list view, instead
of the grid view having its own separate dialog instance
2025-04-23 14:08:50 -04:00
..
.husky
.storybook devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
config
docs devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
lib
patches
public Add basic opengraph & twitter card tags & image to browsertrix root (#2547) 2025-04-08 19:23:26 -04:00
scripts
src Add grid view to collection list (#2403) 2025-04-23 14:08:50 -04:00
tests
xliff Translations update from Hosted Weblate (#2467) (#2471) 2025-03-07 12:40:43 -08:00
.dockerignore devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
.editorconfig
.eslintrc.js devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
.gitignore devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
.prettierignore
.vscode
.yarnrc
00-browsertrix-nginx-init.sh
custom-elements-manifest.config.mjs devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
Dockerfile quickfix: add missing dependency for docs (#2388) 2025-02-12 16:39:06 -05:00
frontend.conf.template misc fixes: cors + disable buffering for uploads (#2395) 2025-02-13 19:38:20 -08:00
index.d.ts
lit-localize.json
minio.conf
package.json devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
playwright.config.ts
postcss.config.js
prettier.config.js devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
README.md
sample.env.local
tailwind.config.js
tsconfig.eslint.json
tsconfig.json devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00
vendor.webpack.config.js
web-test-runner.config.mjs deps: Upgrade main frontend dependencies (#2551) 2025-04-15 13:31:50 -07:00
webpack.config.js Add basic opengraph & twitter card tags & image to browsertrix root (#2547) 2025-04-08 19:23:26 -04:00
webpack.dev.js
webpack.prod.js
yarn.lock devex: Add Storybook for component development (#2556) 2025-04-21 13:06:31 -07:00