[CP Staging] Fix workspace description shows as HTML in workspace invite message page#45745
Conversation
|
@mkhutornyi 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] |
| // policy?.description can be an empty string | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| policy?.description || | ||
| Parser.htmlToMarkdown(policy?.description ?? '') || |
There was a problem hiding this comment.
We got an issue where an HTML is shown in the invite message page. This happens when you set the workspace description with a markdown. The description is saved as HTML, so we need to convert it back to markdown.
There was a problem hiding this comment.
Before our PR, we covert the HTML to markdown in
App/src/pages/workspace/WorkspaceInviteMessagePage.tsx
Lines 92 to 94 in 3d465c3
but that has its flaw too because it will convert the message draft HTML to markdown. For example, if user type <b>test</b>, go back and reopen the page, they will see *b*.
So, what we did already correct, but we missed moving the htmlToMarkdown to the workspace description.
|
This is labelled as a deploy blocker, getting a volunteer on it right away. |
|
@bernhardoj Can you merge main please? |
|
Done |
|
Looks like inviting member flow is broken in BE. But I think the user will get the correct message looking from response. |
|
@shubham1206agra yeah, I got that error too. You need to rename the workspace to make it work as a workaround. |
@bernhardoj Still not working. |
|
Hmm, that's weird. I renamed "Bernhard.josephus's Workspace 69" to "asd" and it works. |
|
Looks like if you have a dot (.) in the name, then the BE will throw an error. |
Now it worked. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2024-07-19.at.6.51.18.PM.moviOS: NativeScreen.Recording.2024-07-19.at.7.06.04.PM.moviOS: mWeb SafariScreen.Recording.2024-07-19.at.6.45.17.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-19.at.6.43.07.PM.movMacOS: DesktopScreen.Recording.2024-07-19.at.6.56.07.PM.mov |
mountiny
left a comment
There was a problem hiding this comment.
Thanks, moving this ahead as its a last blocker
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…d-to-html-in-ws-invite-page [CP Staging] Fix workspace description shows as HTML in workspace invite message page (cherry picked from commit f69f858)
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.9-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.9-5 🚀
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.10-2 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.10-7 🚀
|
Details
A workspace description can be an HTML, but we don't convert it to markdown in WS invite message page.
Fixed Issues
$ #45740
$ #42668
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4