Repository navigation
Sort Home page announcements by newest first - #83609
Conversation
The Announcements section on the Home page displayed items oldest-first. Sort by publishedDate descending so the most recent announcements appear at the top. Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
Replace localeCompare with comparison operators in AnnouncementSection to satisfy the prefer-locale-compare-from-context ESLint rule (the sort is at module level where useLocalize is unavailable). Also fix import order in getClipboardTextTest.ts for Prettier. Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
|
Fixed the failing checks:
|
|
The previously failing checks (Prettier check and Changed files ESLint check) were already addressed in commit
|
|
@MelvinBot Mark this as ready for review |
|
@ChavdaSachin Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
PR has been marked as ready for review. ✅ |
|
🚧 @JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
Will test when the adhoc is ready |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/Videos |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #83554 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Looks good BTW, tested the adhoc |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.27-8 🚀
|





Explanation of Change
The Announcements section on the Home page was displaying items in oldest-to-newest order. This change sorts the
CONST.HOME.ANNOUNCEMENTSarray bypublishedDatein descending order usingtoSorted()so that the most recent announcements appear at the top, which is what users expect.Fixed Issues
$ #83554
PROPOSAL: #83554 (comment)
Tests
Offline tests
N/A — Announcements are static data defined in
CONST, not fetched from network. The sort behavior does not depend on network state.QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — Sort order change only, no visual UI changes
Android: mWeb Chrome
N/A — Sort order change only, no visual UI changes
iOS: Native
N/A — Sort order change only, no visual UI changes
iOS: mWeb Safari
N/A — Sort order change only, no visual UI changes
MacOS: Chrome / Safari
N/A — Sort order change only, no visual UI changes