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

fix(MWPW-147600): stabilize date sorting for cards with identical dates #210

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

sanrai
Copy link
Collaborator

@sanrai sanrai commented Dec 4, 2024

Fixed an issue where cards with identical dates would shift positions when clicking the sort dropdown without changing the sort option. Added a secondary sort using card IDs to ensure stable ordering when dates are identical.

Problem:

  • Cards with the same date were sorting inconsistently when the sort dropdown was toggled
  • The unstable sorting created a jarring user experience with cards shifting positions unnecessarily

Solution:

  • Added card ID as a secondary sort key when dates are identical
  • Updated unit tests to explicitly test sorting stability
  • Maintained existing sort behavior for cards with different dates

Testing:

  • Verified cards with identical dates maintain consistent order
  • Confirmed existing sort behavior works correctly for different dates
  • Updated unit tests pass with explicit stability checks

Ticket: https://jira.corp.adobe.com/browse/MWPW-147600

@sanrai sanrai changed the title Potential fix for cards with same date fix(MWPW-147600): potential fix for cards with same date Dec 4, 2024
@sanrai sanrai changed the title fix(MWPW-147600): potential fix for cards with same date fix(MWPW-147600): stabilize date sorting for cards with identical dates Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Core Web Vitals Metrics

Metric Value
LCP 10638.90 s
FID 0.70 ms
CLS N/A

Recorded at: 2024-12-04T02:58:05.667Z
PR: #210

Copy link

github-actions bot commented Dec 4, 2024

Core Web Vitals Metrics

Metric Value
LCP 11457.50 s
FID 0.90 ms
CLS N/A

Recorded at: 2024-12-04T02:58:20.186Z
PR: #210

Copy link

github-actions bot commented Dec 4, 2024

Core Web Vitals Metrics

Metric Value
LCP 10390.50 s
FID 0.90 ms
CLS N/A

Recorded at: 2024-12-04T03:00:06.079Z
PR: #210

Copy link

github-actions bot commented Dec 4, 2024

Core Web Vitals Metrics

Metric Value
LCP 10680.30 s
FID 0.80 ms
CLS N/A

Recorded at: 2024-12-04T03:01:39.053Z
PR: #210

Copy link

github-actions bot commented Dec 4, 2024

Core Web Vitals Metrics

Metric Value
LCP 10535.80 s
FID 0.80 ms
CLS N/A

Recorded at: 2024-12-04T03:09:16.230Z
PR: #210

Copy link

Core Web Vitals Metrics

Metric Value
LCP 10431.90 s
FID 0.80 ms
CLS N/A

Recorded at: 2024-12-12T22:24:41.006Z
PR: #210

@sanrai sanrai merged commit b1d13d1 into main Dec 12, 2024
13 checks passed
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.

2 participants