Skip to content

[HOLD for payment 2023-08-08] [$1000] Dev: Web - Message is not center aligned vertically #23350

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 any chat and focus on composer
  2. Send any message
  3. Hover message and observe hovered background

Expected Result:

Message is center aligned vertically

Actual Result:

Message is not center aligned vertically

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: Dev 1.3.43-4
Reproducible in staging?: n/a
Reproducible in production?: n/a
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

bug

Expensify/Expensify Issue URL:
Issue reported by: @situchan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689880642291459

View all open jobs on GitHub

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 21, 2023
  2. melvin-bot commented on Jul 21, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 21, 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. samh-nl commented on Jul 21, 2023

    @samh-nl
    Contributor

    Proposal

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

    The message is not center aligned vertically.

    What is the root cause of that problem?

    A gap is added after a message that causes this misalignment. This container is used for rendering reactions, which are not present.

    image

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

    We should only render the View container inside the reactions component (or alternatively, the component itself) if there are reactions present.

    What alternative solutions did you explore? (Optional)

    N/A

  5. alitoshmatov commented on Jul 21, 2023

    @alitoshmatov
    Contributor

    Proposal

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

    Web - Message is not center aligned vertically

    What is the root cause of that problem?

    We are still rendering component which is responsible for showing emoji reactions and it has some padding applied to it

    style={[styles.flexRow, styles.flexWrap, styles.gap1, styles.mt2]}

    And it is resulting in empty element being rendered, and it is taking some space:
    Screenshot 2023-07-21 at 5 05 12 PM
    Screenshot 2023-07-21 at 5 05 25 PM

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

    We should add condition and render ReportActionItemEmojiReactions only if report action has any reaction:

    <ReportActionItemEmojiReactions

    We can add condition like this: _.isEmpty(props.emojiReactions)

    What alternative solutions did you explore? (Optional)

  6. Nodebrute commented on Jul 21, 2023

    @Nodebrute
    Contributor

    Proposal

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

    Dev: Web - Message is not center aligned vertically

    What is the root cause of that problem?

    This component is getting rendered even when props.emojiReactions is empty

    <ReportActionItemEmojiReactions

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

    We can conditionally render this when props.emojiReactions is not empty

           {!_.isEmpty(props.emojiReactions) && <View style={draftMessageRightAlign}>
                        <ReportActionItemEmojiReactions
                            reportActionID={props.action.reportActionID}
                            emojiReactions={props.emojiReactions}
                            toggleReaction={(emoji) => {
                                if (Session.isAnonymousUser()) {
                                    hideContextMenu(false);
    
                                    InteractionManager.runAfterInteractions(() => {
                                        Session.signOutAndRedirectToSignIn();
                                    });
                                } else {
                                    toggleReaction(emoji);
                                }
                            }}
                        />
                    </View>}
    

    What alternative solutions did you explore? (Optional)

  7. Pujan92 commented on Jul 21, 2023

    @Pujan92
    Contributor

    Proposal

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

    Chat Message is not aligned center vertically

    What is the root cause of that problem?

    As ReportActionItemEmojiReactions we are rendering without having the reactions also causing the issue of top margin of 8px.

    <ReportActionItemEmojiReactions

    <View
    ref={popoverReactionListAnchor}
    style={[styles.flexRow, styles.flexWrap, styles.gap1, styles.mt2]}

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

    Only render the View for ReportActionItemEmojiReactions when we have the reactions for the message.

    {!_.isEmpty(props.emojiReactions) && <View style={draftMessageRightAlign}>
    

    <View style={draftMessageRightAlign}>

  8. situchan commented on Jul 21, 2023

    @situchan
    Contributor

    Proposal from slack (@kbecciv missed pasting)

    Proposal

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

    Chat message is not center aligned vertically

    What is the root cause of that problem?

    Issue happens on this line:

    style={[styles.flexRow, styles.flexWrap, styles.gap1, styles.mt2]}

    So even if no reactions to show, 8px is always added

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

    Early return null if totalReactionCount = 0
    For this, we should run _map code first to calculate totalReactionCount earlier than return null

  9. anmurali commented on Jul 24, 2023

    @anmurali

    I am OOO for 10 days. Rotating the assigner.

  10. removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 24, 2023
  11. 47 remaining items

  12. melvin-bot commented on Aug 1, 2023

    @melvin-bot

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

    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
  13. melvin-bot commented on Aug 1, 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:

    • [@stitesExpensify] The PR that introduced the bug has been identified. Link to the PR: Support new emojiReaction data format #17996
    • [@stitesExpensify] 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: 👍
    • [@stitesExpensify ] 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: n/a
    • [@stitesExpensify] Determine if we should create a regression test for this bug. No. This was found before prod
    • [@stitesExpensify] 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. n/a
    • [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  14. Santhosh-Sellavel commented on Aug 2, 2023

    @Santhosh-Sellavel
    Collaborator

    This was handled as a regression cc: @stitesExpensify please take care of the checklist!

  15. stitesExpensify commented on Aug 2, 2023

    @stitesExpensify
    Contributor

    done

  16. situchan commented on Aug 13, 2023

    @situchan
    Contributor

    @bfitzexpensify sorry for late. reporting bonus is missing here

  17. situchan commented on Oct 8, 2023

    @situchan
    Contributor

    @bfitzexpensify sorry for late. reporting bonus is missing here

    bump ^

  18. bfitzexpensify commented on Oct 9, 2023

    @bfitzexpensify
    Contributor

    Reopening this to action today

  19. bfitzexpensify commented on Oct 9, 2023

    @bfitzexpensify
    Contributor

    Offer sent @situchan

  20. bfitzexpensify commented on Oct 10, 2023

    @bfitzexpensify
    Contributor

    OK, payment complete, we can close this out again.

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 productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsNeeds ReproductionReproducible steps needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions