Skip to content
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 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes #26735

Closed
2 of 6 tasks
kbecciv opened this issue Sep 4, 2023 · 59 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Sep 4, 2023

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 FAB Menu > Request Money > Next > Cash
  2. Click Show more option > Merchant

Expected Result:

The input field's height should remain consistent after entering an emoji

Actual Result:

The input field's height changes

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.63.0
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

image (30)

6b410ae2-bd8c-4370-ad9b-ad6ee2327427.MP4

Expensify/Expensify Issue URL:
Issue reported by: @aman-atg
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693481505877419

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010ed71c8c76dd7c91
  • Upwork Job ID: 1698990819943170048
  • Last Price Increase: 2023-09-05
  • Automatic offers:
    • aman-atg | Reporter | 26633158
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@alphaboss1104
Copy link
Contributor

alphaboss1104 commented Sep 5, 2023

Proposal

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

Request Money - On entering emoji in merchant input field the height changes

What is the root cause of that problem?

The root cause of this issue is we didn't add autoGrowHeight property that automatically adjusts the height of the field to fit the content, including emojis to the Merchant TextInput component.

<TextInput
inputID="moneyRequestMerchant"
name="moneyRequestMerchant"
defaultValue={iou.merchant}
maxLength={CONST.MERCHANT_NAME_MAX_LENGTH}
label={translate('common.merchant')}
accessibilityLabel={translate('common.merchant')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
ref={(el) => (inputRef.current = el)}
/>

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

We should add autoGrowHeight props to solve this issue and also we can add some helpful props in here.

              <TextInput
                  inputID="moneyRequestMerchant"
                  name="moneyRequestMerchant"
                  defaultValue={iou.merchant}
                  maxLength={CONST.MERCHANT_NAME_MAX_LENGTH}
                  label={translate('common.merchant')}
                  accessibilityLabel={translate('common.merchant')}
                  accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
                  ref={(el) => (inputRef.current = el)}
+                 autoGrowHeight
+                 containerStyles={[styles.autoGrowHeightMultilineInput]}
+                 textAlignVertical="top"
              />

What alternative solutions did you explore? (Optional)

None.

@flaviadefaria flaviadefaria added the External Added to denote the issue can be worked on by a contributor label Sep 5, 2023
@melvin-bot melvin-bot bot changed the title Request Money - On entering emoji in merchant input field the height changes [$500] Request Money - On entering emoji in merchant input field the height changes Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Job added to Upwork: https://www.upwork.com/jobs/~010ed71c8c76dd7c91

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@ayazalavi
Copy link
Contributor

ayazalavi commented Sep 5, 2023

Proposal

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

When user select Request Money from menu item then click on show more in the last step then tap on Merchant and then enter some text and insert emoji, this results in height getting fluctuated

What is the root cause of that problem?

The root cause of the problem is the 'line-height' CSS attribute, which needs to be explicitly set for Safari. This is because, in Safari, the shadow DOM calculates the height of content manually. So, when we simply enter text, the shadow DOM calculates the height to be 17px. However, when we insert an emoji, the height is readjusted because there is room for an increase in height. After the emoji gets inserted, the height becomes 21px causing fluctation:

// Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear
// once it exceeds the input space (See https://github.com/Expensify/App/issues/13802)
!isMultiline && {height, lineHeight: undefined},
// Stop scrollbar flashing when breaking lines with autoGrowHeight enabled.
props.autoGrowHeight && StyleUtils.getAutoGrowHeightInputStyle(textInputHeight, maxHeight),
has lineHeight: undefined which is causing height of the shadow content to be calculated by the browser.

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

We need to explicitly set lineheight css attribute like mentioned here. We need to change

!isMultiline && {height, lineHeight: undefined},
to:
!isMultiline && { height, lineHeight: Browser.isSafari() && _.find(props.inputStyle, function(f) { return f.lineHeight !== undefined; })?.lineHeight || undefined}

which will take line height when passed through props and it is not causing any fluctuation anymore in safari. check video below for confirmation:

Untitled.mp4

What alternative solutions did you explore? (Optional)

Another solution is to use the autoGrowHeight prop, but it will convert the input field into a textarea, making it multiline. after that you can enter into next line even though input height is just for one line.

@ayazalavi
Copy link
Contributor

@sobitneupane ... TIA

@ayazalavi
Copy link
Contributor

@sobitneupane any update regarding my proposal?

@melvin-bot melvin-bot bot added the Overdue label Sep 7, 2023
@sobitneupane
Copy link
Contributor

@alphaboss1104 Thanks for the proposal.

autoGrowHeight is only used if for multiline input.

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@sobitneupane
Copy link
Contributor

sobitneupane commented Sep 11, 2023

Proposal from @ayazalavi looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@arosiclair
Copy link
Contributor

@ayazalavi can you verify this doesn't cause any regressions wrt this comment:

// Explicitly remove lineHeight from single line inputs so that long text doesn't disappear
// once it exceeds the input space (See #13802)

@ayazalavi
Copy link
Contributor

ayazalavi commented Sep 12, 2023

@arosiclair I double checked #13802. It is working as expected in my end but please do verify it on your end as well.

Basically the fix is safari ONLY since the bug is appearing in safari browser. For all other platforms code will be same as before.

@arosiclair
Copy link
Contributor

Be sure to include testing for #13802 in your PR test steps.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

📣 @sobitneupane Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

📣 @ayazalavi You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

📣 @aman-atg 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 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-10-20. 🎊

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

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:

  • [@arosiclair] The PR that introduced the bug has been identified. Link to the PR:
  • [@arosiclair] 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:
  • [@arosiclair] 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:
  • [@ayazalavi / @sobitneupane] Determine if we should create a regression test for this bug.
  • [@ayazalavi / @sobitneupane] 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.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 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-10-20. 🎊

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

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:

  • [@arosiclair] The PR that introduced the bug has been identified. Link to the PR:
  • [@arosiclair] 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:
  • [@arosiclair] 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:
  • [@ayazalavi / @sobitneupane] Determine if we should create a regression test for this bug.
  • [@ayazalavi / @sobitneupane] 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.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@flaviadefaria flaviadefaria added Daily KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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:

  • [@arosiclair] The PR that introduced the bug has been identified. Link to the PR:
  • [@arosiclair] 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:
  • [@arosiclair] 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:
  • [@ayazalavi / @sobitneupane] Determine if we should create a regression test for this bug.
  • [@ayazalavi / @sobitneupane] 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.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-09] [$500] Request Money - On entering emoji in merchant input field the height changes Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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:

  • [@arosiclair] The PR that introduced the bug has been identified. Link to the PR:
  • [@arosiclair] 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:
  • [@arosiclair] 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:
  • [@ayazalavi / @sobitneupane] Determine if we should create a regression test for this bug.
  • [@ayazalavi / @sobitneupane] 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.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@flaviadefaria
Copy link
Contributor

Payment Summary

@ayazalavi = $500 - 50% (over 6 days) - 50% (regression) = $125
@sobitneupane = $500 - 50% (over 6 days) - 50% (regression) = $125
@aman-atg = $50 (reporter)

@aman-atg = paid
@ayazalavi = offer sent
@sobitneupane can you please fill out the comment above? Thanks!

@flaviadefaria
Copy link
Contributor

@ayazalavi you've been paid. Closing this GH.

@sobitneupane
Copy link
Contributor

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:

  • The PR that introduced the bug has been identified. Link to the PR:

#14273

  • 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/14273/files#r1375797245

  • 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:

Not Required

  • Determine if we should create a regression test for this bug.

Yes

  • 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.

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  • Open FAB Menu > Request Money > Next > Cash
  • Click Show more option > Merchant
  • Verify that the input field's height remain consistent after entering an emoji

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

#26735 (comment)

Requested payment on newDot.

@JmillsExpensify
Copy link

$125 payment approved for @sobitneupane based on this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants