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-05-23] [$1000] On increasing the screen size the user can see the previous image in the list #17760

Closed
1 of 6 tasks
kavimuru opened this issue Apr 20, 2023 · 51 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Apr 20, 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. Navigate to any chat
  2. Send 2-3 images
  3. Decrease the screen size
  4. Open the first image and try increasing the screen size

Expected Result:

User shouldn't see other images while increasing the screen size

Actual Result:

On increasing screen size next image gets visible

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.3
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-04-20.at.5.53.52.PM.mov
Recording.293.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011195db019e2042bb
  • Upwork Job ID: 1649474118394445824
  • Last Price Increase: 2023-04-28
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 20, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Apr 20, 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

@joekaufmanexpensify
Copy link
Contributor

Agreed, this is a bug. Reproduced on web.

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Apr 21, 2023
@melvin-bot melvin-bot bot changed the title On increasing the screen size the user can see the previous image in the list [$1000] On increasing the screen size the user can see the previous image in the list Apr 21, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~011195db019e2042bb

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

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

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

@AmjedNazzal
Copy link
Contributor

Proposal

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

On increasing the screen size the user can see the previous image in the list

What is the root cause of that problem?

In AttachmentCarousel we are deciding the width of the container that will hold each image in the carousel inside of the renderCell function, the width of this container is supposed to fill the screen so that the other items in the FlatList are not shown on screen, however we are setting the width using state.containerWidth that is being updated using onLayout. the problem with that is that it's not getting updated fast enough when the browser get resized quickly thus leading to the cell not filling the view and for other previous and next images to show for a split second.

renderCell(props) {
const style = [props.style, styles.h100, {width: this.state.containerWidth}];

return (
<View
style={[styles.attachmentModalArrowsContainer, styles.flex1]}
onLayout={({nativeEvent}) => this.setState({containerWidth: nativeEvent.layout.width + 1})}

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

We can update the width of the cell using a seperate more quickly updated value by using useWindowDimensions().width from react-native. that way, the width will be updated fast and the issue is resolved.

/**
* Defines how a container for a single attachment should be rendered
* @param {Object} props
* @returns {JSX.Element}
*/
renderCell(props) {
   const style = [props.style, styles.h100, {width: useWindowDimensions().width}];

We can leave everything else to use the state value of the containerWidth as it was and just change the renderCell.

What alternative solutions did you explore? (Optional)

Result

Sorry for the slow performance in the screen recording.

Screen.Recording.2023-04-23.at.12.05.01.AM.mov

@melvin-bot melvin-bot bot added the Overdue label Apr 24, 2023
@joekaufmanexpensify
Copy link
Contributor

Next step here is to review this proposal.

@melvin-bot melvin-bot bot removed the Overdue label Apr 24, 2023
@joekaufmanexpensify
Copy link
Contributor

@aimane-chnaif thoughts on this proposal?

@joekaufmanexpensify
Copy link
Contributor

Still pending review

@aimane-chnaif
Copy link
Contributor

There's only 1 proposal so far. reviewing shortly

@MelvinBot
Copy link

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@joekaufmanexpensify
Copy link
Contributor

Great, thanks!

@melvin-bot melvin-bot bot added the Overdue label May 1, 2023
@joekaufmanexpensify
Copy link
Contributor

@aimane-chnaif wanted to check in to see if you could review the proposal on this issue soon? TY!

@melvin-bot melvin-bot bot removed the Overdue label May 1, 2023
@joekaufmanexpensify
Copy link
Contributor

Proposal still pending review

@aimane-chnaif
Copy link
Contributor

@AmjedNazzal thanks for proposal. The root cause is correct and solution also works.
However, I am thinking of deprecating renderCell which was introduced here to support carousel arrow press events on touchable devices.

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented May 3, 2023

@AmjedNazzal please update your proposal based on latest codebase.
AttachmentCarousel component is much changed in #17647

@joekaufmanexpensify joekaufmanexpensify added the Reviewing Has a PR in review label May 10, 2023
chiragsalian added a commit that referenced this issue May 12, 2023
Fix - On increasing the screen size the user can see the previous image in the list #17760
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 16, 2023
@melvin-bot melvin-bot bot changed the title [$1000] On increasing the screen size the user can see the previous image in the list [HOLD for payment 2023-05-23] [$1000] On increasing the screen size the user can see the previous image in the list May 16, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.14-14 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-05-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

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

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR: Attachment Carousel Virtual Caching #16973
  • [@aimane-chnaif] 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/16973/files#r1202887868
  • [@aimane-chnaif] 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: This was overlooked while refactoring carousel and also edge case so no further discussions needed. Just commenting on offending PR is enough.
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] 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.
  • [@joekaufmanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: N/A

@joekaufmanexpensify
Copy link
Contributor

joekaufmanexpensify commented May 19, 2023

@AmjedNazzal offer sent!

@joekaufmanexpensify
Copy link
Contributor

@aimane-chnaif offer sent!

@joekaufmanexpensify
Copy link
Contributor

@thesahindia offer sent!

@joekaufmanexpensify
Copy link
Contributor

@aimane-chnaif when you have a chance, could you also please complete your assigned steps on the BZ checklist?

@AmjedNazzal
Copy link
Contributor

@joekaufmanexpensify Thank you! accepted

@joekaufmanexpensify
Copy link
Contributor

All set to issue payment soon. Still need to complete BZ checklist steps though.

@joekaufmanexpensify
Copy link
Contributor

Bumped BZ checklist steps in Slack.

@aimane-chnaif
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Attachment Carousel Virtual Caching #16973
  • 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/16973/files#r1202887868
  • 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: This was overlooked while refactoring carousel and also edge case so no further discussions needed. Just commenting on offending PR is enough.
  • Is it easy to test for this bug? No
  • Is the bug related to an important user flow? (For example, adding a bank account) No
  • Is it an impactful bug? No

Based on that, we can skip regression test proposal.

@joekaufmanexpensify
Copy link
Contributor

Great, ty! BZ checklist is now complete.

@joekaufmanexpensify
Copy link
Contributor

@AmjedNazzal was assigned to this issue on May 8th at 6:16 PM UTC. The PR was merged on May 12th at 2:12 AM UTC. This is slightly longer than 3 business days, so this does not qualify for a speed bonus. We'll hit 7 full days of the regression reporting bonus later this evening, and then issue payment!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 23, 2023
@joekaufmanexpensify
Copy link
Contributor

@AmjedNazzal $1,000 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@aimane-chnaif $1,000 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@thesahindia $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. Thanks everyone!

@AmjedNazzal
Copy link
Contributor

Thank you! recieved

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

No branches or pull requests

6 participants