Skip to content

[HOLD for payment 2024-03-14] [$500] Workspace - System message for workspace description edit with mark down is not gray #36598

Closed

Description

@kbecciv

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: v1.4.42-1
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Create a new workspace.
  3. Go to workspace profile.
  4. Click Workspace description.
  5. Save a description without mark down.
  6. Click Workspace description.
  7. Save another description with mark down.
  8. Go to #admin room.

Expected Result:

The system message for workspace description edit should appear gray, regardless of the usage of mark down in the description.

Actual Result:

The system message for workspace description edit is not grayed out when mark down is involved.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6380766_1708008538695.bandicam_2024-02-15_16-00-04-569.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01435fd857fbcc98a7
  • Upwork Job ID: 1759631118974234624
  • Last Price Increase: 2024-02-19
  • Automatic offers:
    • hoangzinh | Contributor | 0

Activity

  1. github-actions commented on Feb 15, 2024

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  2. melvin-bot commented on Feb 15, 2024

    @melvin-bot

    Triggered auto assignment to @puneetlath (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. Beamanator commented on Feb 15, 2024

    @Beamanator
    Contributor

    This is useful to fix, but also doesn't feel like a blocker since everything seems to be working fine (just not a grayed out system message)

  4. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Feb 15, 2024
  5. bernhardoj commented on Feb 16, 2024

    @bernhardoj
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    The workspace description system message is not grayed out when the description is a markdown.

    What is the root cause of that problem?

    Currently, we check the action name and apply the gray color.

    style={[
    _.contains(
    [
    ..._.values(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG),
    CONST.REPORT.ACTIONS.TYPE.IOU,
    CONST.REPORT.ACTIONS.TYPE.APPROVED,
    CONST.REPORT.ACTIONS.TYPE.MOVED,
    ],
    props.action.actionName,
    )
    ? styles.colorMuted
    : undefined,
    ]}

    This works perfectly for a plain text, but not for markdown. When the description is a markdown, it will be rendered as HTML,

    if (!differByLineBreaksOnly) {
    const editedTag = fragment.isEdited ? `<edited ${styleAsDeleted ? 'deleted' : ''}></edited>` : '';
    const htmlContent = styleAsDeleted ? `<del>${html}</del>` : html;
    const htmlWithTag = editedTag ? `${htmlContent}${editedTag}` : htmlContent;
    return (
    <RenderCommentHTML
    source={source}
    html={htmlWithTag}
    />
    );
    }

    and the style we pass won't work.

    What changes do you think we should make in order to solve the problem?

    We can follow the same pattern as styleAsDeleted props. Instead of passing the colorMuted style, we can have a new props called, styleAsMuted with the same condition as below

    style={[
    _.contains(
    [
    ..._.values(CONST.REPORT.ACTIONS.TYPE.POLICYCHANGELOG),
    CONST.REPORT.ACTIONS.TYPE.IOU,
    CONST.REPORT.ACTIONS.TYPE.APPROVED,
    CONST.REPORT.ACTIONS.TYPE.MOVED,
    ],
    props.action.actionName,
    )

    and wrap the HTML with <muted-text> tag to apply the gray text color.

    let htmlWithTag = editedTag ? `${htmlContent}${editedTag}` : htmlContent;
    if (styleAsMuted) {
        htmlWithTag = `<muted-text>${htmlWithTag}<muted-text>`;
    }
    

    Then, for the plain text, we will apply the style if styleAsMuted is true similar to styleAsDeleted to every text that needs it.

    styleAsDeleted ? styles.offlineFeedback.deleted : undefined,

    Or we can just leave the current style we have to reduce the changes and regression risk. Please let me know which way we should go.

  6. melvin-bot commented on Feb 19, 2024

    @melvin-bot

    @puneetlath Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  7. situchan commented on Feb 19, 2024

    @situchan
    Contributor

    As this was deploy blocker, there should be offending PR.
    @bernhardoj you know?

  8. puneetlath commented on Feb 19, 2024

    @puneetlath
    Contributor

    Making external.

  9. 23 remaining items

  10. bernhardoj commented on Feb 23, 2024

    @bernhardoj
    Contributor

    PR is ready

    cc: @hoangzinh

    FYI, I haven't got the auto offer yet

    cc: @puneetlath

  11. puneetlath commented on Feb 23, 2024

    @puneetlath
    Contributor

    Hm, weird that it didn't work sending you the auto-offer. If it doesn't do it, I'll send you one manually when it's time to pay.

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 7, 2024
  13. changed the title [-][$500] Workspace - System message for workspace description edit with mark down is not gray[/-] [+][HOLD for payment 2024-03-14] [$500] Workspace - System message for workspace description edit with mark down is not gray[/+] on Mar 7, 2024
  14. melvin-bot commented on Mar 7, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Mar 7, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.48-0 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-03-14. 🎊

    For reference, here are some details about the assignees on this issue:

  16. puneetlath commented on Mar 13, 2024

    @puneetlath
    Contributor
  17. puneetlath commented on Mar 14, 2024

    @puneetlath
    Contributor

    All paid. Thanks y'all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionEngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions