Repository navigation
Keep multi-level tags in spreadsheet order and disable sorting - #103541
Conversation
Co-authored-by: Bernhard Owen Josephus <bernhardoj@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
🤖 Web test steps verification results: I could not import the multi-level tags CSV on Web because the web test tool cannot upload files, so steps 1–4 are untested (blocked, not failed). The single-level regression check passed: Name still sorts A–Z, the Name header is sortable, and Display is available.
|
|
@MelvinBot Add this to QA Steps
Add "Same as QA Steps" for Tests and Offline Tests |
|
I updated the PR description:
I removed the TODO placeholders and kept the "Verify that no errors appear in the JS console" checkboxes from the template. |
|
@MelvinBot Replace the PR Author Checklist section with below PR Author Checklist
and Screenshots/Videos section with below Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4Then, check all Last, mark this PR as ready for review. You can do it!! |
|
@bernhardoj 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Done. I updated the PR description and marked this PR ready for review:
No unchecked boxes are left in the description. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4 |
trjExpensify
left a comment
There was a problem hiding this comment.
Looks good, thanks for taking care of it! 👍
|
🚧 marcochavezf 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.5.8-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.8-5 🚀
Bundle Size Analysis (Sentry): |






Explanation of Change
Multi-level tag levels should keep the order from the imported spreadsheet, and admins should not be able to re-sort them. The Tags table was sorting them A–Z on open and let admins re-sort them with the Name / Count headers and Display > Sort by.
Changes in
src/components/Tables/WorkspaceTagsTable/index.tsx:sortable: !isMultiLevelTags, and Count (multi-level only) issortable: false. With no sortable column, the existingshouldShowTableDisplaySettingsTriggerhides the Display button on wide and narrow layouts.initialSortColumnis only set tonamefor single-level tags. With no sort column, the sorting middleware returns the rows unchanged, so multi-level levels render in theorderWeightorder thatgetTagListsalready produces. The comparator is left as-is (point 3 of the proposal was dropped per the C+ request).<Table>gets akeybased onisMultiLevelTags.useSortingreadsinitialSortColumnonly on mount, so this remount prevents a stale Name sort when a policy switches between single- and multi-level tags.Single-level tags keep their current behavior.
Note for QA: this intentionally reverses the expected result of #94505 for multi-level tags (Name sorting on independent multi-level tags is now disabled by design).
Added UI tests in
tests/ui/WorkspaceTagsTest.tsxfor independent multi-level tags imported as Charlie, Bravo, Alpha: rows stay in that order, Name/Count headers are disabled, and Display is hidden on wide and narrow layouts. The new tests fail onmain(rows come back alphabetical) and pass with this change.Fixed Issues
$ #103082
PROPOSAL: #103082 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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
web.mp4