Skip to content

[HOLD for payment 2023-08-02] [$1000] Web - No gap between username and ReportPreview in chat #22797

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!


Action Performed:

  1. Open App > Navigate to any chat.
  2. Press + from composer > Request money > Add amount > Press Next and Press Request.
  3. Notice that there is no margin between username and report preview.

Expected Result:

There should be a top margin of 8px which is consistent with IOUPreview and attachments

Actual Result:

There is no margin between username and ReportPreview

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.39-5
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation

Screenshot 2023-07-12 at 4 31 03 PM

Recording.3583.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Nikhil-Vats
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689160540866809

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bb7137f6f7800a33
  • Upwork Job ID: 1679575096275460096
  • Last Price Increase: 2023-07-13

Activity

  1. added
    Daily
    Bug
    on Jul 13, 2023
  2. melvin-bot commented on Jul 13, 2023

    @melvin-bot

    Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Jul 13, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. kbecciv commented on Jul 13, 2023

    @kbecciv
    Author

    Proposal

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

    No gap between username and ReportPreview in chat which is inconsistent with attachments, IOUPreview, etc. which have a top margin of 8px.

    What is the root cause of that problem?

    We don't have styles.mt2 for View wrapper in ReportPreview -

    <View style={[styles.iouPreviewBox, props.isHovered ? styles.iouPreviewBoxHover : undefined]}>

    This is inconsistent with other components like IOUPreview which have a top margin of 8px. -
    style={props.displayAsGroup ? [] : [styles.mt2]}

    It is also inconsistent with attachments which also have a top margin of 8px -
    !props.displayAsGroup && isAttachment ? styles.mt2 : undefined,

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

    We need to add styles.mt2 in line 107 in ReportPreview -

    <View style={[styles.iouPreviewBox, styles.mt2, props.isHovered ? styles.iouPreviewBoxHover : undefined]}>

    What alternative solutions did you explore? (Optional)

    NA
    Result -
    image

  5. added
    External
    on Jul 13, 2023
  6. changed the title [-]Web - No gap between username and ReportPreview in chat[/-] [+][$1000] Web - No gap between username and ReportPreview in chat[/+] on Jul 13, 2023
  7. melvin-bot commented on Jul 13, 2023

    @melvin-bot
  8. added
    Help Wanted
    on Jul 13, 2023
  9. melvin-bot commented on Jul 13, 2023

    @melvin-bot

    Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.

  10. melvin-bot commented on Jul 13, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

  11. Nikhil-Vats commented on Jul 13, 2023

    @Nikhil-Vats
    Contributor
  12. Pujan92 commented on Jul 13, 2023

    @Pujan92
    Contributor

    Proposal

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

    There isn't margin for ReportPreview and username when it is the first message for that time span

    What is the root cause of that problem?

    We don't have containerStyles prop for the ReportPreview and we are not providing any margin for the ReportPreview in the ReportActionItem component when it is displayAsGroup.

    <ReportPreview
    iouReportID={ReportActionsUtils.getIOUReportIDFromReportActionPreview(props.action)}
    chatReportID={props.report.reportID}
    action={props.action}
    isHovered={hovered}
    contextMenuAnchor={popoverAnchorRef}
    checkIfContextMenuActive={toggleContextMenuFromActiveReportAction}
    />

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

    1. Add prop containerStyles for the ReportPreview component.
      containerStyles: PropTypes.arrayOf(PropTypes.object),

    2. Pass containerStyles prop for the ReportPreview from ReportActionItem
      containerStyles={props.displayAsGroup ? [] : [styles.mt2]}

    3. Apply containerStyles for the View styles in the ReportPreview here(I prefer to add for the first option as it won't show cursor pointer for the above marginal area, with that we can do the same minor change for IOUPreview also)
      <View style={[styles.chatItemMessage, ...props.containerStyles]}>

      <View style={styles.chatItemMessage}>

      Or
      <View style={[styles.iouPreviewBox, props.isHovered ? styles.iouPreviewBoxHover : undefined]}>

  13. 22 remaining items

  14. added
    Weekly
    Awaiting Payment
    on Jul 26, 2023
  15. changed the title [-][$1000] Web - No gap between username and ReportPreview in chat[/-] [+][HOLD for payment 2023-08-02] [$1000] Web - No gap between username and ReportPreview in chat[/+] on Jul 26, 2023
  16. removed
    Reviewing
    on Jul 26, 2023
  17. melvin-bot commented on Jul 26, 2023

    @melvin-bot

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

  18. melvin-bot commented on Jul 26, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.45-7 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 2023-08-02. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  19. melvin-bot commented on Jul 26, 2023

    @melvin-bot

    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:

    • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    • [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@mollfpr] Determine if we should create a regression test for this bug.
    • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  20. lschurr commented on Jul 31, 2023

    @lschurr
    Contributor

    @mollfpr could you work through the checklist and let me know if we need a regression test?

  21. lschurr commented on Jul 31, 2023

    @lschurr
    Contributor

    Payout summary:

    Payments will be made via Upwork on 8/2

  22. added
    Daily
    and removed
    Weekly
    on Aug 1, 2023
  23. lschurr commented on Aug 2, 2023

    @lschurr
    Contributor

    Payments have been made in Upwork.

    @mollfpr could you work on the checklist so we can close this one out? #22797 (comment)

  24. mollfpr commented on Aug 3, 2023

    @mollfpr
    Contributor

    [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:

    #19230

    [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

    https://github.com/Expensify/App/pull/19230/files#r1283409243

    [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

    The regression test should cover this.

    [@mollfpr] Determine if we should create a regression test for this bug.
    [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    1. Open any chat which has Report Preview
    2. Verify that there is a top margin for Report Preview with username
    3. Open any chat which has Report Preview grouped with the previous message
    4. Verify that there is no top margin from the preview and the previous message
    5. 👍 or 👎
  25. lschurr commented on Aug 3, 2023

    @lschurr
    Contributor

    Added QA test request. Closing this one out!

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions