-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2024-06-06] [$2000] Wrong Image opens on HT Report in Safari #23546
Comments
Triggered auto assignment to @michaelhaxhiu ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~012f0ed142cb12018c |
Current assignee @michaelhaxhiu is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Not overdue, fielding proposals still |
ProposalPlease re-state the problem that we are trying to solve in this issue.A wrong image (or a series of wrong images) is displayed if a user clicks on one of the attachments in the chat. I was able to reproduce this issue in both Safari and Chrome. What is the root cause of that problem?The FlatList settings that are being used in the AttachmentCarousel Component. The combination of these settings leads to the updatePage function being called with wrong parameters on carousel initialization and first scroll (via onViewableItemsChanged={updatePage}). What changes do you think we should make in order to solve the problem?I changed viewabilityConfig, initialNumToRender, windowSize, maxToRenderPerBatch, bounces and pagingEnabled properties. The pagingEnabled and minimumViewTime parameters are mandatory, while the others are optional. The carousel now works properly in Safari, on both desktop and mobile. Explanation:
Adding this to decrease the likelihood of triggering the viewability callback, which would lead to an updatePage call.
Since we're displaying only one attachment at a time, there's no need for a larger value.
Since we're only displaying the previous or next attachment, there's no need for a larger window.
Since we're displaying only one attachment at a time, there's no need for a larger value.
Setting this to true will enhance the stability of the viewable items callback on iOS devices.
If the list contains items of inconsistent heights or sizes, enabling pagingEnabled can lead to awkward scroll stop positions and may inaccurately determine which items are viewable. What alternative solutions did you explore? (Optional)react-native-snap-carousel |
Thanks for the proposal @mikesmnx but it sounds incomplete. What settings of FlatList especially? What did you change and why? How will it impact the App? Which flat List as we talking about? |
FlatList has complex logic for determining viewable items. The carousel contains a FlatList, where each attachment is a FlatList item (all are hidden except for the selected one). With the previous settings, it incorrectly determined that one or more neighboring attachments were also viewable. As a result, either the wrong image was displayed, or all the attachments were displayed one by one. Code changes:
|
Reviewing this today. Need to reproduce the bug first. |
It's easier to reproduce the issue in Safari, especially on mobile devices, but Chrome will work too. Just open and close the attachment multiple times. click-click.mp4 |
Upwork job price has been updated to $2000 |
Hi @parasharrajat — just checking to see if we're still on pace to have this merged early this week? Thanks! |
As I am back from vacay, I will continue the review and try to get this merged ASAP. |
Coming from this comment here are we still looking to merge today @parasharrajat? Thanks! |
The PR has been approved but we are currently under a merge freeze. It will likely not be merged until Thursday. |
Same as above. |
Merge freeze should end today 🤞 |
Looks like the freeze is thawing slightly to a slush. Not yet sure what that means for a practical standpoint. This is a pretty big change, so we may need to thaw further before merging it. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-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 2024-06-06. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@parasharrajat can you complete the checklist before tomorrow so there is no delay in payment? Thanks! |
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:
Regression Test Steps
Do you agree 👍 or 👎 ? |
@parasharrajat can you complete the checklist before tomorrow so there is no delay in payment? Also, at @mikesmnx can you link your Upwork profile so I can send you a payment contract? After discussing it with the team, it was decided to offer you 25% for your initial work on this. Thanks! |
@CortneyOfstad I already did. Is there something else that I can help with? |
Sorry, there was a glitch that caused my edited comment to then post on it's own — sorry for the confusion! |
No worries. Thanks. |
@CortneyOfstad https://www.upwork.com/freelancers/~01ae736e03e7dce34c |
@mikesmnx Please close your old PR. Thanks. |
@CortneyOfstad Offer accepted! |
Regression test created (here) so doing the payment summary now! |
Payment Summary@kidroca — contracted Thanks all and great work! |
Payment requested as per #23546 (comment) |
$2,000 approved for @parasharrajat |
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.Go to PROD.
2. Join the following channel https://new.expensify.com/r/8292963527436014
3. Scroll up and open shared images by users
4. After scrolling a little up again open some other image
5. Wrong image is displayed
Expected Result:
Correct image should be displayed
Actual Result:
Wrong image is displayed
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?
Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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
wrong-image-ht.mov
Expensify/Expensify Issue URL:
Issue reported by: @Talha345
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690065844572829
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @CortneyOfstadThe text was updated successfully, but these errors were encountered: