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 2024-08-09] [$250] mWeb - Chat - smaller file preview when opening PDF attachment #42566
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 contributor
Version Number: v1.4.75-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:https://expensify.testrail.io/index.php?/tests/view/4569525 Issue reported by: Applause - Internal Team
Action Performed:
Log in to New Expensify
Navigate to any chat
Upload a PDF attachment
Open the PDF attachment
Expected Result:
Attachment preview should be of the usual height.
Actual Result:
Preview of the opened attachment is much smaller in height in comparison to the other PDFs in conversation.
Issue is reproducible 8 out of 10 times.
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
@muttmuure FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
Please re-state the problem that we are trying to solve in this issue.
The PDF has a smaller height. This happens when we open the PDF while a keyboard is shown.
What is the root cause of that problem?
The PDF container height is set based on the div height as can be seen in this code.
It's set in a useLayoutEffect and only happens once. When a keyboard is shown, the whole page height is reduced and if the calculation is happening while the keyboard isn't fully closed yet, the height it will receive is the reduced height, thus the PDF has a smaller height.
What changes do you think we should make in order to solve the problem?
Instead of getting the height once, we should get the height whenever the div height is updated. We can use ResizeObserver for that.
@muttmuure this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
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 contributor
Activity
melvin-bot commentedon May 23, 2024
Triggered auto assignment to @muttmuure (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.kbecciv commentedon May 23, 2024
@muttmuure FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
kbecciv commentedon May 23, 2024
We think that this bug might be related to #vip-vsb
bernhardoj commentedon May 24, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The PDF has a smaller height. This happens when we open the PDF while a keyboard is shown.
What is the root cause of that problem?
The PDF container height is set based on the div height as can be seen in this code.
It's set in a useLayoutEffect and only happens once. When a keyboard is shown, the whole page height is reduced and if the calculation is happening while the keyboard isn't fully closed yet, the height it will receive is the reduced height, thus the PDF has a smaller height.
What changes do you think we should make in order to solve the problem?
Instead of getting the height once, we should get the height whenever the div height is updated. We can use ResizeObserver for that.
We can optionally debounce it to optimize if we want.
melvin-bot commentedon May 27, 2024
@muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon May 29, 2024
@muttmuure Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon May 31, 2024
@muttmuure Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Jun 4, 2024
@muttmuure 10 days overdue. I'm getting more depressed than Marvin.
muttmuure commentedon Jun 5, 2024
Catching up from OOO
melvin-bot commentedon Jun 6, 2024
@muttmuure this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
70 remaining items
mountiny commentedon Aug 8, 2024
$250 to @mkhutornyi still pending and we can close this I think
melvin-bot commentedon Aug 12, 2024
@mountiny, @muttmuure, @bernhardoj, @mkhutornyi 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Aug 14, 2024
@mountiny, @muttmuure, @bernhardoj, @mkhutornyi Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
melvin-bot commentedon Aug 14, 2024
Triggered auto assignment to @greg-schroeder (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.mountiny commentedon Aug 14, 2024
Matt is ooo so going to ask someone else for help paying out the $250 to @mkhutornyi, @bernhardoj has already been handled.
@greg-schroeder can you please help? Thanks!
greg-schroeder commentedon Aug 15, 2024
Yeah sure, doing
greg-schroeder commentedon Aug 15, 2024
@mkhutornyi paid via Upwork