-
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
[HOLD for payment 2024-07-26] [$250] Android - Workspace- WS invite message shows html message briefly #42668
Comments
Triggered auto assignment to @sonialiap ( |
@sonialiap FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.WS invite message shows html message briefly What is the root cause of that problem?We don't parse to Markdown when setting default value here:
What changes do you think we should make in order to solve the problem?We should call the parser when setting default value: defaultValue={parser.htmlToMarkdown(getDefaultWelcomeNote())} |
ProposalPlease re-state the problem that we are trying to solve in this issue.We see html input for a second for invite messages. What is the root cause of that problem?When the
This will set the welcome message to: App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 89 to 93 in 563f8c7
Here we get the content with Now, we also have a App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 95 to 102 in 563f8c7
Here we have used Hence we only see What changes do you think we should make in order to solve the problem?We should update --- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx
+++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx
@@ -86,12 +86,17 @@ function WorkspaceInviteMessagePage({
// policy?.description can be an empty string
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
policy?.description ||
- parser.replace(
+ parser.htmlToMarkdown(
translate('workspace.common.welcomeNote', {
workspaceName: policy?.name ?? '',
}),
);
This way we parse the default welcome message from the first time itself. What alternative solutions did you explore? (Optional)If --- a/src/pages/workspace/WorkspaceInviteMessagePage.tsx
+++ b/src/pages/workspace/WorkspaceInviteMessagePage.tsx
@@ -86,12 +86,11 @@ function WorkspaceInviteMessagePage({
// policy?.description can be an empty string
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
policy?.description ||
- parser.replace(
+ parser.htmlToMarkdown(parser.replace(
translate('workspace.common.welcomeNote', {
workspaceName: policy?.name ?? '',
}),
- ); |
ProposalPlease re-state the problem that we are trying to solve in this issue.WS invite message page shows a message with HTML briefly. What is the root cause of that problem?The initial value of App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 202 to 203 in 2514f29
The default value will take the workspace.common.welcomeNote translation and convert it to HTML (replace). App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 82 to 93 in 2514f29
Lines 1924 to 1925 in 2514f29
Then, this useEffect that is triggered on mount will update the App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 95 to 97 in 2514f29
That's why we see the HTML form briefly before the markdown. What changes do you think we should make in order to solve the problem?The only markdown in the default welcome note is the link and possibly the workspace name (if the workspace name contains a markdown), Lines 1924 to 1925 in 2514f29
and I don't think it's necessary to convert it to HTML and then back to markdown just to make the link shown as The ExpensiMark already has an auto link rule that will convert Also, let's say the workspace name is b, if we call So, I would prefer to remove the |
Sounds buggy to me. Adding help wanted |
@sonialiap I think we should add external label for C+ assignment, help wanted didn’t trigger auto assignment |
Job added to Upwork: https://www.upwork.com/jobs/~01b2c0cb41c6778335 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi ( |
Thanks for the catch! Adding External, hopefully automation runs this time |
@sonialiap, @mkhutornyi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
reviewing proposals |
@bernhardoj please make sure that your solution doesn't cause regression by checking email and sms (for phone user) and verifying that link is correctly shown. |
It would be good to add offending PR in root cause. This should be recent regression. |
@mkhutornyi do you have feedback on my proposal? or does it not solve the issue at core ? 🙃 |
@allgandalf thanks for the proposal. Can you please add the reason why this happens only on native in root cause? |
@mkhutornyi the welcome note passed to the BE is the same before and after my proposal.
Both I haven't received the invitation email, but because the data sent to the BE is identical, I assume the email body text will be identical too |
Same to me so not able to confirm email body. @bernhardoj why do you think this happens only on native? |
I believe that's simply because the web perf is faster. You can put a delay here and notice the issue on web too. App/src/pages/workspace/WorkspaceInviteMessagePage.tsx Lines 96 to 99 in 0ae7feb
|
PR merged |
Not overdue |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
A new PR to address #45740 is up cc: @mkhutornyi |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.9-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-07-26. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@mkhutornyi @roryabraham I think i am also eligible for payment here, the PR which was CP'ed to staging used solution from my proposal. So i think i might be eligible here. @bernhardoj @mkhutornyi do correct me if that is otherwise, i just observed the same solution being used in the follow up PR to @bernhardoj's main solution, thanks :) |
@allgandalf please check code diff carefully. It's not same. |
opps, my bad, that was almost identical, sorry about that, thanks for clarifying though |
Payment summary:
|
This was caught during regression testing: https://expensify.testrail.io/index.php?/tests/view/4578418 |
Thanks Mykhailo 🎉 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.76
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4578418
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Workspace invite message must not show html message briefly
Actual Result:
Workspace invite message shows html message briefly
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6493310_1716840390127.Screenrecorder-2024-05-28-01-32-48-899_compress_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mkhutornyiThe text was updated successfully, but these errors were encountered: