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

feat: Update collection sorting & metadata #2324

Merged
merged 18 commits into from
Jan 22, 2025

Conversation

SuaYoo
Copy link
Member

@SuaYoo SuaYoo commented Jan 21, 2025

Follows #2327, should be rebased and merged afterwards

Changes

  • Refactors dashboard and org profile preview to use private API endpoint, to fix public collections not showing the org visibility is hidden
  • Enables sorting collections by dateLatest, sorts public collections by dateLatest by default
  • Enables sorting collections by page count
  • Shows collection period (i.e. dateEarliest to dateLatest) in collections list
  • Shows same collection metadata in private and public views, updates private view info bar
  • Fixes "Update Org Profile" action item showing for crawler roles

Manual testing

Requires running both backend and frontend locally.

  1. Log in to org with public collections as an org admin
  2. Go to org settings
  3. Make org visibility private
  4. Go to org dashboard. Verify public collections are shown in "Public Collections" section
  5. Click "Public Collections" section action overflow button -> "Preview Public Profile". Verify public collections are shown
  6. Click "Go to Settings"
  7. Update org visibility to be visible
  8. Click "Preview public profile page". Verify collections are ordered by collection period year

Screenshots

Page Image/video
Collections Screenshot 2025-01-21 at 3 53 30 PM
Collections Screenshot 2025-01-21 at 3 53 33 PM
Collection (private) Screenshot 2025-01-21 at 3 47 17 PM
Collection (private & public ) Screenshot 2025-01-21 at 3 47 01 PM

@SuaYoo SuaYoo marked this pull request as ready for review January 21, 2025 00:52
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

Nice! Fixed the backend typing and added "description" (as well as "caption", don't see a downside to allowing more options here) back to the backend sorting options as the related test was broken, otherwise looks great!

@SuaYoo SuaYoo marked this pull request as draft January 21, 2025 21:20
@SuaYoo
Copy link
Member Author

SuaYoo commented Jan 21, 2025

Put back into draft to merge after #2327

@SuaYoo SuaYoo changed the base branch from main to issue-2326-page-snapshot-counts January 21, 2025 21:20
@SuaYoo SuaYoo force-pushed the update-collection-sorting branch from 6ea3b27 to d410a42 Compare January 21, 2025 21:21
@SuaYoo SuaYoo force-pushed the update-collection-sorting branch from d410a42 to e28a8ee Compare January 21, 2025 23:42
@SuaYoo SuaYoo changed the title feat: Update collection sorting feat: Update collection sorting & metadata Jan 21, 2025
@SuaYoo SuaYoo marked this pull request as ready for review January 21, 2025 23:56
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.

Looks good!

@ikreymer ikreymer merged commit 273648b into issue-2326-page-snapshot-counts Jan 22, 2025
27 checks passed
@ikreymer ikreymer deleted the update-collection-sorting branch January 22, 2025 02:11
SuaYoo added a commit that referenced this pull request Jan 22, 2025
- Fixes #2321
- Resolves #2323

Follows #2327, should be
rebased and merged afterwards

## Changes

- Refactors dashboard and org profile preview to use private API
endpoint, to fix public collections not showing the org visibility is
hidden
- Enables sorting collections by `dateLatest`, sorts public collections
by `dateLatest` by default
- Enables sorting collections by page count
- Shows collection period (i.e. `dateEarliest` to `dateLatest`) in
collections list
- Shows same collection metadata in private and public views, updates
private view info bar
- Fixes "Update Org Profile" action item showing for crawler roles





<!-- ## Follow-ups -->

---------

Co-authored-by: Tessa Walsh <[email protected]>
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 collections sort parameters Use private API endpoint for public collections in dashboard
3 participants