Fix all-empty column sort reordering rows and flipping between asc/desc#95022
Conversation
|
@ahmedGaber93 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] |
trjExpensify
left a comment
There was a problem hiding this comment.
@shawnborton @dannymcclain just confirming our expectation here. The column in question is empty, so we flip asc/desc but that effectively does nothing to the table because it's empty. We cool with that? I think it's probably fine vs. say disabling the click on an empty column?
|
Yeah I don't feel strongly... I guess in an ideal world, if the column truly has no data, you shouldn't be able to sort on it, but I don't know how hard that would be to pull off. But I'm happy to go with what is in the PR for now. |
|
I feel the same as Shawn 👍 |
|
Works for me! |
| expect(ascendingResult.map((item) => ('transactionID' in item ? item.transactionID : undefined))).toEqual(inputOrder); | ||
| expect(descendingResult.map((item) => ('transactionID' in item ? item.transactionID : undefined))).toEqual(inputOrder); | ||
| }); | ||
|
|
There was a problem hiding this comment.
@mukhrr can we also add a unit test to confirm (Reimbursable/Billable) columns still tie-break by created and this PR not blocking the exist behaviour.
|
@mukhrr, could you please update the QA steps and confirm that this issue is a large-screen web only? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-07-03.at.7.25.55.AM.mov |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…ated Reimbursable/Billable resolve to a non-empty "yes"/"no" sort value, so the empty-guard added for Expensify#94893 is skipped and the created/transactionID tie breaker still runs and still honors sortOrder. This locks in that the fix does not regress the boolean-column behavior added in Expensify#77800. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ahmedGaber93 I don't think it's possible to enable empty columns in OP for mobile since there is no table |
Yes, I just meant to mention this in the test steps. Tests
QA stepsSame as Test step |
Ah yes, thanks. Updated now |
|
@ahmedGaber93 i think we are good to go ? |
|
🚧 JS00001 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. |
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.4.28-0 🚀
|
|
🤖 Help site review: no changes required. This PR fixes an internal bug in the Search table's sort logic ( This is a bug fix to a tie-breaker edge case, not a new or changed user-facing feature, tab, setting, or button. Expensify's help site ( No draft docs PR was created since no documentation change is warranted. @mukhrr, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.28-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #94893
PROPOSAL: #93146 (comment)
Tests
Verify sort order doesn't change in table
Verify that no errors appear in the JS console
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
The same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
REC-20260701095655.mp4