Show the category description hint on the expense creation description field - #101072
Conversation
…n field Co-authored-by: Olly <Ollyws@users.noreply.github.com>
|
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: ✅ pass The No console errors were observed during the run. view run · no recording available |
|
🤖 Android test steps verification results: ✅ pass The No console errors were observed during the run. view run · no recording available |
|
@Ollyws is this ready for review? |
|
@trjExpensify not quite yet. |
|
@MelvinBot add the following tests: Precondition: Steps: |
|
@MelvinBot add markdown support as we have in https://github.com/Expensify/App/blob/main/src/pages/workspace/categories/DynamicCategoryDescriptionHintPage.tsx |
|
Markdown in the hint already renders on both creation-flow spots — so there's nothing to port from the hint page's display path, and I don't want to guess at a change you didn't mean. Can you confirm which of the three real gaps below you're after? Why markdown already works. The hint page stores the admin's markdown as HTML, not as markdown source —
The The three gaps I did find — which one did you mean?
Say the word on any of these and I'll implement it. If you were seeing literal What I couldn't verify this runI wrote the markdown regression test for gap 3 but didn't push it: |
|
@MelvinBot mark as ready to review. |
|
Done — this PR is out of draft and ready for review. Two things left for you:
Every other check on the branch passes. The only failure is I also read your "mark as ready" as closing out the markdown question from my last comment — I made no code change for it. If you did want one of the three gaps I listed there (hint on the read-only row, hint hidden behind the required-field error, or a markdown regression test), say which and I'll push it. |
Reviewer Checklist
Screenshots/Videos |
|
Will finish testing tomorrow. |
|
@MelvinBot why not use usePolicyCategoriesForConfirmation instead of re-implementing that same logic in DynamicIOURequestStepDescription? |
|
@MelvinBot Update the testing steps to exactly the following: |
|
Done — the The template's |
|
@MelvinBot explain why we need the changes in DynamicIOURequestStepDescription... |
|
We don't. You're right to push on it — that file's change fixes nothing reachable, and it should come out. Why it's unnecessary. There are only three places that navigate to the standalone Description step, and none of them is the creation flow:
During creation the description is the inline It's also a small regression risk. Recommendation: revert The one thing lost is a deep link like |
Implement this. |
…ion flow never reaches this step The standalone description step is only reachable with action=EDIT, where the route report is the transaction thread and already inherits the parent policyID. Resolving the policy from the transaction instead risked policy/policyTags/policyCategories disagreeing when passed together to updateMoneyRequestDescription. Co-authored-by: Olly <Ollyws@users.noreply.github.com>
|
Done — I also updated the PR description — the old "Explanation of Change" claimed a second fix in that file, which no longer exists.
One thing I could not re-confirm: I tried re-running your test steps on web after the revert and the test session never came up — it was handed over mid-onboarding and the app rendered a blank page with no accessible nodes, so the tester couldn't reach Workspace > Categories. That's a session/infra failure, not a signal about the PR. The earlier passing web run exercised exactly the code path that remains (the hint on the confirmation-screen Description field comes from |
|
🤖 Still nothing to fix in code — the latest commit is clean. On This has been the only failure on every commit on this branch ( |
|
🚧 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. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.82-0 🚀
|
|
Yes — a help site update is needed, and the draft PR is up: Docs updates for E/A#101072 document category Description hint on expenses. Why: the help site already named Description hint but never said how to set it or where members see it, and the one behavior it implied (the hint appearing on an expense) was exactly what was broken during creation before this PR. What changed (2 files, docs only):
Every label was checked against dev NewDot web rather than the source strings: the category panel row is Description hint, the page's field is labeled Hint with the caption The PR is a draft, labeled @Ollyws, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #101512 was identified to be related to this PR. |
|
This PR failing because of the issue #101519 |
|
Deploy Blocker #101556 was identified to be related to this PR. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.86-0 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.89-0 🚀
Bundle Size Analysis (Sentry): |





























Explanation of Change
A category can define a Description hint, but it never showed up while creating an expense — only when editing an existing one.
In the new manual expense flow the description is a
TextInputrendered byMoneyRequestConfirmationList/sections/DescriptionField.tsx, which was givenlabelandaccessibilityLabelbut nohint, sopolicyCategory.commentHinthad nowhere to render. It now reads the transaction's category (categoryStateSelector, the same selectorCategoryFielduses) and the policy's categories (usePolicyCategoriesForConfirmation, already used byMoneyRequestConfirmationList), and passes the category'scommentHintto the input — mirroring what the standalone description step does.That confirmation-screen input is the entire fix. An earlier revision of this PR also changed how
DynamicIOURequestStepDescriptionresolved the policy it reads categories from, but that standalone step is only ever reached withaction=EDIT, where the route report is the transaction thread and already inherits the parent report'spolicyID— which is why the hint already worked when editing. That change has been reverted, so the file is untouched by this PR.Only the editable input shows the hint. The read-only
MenuItemWithTopDescriptionrow has no hint slot in any flow today, so adding one there would be a product/design change rather than a bug fix.AI tests run locally (all passing):
npm run typecheck,npm run react-compiler-compliance-check check <changed files>, and Jest for the new test plus the related suites (tests/unit/components/MoneyRequestConfirmationList,tests/unit/components/MoneyRequestConfirmationListFooter.test.tsx,tests/ui/components/IOURequestStepConfirmationPageTest.tsx,tests/ui/IOURequestStepDescriptionTest.tsx— 7 suites, 55 tests). A new unit test,tests/unit/components/MoneyRequestConfirmationList/DescriptionField.test.tsx, covers a category with a hint, a category without one, and no category selected.Fixed Issues
$ #100527
PROPOSAL: #100527 (comment)
Tests
Precondition:
Steps:
Offline tests
The hint is read from already-stored Onyx data (
policyCategories[category].commentHint), so it renders while offline as long as the workspace categories have been loaded. Repeat the Tests steps offline after the category hint has been saved and verify the hint still shows on the Description field.QA Steps
Precondition:
Steps:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Verified on dev NewDot web: