-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[CP Staging] Fix workspace description shows as HTML in workspace invite message page #45745
[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] |
@@ -83,7 +84,7 @@ function WorkspaceInviteMessagePage({ | |||
workspaceInviteMessageDraft || | |||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before our PR, we covert the HTML to markdown in
App/src/pages/workspace/WorkspaceInviteMessagePage.tsx
Lines 92 to 94 in 3d465c3
if (!isEmptyObject(invitedEmailsToAccountIDsDraft)) { | |
setWelcomeNote(getDefaultWelcomeNote()); | |
return; |
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 |
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.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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