Closed kbecciv closed 4 months ago
Job added to Upwork: https://www.upwork.com/jobs/~016170309acaa20014
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
Triggered auto assignment to @laurenreidexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
We think that this bug might be related #vip-vsb CC @quinthar
gestures won't work when viewing image attachments on the web app
new feature
on web ImageView
component, if the device has a touch screen (canUseTouchScreen
is true),
https://github.com/Expensify/App/blob/8bdb753045cf0eee6cf1d342adf8b76040cabac4/src/components/ImageView/index.tsx#L194-L215
we display images using the Lightbox component instead of regular images. This will allow users to interact with the images using touch gestures.
if (canUseTouchScreen) {
return (
<Lightbox
uri={url}
zoomRange={zoomRange}
isAuthTokenRequired={isAuthTokenRequired}
onError={onError}
style={style}
/>
);
}
Lightbox
component also requires additional zoomScale
to define how images are resized.
const zoomScale = Math.min((canvasSize?.width ?? 0) / (contentSize?.width ?? 0), (canvasSize?.height?? 0) / (contentSize?.height ?? 0));
this controls how the image fits within the frame when its original size differs from the frame's dimensions.
<MultiGestureCanvas
isActive={isActive}
canvasSize={canvasSize}
contentSize={contentSize}
zoomRange={zoomRange}
pagerRef={pagerRef}
shouldDisableTransformationGestures={isPagerScrolling}
onTap={onTap}
onScaleChanged={scaleChange}
>
<Image
source={{uri}}
style={contentSize ?? DEFAULT_IMAGE_DIMENSION}
isAuthTokenRequired={isAuthTokenRequired}
onError={onError}
onLoad={updateContentSize}
onLoadEnd={() => {
setLightboxImageLoaded(true);
}}
resizeMode={zoomScale > 1 ? RESIZE_MODES.center : RESIZE_MODES.contain}
/>
</MultiGestureCanvas>
result:
https://github.com/Expensify/App/assets/60419079/6daf30ef-b1e4-4d73-8b11-1469b4046c81
https://github.com/Expensify/App/assets/60419079/33ef5846-5069-4caa-ae78-995cd4c799db
Please reassign. I can't take it!
I can take over.
We are not yet supporting zoom image in mobile web. Is it right time to implement this new feature?
📣 @situchan 🎉 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 📖
Asking internally here https://expensify.slack.com/archives/C066HJM2CAZ/p1708364190263029 whether we need to fix this
Still chatting internally
@laurenreidexpensify, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
Bumped thread internally for further clarity
@situchan confirmed internally - let's do it!
@laurenreidexpensify thanks
@andreasnw thanks for the proposal. Please test your solution yourself on android chrome and iOS safari.
Waiting proposals
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
We only have gestures like pinch on native because of the lightbox implementation here: https://github.com/Expensify/App/blob/8bdb753045cf0eee6cf1d342adf8b76040cabac4/src/components/ImageView/index.native.tsx
However additionally: With the lightbox implementation exactly as defined in https://github.com/Expensify/App/blob/8bdb753045cf0eee6cf1d342adf8b76040cabac4/src/components/ImageView/index.native.tsx
proposed implementation experience: Android: https://github.com/Expensify/App/assets/157416545/7f1d7a51-1dc8-4cfb-ac33-8fc24b648368 IOS:
https://github.com/Expensify/App/assets/157416545/7315f00a-0cc8-471e-a401-a873d32b9cdc
@jeremy-croff zoomScale is necessary to prevent tiny images from looking like this
@jeremy-croff zoomScale is necessary to . The native implementation does not have this behaviour; either it's intentional, or if we want to add a scale factor, both experiencesges.githubusercontent.com/60419079/307819073-342ef517-062c-45d2-9bf3-56f89faffc37.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg5NTY3NDQsIm5iZiI6MTcwODk1NjQ0NCwicGF0aCI6Ii82MDQxOTA3OS8zMDc4MTkwNzMtMzQyZWY1MTctMDYyYy00NWQyLTliZjMtNTZmODlmYWZmYzM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI2VDE0MDcyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0Zjg2MGFlNWRkNDEwZmFkMGVmZDRlM2RlMzYyYTA1NmE5MzJiZWU3MGQ4YmQ1OGI2MGE1YTcxZmQwZjc5Y2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Vg6CjitMNGlPA5VbSgW1FOM-FsdFT2ky1SElXEGUFSE)
Thanks for the example, So my basis is that it's not a requirement, the native implementation does not have this behaviour either it's intentional, or if we want to add a scale factor both experience will need it.
@situchan some new proposals to review ^^
@andreasnw @jeremy-croff do you mind sharing test branches?
@andreasnw @jeremy-croff do you mind sharing test branches?
@laurenreidexpensify @situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
proposals are in review & testing
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@situchan any update on the review and testing yet? thanks
@laurenreidexpensify @situchan this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
I will provide feedback soon
@laurenreidexpensify, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
waiting on feedback from @situchan
@situchan any feedback here from testing?
@laurenreidexpensify @situchan this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
Current assignee @situchan is eligible for the Internal assigner, not assigning anyone new.
updating today
On web, we want exact replication of native approach so replace Image with Lightbox on touchable devices. @andreasnw proposed first. @jeremy-croff I don't find significant difference from your proposal. Please let me know if I am missing anything.
@situchan I provided about 4 bullet points of differences, included a major experience change of zoomScale. Do you confirm you don't want any of these differences?
I checked but all of them look to me minor changes and code refactor which could be addressed in PR review and testing.
I checked but all of them look to me minor changes and code refactor which could be addressed in PR review and testing.
Anything can be addressed in the PR during review, and testing. I believe I added my value by drafting a complete proposal that mentioned key things that have to be done differently that were not done in the proposal.
When we avoid these steps, the BZ cannot expect that we will address these things during the PR.
It seems you are not missing anything, @situchan, but do want my proposed changes. Maybe the nitpick is that you devalued my effort by saying there are no significant changes, did I just wast my time and should not have posted? Should I have suggested these things not in a proposal template? It's actually not about winning the bid, I am happy the original poster got it, but I do believe I have helped them or you.
Additionally, why ask me for a branch if it wasn't significant of a change? The UX is actually a significant change based on the zoomScale alone
@andreasnw @jeremy-croff please update your branches up-to-date with main based on proposals submitted. Please make sure to test yourselves and fix any issues found. I'd like to test and approve one without any minor regression. While this being new feature, easy to cause regressions.
Regarding UX matter, it should behave exactly same as native in production version.
@situchan
updated https://github.com/andreasnw/Expensify/tree/feat/web_app_gesture_handler
@situchan
Out of the four points Jeremy mentioned, the first one seems identical to what I proposed earlier. I didn't include point three because it's quite clear - the app wouldn't function without passing the required properties. I still believe the zoomScale parameter is necessary to avoid the regressions I mentioned previously https://github.com/Expensify/App/issues/36597#issuecomment-1964222929.
2. We should clean up the native implementation as it will be a redudancy.
@situchan
Out of the four points Jeremy mentioned, the first one seems identical to what I proposed earlier. I didn't include point three because it's quite clear - the app wouldn't function without passing the required properties. I still believe the zoomScale parameter is necessary to avoid the regressions I mentioned previously #36597 (comment).
I visually separated the first point from the remaining ones to clearly indicate that it is also part of your proposal!
And yep, the third point you're right about and shouldn't be a detractor.
I'm curious if the zoomScale is desired. It's a major part of your proposal's complexity, but to determine its validity, I brought in native testing for parity to confirm it would actually behave differently from the original. Hence, I view it as a regression, not a feature, since there are no established requirements for this yet.
EDIT: After @situchan posted "Regarding UX matter, it should behave exactly same as native in production version." I think we can confirm we will need to drop zoomScale here.
@laurenreidexpensify, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
I think this is fine to remain as external for now if we have a chance of resolving. Adding help wanted back.
@situchan what are you thinking re: latest proposals
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v1.4.42-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 Expensify/Expensify Issue URL: Issue reported by: Applause - Interna; Team Slack conversation:
Issue found when executing PR https://github.com/Expensify/App/pull/34080
Action Performed:
Expected Result:
Able to zoom the image with pinching
Actual Result:
Unable to zoom the image with pinching
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/ce464be6-14ca-4d7a-a2eb-598f8ae21ba6
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @dukenv0307