Skip to content
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

Collection editing revamp #2332

Merged
merged 140 commits into from
Feb 11, 2025
Merged

Collection editing revamp #2332

merged 140 commits into from
Feb 11, 2025

Conversation

emma-sg
Copy link
Member

@emma-sg emma-sg commented Jan 22, 2025

Closes #2328
Closes #2338

Tentatively ready for review...? This is a lot of changes, I'll split them out into sections below.

Changes

This is a fairly broad pass over the collection editing and sharing experience, focusing primarily on being able to edit collections from anywhere you might want to edit them (i.e. not just from within their detail page).

As part of these changes, we've removed the previous "metadata" editing dialog, and moved name, summary, thumbnail selection (detailed further below), and visibility into a new dialog that can be access from the org dashboard and the collections list, in addition to the collection detail pages.

Back-end changes

We've added a new thumbnailSource field to the Collection model, which preserves the page selected to be collection's thumbnail image. As such, we've separated thumbnail selection from initial replay view selection, though you can still use the initial replay view selection dialog to set the thumbnail if you wish. This field is set via three additional optional query parameters when uploading a thumbnail, and is returned to the client as part of the full collection object.

Front-end changes

This PR has changed quite a bit since the start of it & the call & issue that prompted it, I'd initially taken the route of trying to combine all collection editing interfaces into a single dialog, but along the way we figured out that doing so would require either stacked dialogs, which we decided against, or merging the "select archived items" dialog into the editing dialog, which would be a lot more unwieldy state logic to deal with, and potentially confusing options too coming from different places.

There's a few things left to do still:

  • The current share dialog is still used, and still has visibility & thumbnail selection. This should be removed, and turned into just a dialog with url & embed information.
    Completed in 8eb179d
  • The "edit collection" button should maybe be worded differently — or maybe removed entirely? The dialog it opens can be accessed from the inline edit button on the title/summary already, and from sharing settings
  • We might not get to it this release, but it'd be great to have a button for setting the currently visible page in the replay to the initial replay view
    • I am de-scoping this. The current button works well enough for me to be happy releasing it. -HW
  • Various issues when selecting thumbnails — we could exclude pages without thumbnails by excluding uploaded pages, it sounds like? Collection editing revamp #2332 (comment)
    Sort of handled 32078be with better error states & messaging, but could be improved on further
    • Checkmark on page selection input is a little misleading when selecting a page without a thumbnail — checkmark should change to a warning icon
    • Focus the URL field when users click the empty thumbnail in the presentation window
    • For some collections, selecting a page doesn't even show the "no preview" info in the preview — logic there isn't quite right
    • Sometimes selecting a page doesn't cause the thumbnail preview to update at all
  • Rename "about" and "about this collection" to something having more to do specifically with the description
  • Not doing this! -HW, ESG
  • Rename "metadata" to something else (chose "details")
  • Ensure language around "set initial view" is aligned.
  • Add "Update starting URL" checkbox when updating thumbnail source
  • Fix download button (api name changed and needed to be fixed on the front end)
    • Remove public download button from private collection view
  • Update "Collection Settings" button to "Edit Collection Settings" icon button
  • Add "Set Initial View" and "Edit Description" to action menu
  • Remove share button visible when collection is private
  • Have dashboard collection grid show all collections (maybe tab for public only?) — started on this in Allow showing all collections as well as just public ones in org dashboard #2379!
  • Move globe icon on org dashboard back down to Public Collections section
  • Rename "Public Gallery" -> "Public Collections Gallery" @SuaYoo

@emma-sg emma-sg changed the title Combine collection editing into a single modal dialog Collection editing revamp Jan 28, 2025
@SuaYoo SuaYoo self-requested a review February 10, 2025 21:15
@emma-sg emma-sg requested a review from ikreymer February 11, 2025 22:50
Copy link
Member

@ikreymer ikreymer left a comment

Choose a reason for hiding this comment

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

backend changes make sense! Should be good to go!

@emma-sg emma-sg merged commit f8a4425 into main Feb 11, 2025
27 checks passed
@emma-sg emma-sg deleted the frontend-collection-editing-dialog branch February 11, 2025 23:27
ikreymer added a commit that referenced this pull request Feb 12, 2025
ikreymer added a commit that referenced this pull request Feb 12, 2025
#2386)

…r removed

follow up to #2332

Testing:
1. Add or remove an archived item.
2. Switch to Replay view. Collection should reload and update the page
list.
ikreymer added a commit that referenced this pull request Feb 14, 2025
…o optimize loading from correct wacz:

- add 'filename' to PageUrlSnapshot on backend
- add 'filename' in snapshots on frontend
- compute sha-256 of filename (matching wabac.js) and use that as hash
ikreymer added a commit that referenced this pull request Feb 14, 2025
…o optimize loading from correct wacz:

- add 'filename' to PageUrlSnapshot on backend
- add 'filename' in snapshots on frontend
- compute sha-256 of filename (matching wabac.js) and use that as hash
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.

Update collection buttons & actions Collection editing revamp
4 participants