Closed izarutskaya closed 3 weeks ago
Triggered auto assignment to @strepanier03 (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Search - Raw markdown symbols visible in search expense list
Description is not converted to text from markdown. https://github.com/Expensify/App/blob/412fc60dd5bd8c3da326fd48eae5202b6f7f1a08/src/components/SelectionList/Search/TransactionListItemRow.tsx#L126
We should convert the description to plain text.
const description = Parser.htmlToText(Parser.replace(TransactionUtils.getDescription(transactionItem)));
Edited by proposal-police: This proposal was edited at 2024-08-07 07:29:00 UTC.
Please insert the actual timestamp where {updated_timestamp}
is indicated.
Raw Markdown symbols are visible in the expense list on the search page, indicating that Markdown is not being rendered properly in this context which is different from expense description behavior in other places in the app
The expense list uses TextWithTooltip
to display text, however TextWithTooltip
doesn't have logics to handle HTML text, so the output only shows raw text.
Add an option shouldRenderAsHTML
to TextWithTooltip
and set default to false
. Then we edit this line to render as HTML if shouldRenderAsHTML
is true
:
shouldRenderAsHTML ? <RenderHTML html={Parser.replace(text)} /> : text}
https://github.com/user-attachments/assets/1f7049d8-5067-4956-afb9-863c5f388757
I updated the proposal to include pseudocode.
Hmmm, the description is not a visible field on the expense when I'm on the search page, so the markdown isn't displayed either way for me.
@strepanier03 With the current logic, if the expense's merchant is set, the app will display the merchant field instead of the description.
@strepanier03 Eep! 4 days overdue now. Issues have feelings too...
Got it, thanks @daledah - I'll retest with that in mind.
Job added to Upwork: https://www.upwork.com/jobs/~0118ebdaf7338382b5
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External
)
@strepanier03 @ishpaul777 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
I will review proposals tomorrow (Tuesday)
Proposal from @daledah Sounds good to me! but lets be sure to use shouldRenderAsHTML
only when rendering description not for merchat.
π π π C+ reviewed
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @ishpaul777 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing π
@ishpaul777, sorry for delay, but I believe that using RenderHTML
will break the design and alignment, please try with multiline description and pre code blocks.
https://github.com/user-attachments/assets/22efb8e2-8472-4321-8813-d26c2af2250c
https://github.com/user-attachments/assets/edfe09d0-00a3-4cbd-9d2b-e3be5399b9b8
cc: @carlosmiceli
The only difference b/w both proposal seems to be with how they handle code blocks right @Krishna2323 or there is any other difference (I think showing the link in blue is the expected behviour same as in menu item)
@ishpaul777, my proposal will only remove the markdown character like #, ~~, __
while the other one will render the text as html which I think isn't correct in this case.
I think showing the link in blue is the expected behviour same as in menu item
But that wouldn't work, as shown in the video above.
But that wouldn't work, as shown in the video above.
Also doesn't work for menu item, i think code block is only edge case here so i am inclined to show it as markdown rather than showing it text for it to be consistent with other places
https://github.com/user-attachments/assets/6fc26089-b11a-406f-9953-73188344477b
@ishpaul777, I mean it blocks the press on transaction item, clicking on the link does nothing and that will break the current behaviour.
Thats a good point i wonder if we can make it clickable to link to transaction details report @daledah if not than we can rethink on a the expected behaviour
clickable to link to transaction details report
I this also has some issues because if we are rendering it as link then why would we link to transaction details report, I believe what we have now is partially correct, we should just remove the markdown symbols. You can see that from and to fields are also not linking to the users page, it just opens the transaction details.
I believe what we have now is partially correct, we should just remove the markdown symbols.
@carlosmiceli @strepanier03 Does that sound good to you, i.e we will not render the description as markdown in description column we will just remove all markdown symbols (#, >, ``` etc.) and render it as normal text
I think so, can we see a video to confirm that it would look properly?
@carlosmiceli @ishpaul777,
https://github.com/user-attachments/assets/4072821d-02d4-4223-9a2d-e8049287b7f8
Yeah, I think this is good! Let's do it :)
Okay! Thanks for clarifying @carlosmiceli, can we please switch assignment to @Krishna2323
Sure, am I removing @daledah ?
Yes, because there are we edge cases if we render description as html (@daledah proposal) and it does not look so good.
π£ @Krishna2323 π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@ishpaul777, PR ready for review ^
Looks like automation failed so I updated title and labels.
@carlosmiceli, @strepanier03, @Krishna2323, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Thanks everyone!
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.16-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): biruknew45+new@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Markdown syntax should be rendered correctly, so any Markdown formatting appears as intended (e.g., bold text, header ) without displaying raw Markdown symbols.
Actual Result:
Raw Markdown symbols are visible in the expense list on the search page, indicating that Markdown is not being rendered properly in this context which is different from expense description behavior in other places in the app
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/845e1ea4-69e8-44b5-b93c-1c460fc5096f
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ishpaul777