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-11-13] [$500] Composer height is not resized when resizing browser #28660

Closed
1 of 6 tasks
kavimuru opened this issue Oct 2, 2023 · 23 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@kavimuru
Copy link

kavimuru commented Oct 2, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Type anything long on the first line of composer
  2. Resize the browser window to be smaller

Expected Result:

The composer's height should increased to show all the text

Actual Result:

The composer's height (number of lines) stays the same

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.76-1
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

Screen.Recording.2023-09-19.at.01.46.16.mov
Recording.1617.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b81aeded72e6d5a7
  • Upwork Job ID: 1708968328042897408
  • Last Price Increase: 2023-10-02
  • Automatic offers:
    • bernhardoj | Contributor | 27244536
    • c3024 | Reporter | 27244540
@kavimuru kavimuru added the External Added to denote the issue can be worked on by a contributor label Oct 2, 2023
@melvin-bot melvin-bot bot changed the title Composer height is not resized when resizing browser [$500] Composer height is not resized when resizing browser Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01b81aeded72e6d5a7

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

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 2, 2023
@kavimuru
Copy link
Author

kavimuru commented Oct 2, 2023

Proposal by @bernhardoj

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

Resizing the browser window does not adjust the composer height/number of lines.

What is the root cause of that problem?

We don't recalculate the composer number of lines when the browser width changes. This issue was previously fixed in #15020 by recalculating the composer number of lines when window width changes but a recent functional component migration accidentally removes this behavior.

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

Recalculate the number of lines when the window width changes by adding windowWidth to updateNumberOfLines deps array.

}, [value, maxLines, numberOfLinesProp, onNumberOfLinesChange, isFullComposerAvailable, setIsFullComposerAvailable]);

@astrohunter62
Copy link
Contributor

astrohunter62 commented Oct 2, 2023

Proposal

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

The composer's height doesn't adjust when the browser width is changed.

What is the root cause of that problem?

In Composer, updateNumberOfLines is enclosed within a useCallback, and it is not configured to update when the browser width changes.

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

We can include windowWidth as a dependency for updateNumberOfLines.

const {windowWidth} = useWindowDimensions();
const updateNumberOfLines = useCallback(() => {
  .....
}, [value, maxLines, numberOfLinesProp, onNumberOfLinesChange, isFullComposerAvailable, setIsFullComposerAvailable, windowWidth]);

Result:

28660.webm

@vernu
Copy link

vernu commented Oct 3, 2023

Proposal

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

The composer textarea height doesn't update when the browser width is resized.

What is the root cause of the problem

updateNumberOfLines is wrapped in a callback that doesn't have windowWidth in the dependency array, thus It doesn't reflect the current width.

const updateNumberOfLines = useCallback(() => { ... }, [value, maxLines, numberOfLinesProp, onNumberOfLinesChange, isFullComposerAvailable, setIsFullComposerAvailable]);

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

adding windowWidth from useWindowDimensions() hook into updateNumberOfLines's useCallback dependency array should address the issue.

What alternative solutions did you explore? (Optional)

N/A

@robertKozik
Copy link
Contributor

Hi all! Thank you all for your proposals. All of you propose the same solution for this issue so let's proceed with the first published one - @bernhardoj

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

@c3024
Copy link
Contributor

c3024 commented Oct 5, 2023

@kavimuru
Could you add me as the bug reporter?
I reported it earlier here
https://expensify.slack.com/archives/C049HHMV9SM/p1695059354067419?thread_ts=1695059166.660979&cid=C049HHMV9SM

https://expensify.slack.com/archives/C049HHMV9SM/p1693583529627299

@melvin-bot melvin-bot bot added the Overdue label Oct 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

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

@robertKozik
Copy link
Contributor

@grgia waiting for your decision and assignment

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

@grgia, @robertKozik Whoops! This issue is 2 days overdue. Let's get this updated quick!

@grgia
Copy link
Contributor

grgia commented Oct 11, 2023

@bernhardoj I need you to comment to assign.

@melvin-bot melvin-bot bot removed the Overdue label Oct 11, 2023
@bernhardoj
Copy link
Contributor

Comment

@melvin-bot melvin-bot bot added the Overdue label Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

@grgia, @robertKozik Huh... This is 4 days overdue. Who can take care of this?

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

melvin-bot bot commented Oct 17, 2023

📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

📣 @c3024 🎉 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

@grgia
Copy link
Contributor

grgia commented Oct 17, 2023

assigning!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 18, 2023
@bernhardoj
Copy link
Contributor

PR is ready

cc: @robertKozik

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 6, 2023
@melvin-bot melvin-bot bot changed the title [$500] Composer height is not resized when resizing browser [HOLD for payment 2023-11-13] [$500] Composer height is not resized when resizing browser Nov 6, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

Copy link

melvin-bot bot commented Nov 6, 2023

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

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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 Daily KSv2 labels Nov 13, 2023
@grgia grgia added the NewFeature Something to build that is a new item. label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 20, 2023

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Overdue Daily KSv2 labels Nov 20, 2023
@grgia
Copy link
Contributor

grgia commented Nov 20, 2023

Hey @garrettmknight could you help ensure that the payments were processed for this one?

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 labels Nov 20, 2023
@garrettmknight
Copy link
Contributor

Summary of payments:

  • Reporter: @c3024 $50 paid via upwork
  • Contributor: @bernhardoj $500 paid via upwork
  • Reviewer: N/A

Upwork Job: https://www.upwork.com/en-gb/ab/applicants/1708968328042897408/job-details

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 Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

8 participants