Skip to content

Per 9589 milestone sort#958

Open
cecilia-donnelly wants to merge 2 commits intomainfrom
per-9589-milestone-sort
Open

Per 9589 milestone sort#958
cecilia-donnelly wants to merge 2 commits intomainfrom
per-9589-milestone-sort

Conversation

@cecilia-donnelly
Copy link
Member

@cecilia-donnelly cecilia-donnelly commented Mar 6, 2026

Allow users to display milestones on the public profile either chronologically or reverse chronologically.

I could use some help with making it obvious to the user (1) that this is a button and (2) what the button does. I don't know how to make sure that they understand that they are reordering the milestones on a different screen than the one they are looking at.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.87%. Comparing base (c5d8a43) to head (4828657).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
.../components/profile-edit/profile-edit.component.ts 90.00% 1 Missing ⚠️
src/app/shared/services/api/archive.repo.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #958      +/-   ##
==========================================
+ Coverage   48.69%   48.87%   +0.17%     
==========================================
  Files         350      352       +2     
  Lines       11339    11370      +31     
  Branches     1898     1905       +7     
==========================================
+ Hits         5522     5557      +35     
+ Misses       5627     5620       -7     
- Partials      190      193       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cecilia-donnelly cecilia-donnelly force-pushed the per-9589-milestone-sort branch 4 times, most recently from e8816ac to 0b70012 Compare March 10, 2026 18:00
Add a button on the profile editor to sort milestones chronologically
or reverse chronologically when they appear on the public profile.
@cecilia-donnelly cecilia-donnelly force-pushed the per-9589-milestone-sort branch from 755b2ff to 0f764af Compare March 10, 2026 18:57
@cecilia-donnelly cecilia-donnelly marked this pull request as ready for review March 10, 2026 19:17
@cecilia-donnelly
Copy link
Member Author

Loom for @omnignorant or anyone else: https://www.loom.com/share/c8d1f8f1cf6643c4a49f02e164263750

I should have turned off audio, but you can mute it - there's no narration. Or you can hear me clicking around if you put the sound on. :)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for choosing whether milestones on a public profile are displayed chronologically (oldest-first) or reverse-chronologically (newest-first), with a toggle exposed in the profile edit UI and persisted to the archive via a V2 PATCH.

Changes:

  • Add milestoneSortOrder to ArchiveVO and use it to drive milestone sorting on the public profile.
  • Add a profile-edit toggle button + saving state that PATCHes the archive setting.
  • Add unit tests covering both the public sorting behavior and the toggle behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/app/shared/services/api/archive.repo.ts Adds patchArchive() to persist milestoneSortOrder via PATCH v2/archive/:id.
src/app/public/components/public-profile/public-profile.component.ts Sorts milestones asc/desc based on archive.milestoneSortOrder.
src/app/public/components/public-profile/public-profile.component.spec.ts New tests verifying default/newest-first vs chronological/oldest-first sorting.
src/app/models/archive-vo.ts Adds milestoneSortOrder field to the archive model.
src/app/core/components/profile-edit/profile-edit.component.ts Implements toggleMilestoneOrder() and saving guard flag.
src/app/core/components/profile-edit/profile-edit.component.spec.ts Adds unit tests for toggle behavior and saving flag.
src/app/core/components/profile-edit/profile-edit.component.html Adds reorder button to Milestones section and updates help text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@aasandei-vsp aasandei-vsp left a comment

Choose a reason for hiding this comment

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

Just a small comment.

const newOrder =
this.archive.milestoneSortOrder === 'chronological'
? 'reverse_chronological'
: 'chronological';
Copy link
Contributor

Choose a reason for hiding this comment

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

chronological and reverse_chronological seem to repeat in multiple places. I would create an enum or at least a type for them.

@cecilia-donnelly
Copy link
Member Author

Holding off on this for some design help from @omnignorant.

@omnignorant
Copy link
Member

omnignorant commented Mar 13, 2026

Existing text in the profile editor under the Milestones heading:

  • Milestones capture any significant event in the history of this archive, and are ordered from most recent to least recent.
  • Change to: Milestones capture any significant event in the history this archive represents. Milestones are not sorted below, they appear in the order they are created. Milestones can be set to appear in ascending or descending time order on the Public Gallery page in the Archive Settings.
  • link to archive settings modal if possible.

Design guidance for milestone sort toggle.

  1. as noted in the text above, put this in archive settings > Public Gallery Page Settings, below the type option;
  2. mimic the show download button radio button format;
  3. Bold text (title): Milestone sort order;
  4. Radio button labels: descending | ascending;
  5. help text: Select whether the most recent (descending) or most distant (ascending) milestones at the top of the list.

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.

4 participants