-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[CP Staging] Render description as text in the reports page #69451
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
Conversation
|
@parasharrajat 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] |
|
@rushatgabhane @grgia One of you needs to 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeScreen.Recording.2025-08-28.at.9.31.35.PM.moviOS: HybridAppScreen.Recording.2025-08-28.at.9.09.21.PM.movScreen.Recording.2025-08-28.at.9.07.48.PM.moviOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.16.Pro.-.2025-08-28.at.20.58.06.mp4MacOS: Chrome / SafariScreen.Recording.2025-08-28.at.8.50.36.PM.movScreen.Recording.2025-08-28.at.8.32.00.PM.movMacOS: DesktopScreen.Recording.2025-08-28.at.9.22.45.PM.movScreen.Recording.2025-08-28.at.9.22.06.PM.mov |
Reports - Long expense description is not truncated #69402this is still reproducible
|
|
@youssef-lr please 👀 on jest test failing |
Expense - Expenses are not sorted after clicking on Description table header #69403this one is also still reproducible Screen.Recording.2025-08-28.at.7.41.40.PM.mov |
grgia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@youssef-lr would you update the QA steps?
Also can you confirm this PR will not cause additional blockers?
Yeah this concerns only the reports table view where we never showed the description on its own before. |
|
I'm not really sure what to do with this one #69451 (comment). I'm thinking to only grab the first line of a multi line description for now. |
| const text = useMemo(() => { | ||
| if (!isDescription) { | ||
| return merchantOrDescription; | ||
| } | ||
| return Parser.replace(merchantOrDescription, {shouldEscapeText: false}); | ||
| }, [merchantOrDescription, shouldRenderAsHTML]); | ||
| return Parser.htmlToText(merchantOrDescription); | ||
| }, [merchantOrDescription, isDescription]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const text = useMemo(() => {
if (!isDescription) {
return merchantOrDescription;
}
let value = Parser.htmlToText(merchantOrDescription)
return value.replace(/\n/g, ' ');
}, [merchantOrDescription, isDescription]);
Screen.Recording.2025-08-28.at.8.12.46.PM.mov
@youssef-lr should we replace \n with " " ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one! yes I like that.
|
Regarding the sorting by description in th report view. It looks tricky because in the report view we have access to raw transactions and not the ones from the Reports page that come from the Search API. They do not have "description", the description is in the |
|
ok fixed! please test again @ishpaul777 |
ishpaul777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
|
@youssef-lr can you please update the QA steps |
|
Done. cc @grgia |
|
@youssef-lr we have conflicts |
luacmartins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Render description as text in the reports page (cherry picked from commit f99598b) (cherry-picked to staging by thienlnam)
…310344268-4 🍒 Cherry pick PR #69451 to staging 🍒
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.2.0-1 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
1 similar comment
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.2.0-1 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.0-5 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.2.1-0 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.0-5 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.1-20 🚀
|

Explanation of Change
This PR will allow rendering the description as text if it's in HTML, to allow sorting, and truncating text, and also to not mess the row heights if it's multi line text/HTML. Users can still see the markdown version when opening the expense details.
Fixed Issues
$ #69405
$ #69402
$ #69403
Tests
Offline tests
QA Steps
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))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
Uploading Screen Recording 2025-08-28 at 14.30.41.mov…
MacOS: Chrome / Safari
MacOS: Desktop