Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[TS migration] Migrate 'ImageView' component to TypeScript #34202
[TS migration] Migrate 'ImageView' component to TypeScript #34202
Changes from 4 commits
80f3867
5ffd8e7
a6b4682
3f19479
75810ae
f8bb83d
e0c74d3
ea739c4
3e4c2fd
df1502d
dbadc31
f2324c2
13c2a36
4971bde
22f73e2
bf30565
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The native event here is PointerEvent. Should we just convert the type for this case? I think we should bring this to slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raised here: https://expensify.slack.com/archives/C01GTK53T8Q/p1705315749638509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabioh8010 Thanks for your help. I just wonder can we remove nativeEvent here? As what I know,
e.nativeEvent.x
is the same ase.x
in web/desktop platform. Fortunately, we're spliting ImageView into 2 files index.tsx and index.native.tsx.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree your suggestion is better than
any
type, but it's quite workaround. If we know the reason behind usingnativeEvent
, we'll be all good with your idea ^There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well if it's well tested and it's working I believe you can change to remove
nativeEvent
, same for the other caseconst isInsideImageView = scrollableRef.current.contains(e.nativeEvent.target);
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the other function:
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to MultiGestureCanvas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MultiGestureCanvas can be out of scope