You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-11-13] [$500] Composer height is not resized when resizing browser #28660
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
changed the title [-] Composer height is not resized when resizing browser[/-][+][$500] Composer height is not resized when resizing browser[/+]on Oct 2, 2023
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.
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
Activity
[-] Composer height is not resized when resizing browser[/-][+][$500] Composer height is not resized when resizing browser[/+]melvin-bot commentedon Oct 2, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b81aeded72e6d5a7
melvin-bot commentedon Oct 2, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik (
External)kavimuru commentedon 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
windowWidthtoupdateNumberOfLinesdeps array.App/src/components/Composer/index.js
Line 369 in 6be8fca
astrohunter62 commentedon 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,
updateNumberOfLinesis enclosed within auseCallback, 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
windowWidthas a dependency forupdateNumberOfLines.Result:
28660.webm
vernu commentedon 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 commentedon Oct 3, 2023
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 commentedon Oct 3, 2023
Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
c3024 commentedon 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
30 remaining items
melvin-bot commentedon Nov 20, 2023
Triggered auto assignment to @garrettmknight (
NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.grgia commentedon Nov 20, 2023
Hey @garrettmknight could you help ensure that the payments were processed for this one?
garrettmknight commentedon Nov 21, 2023
Summary of payments:
Upwork Job: https://www.upwork.com/en-gb/ab/applicants/1708968328042897408/job-details