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
Report Attachments Modal Route #20167
Report Attachments Modal Route #20167
Changes from 9 commits
7b00c12
1aec799
eb3e092
2c758a4
236df33
2b164e9
ca27f0d
d5c6e4c
3d5bc85
f08d740
305fcc4
5b3be9a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This can be replaced by a call to
useNavigation
and thennavigation.navigate('Report_Attachment', {.reportID, source })
Everywhere else we use
Navigation.navigate
andROUTES
so I've opted for the same approach here, but this allows deep linking and link sharing and this feature might be unwantedThere 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.
Utilizing
RootStack.Screen
proved to be the only viable solution for overlaying the modal over the opened chat. I tested alternative navigators such asCENTRAL_PANE_NAVIGATOR
,FULL_SCREEN_NAVIGATOR
, andRIGHT_MODAL_NAVIGATOR
. However, these alternatives resulted in a blank screen beneath the modal. This undesired outcome was visible for at least half a second during the modal's closing transition.Sample Behavior When Not Using
RootStack
Please refer to the following link for a demonstration of this behavior without the use of
RootStack
:Android.Emulator.-.Pixel_2_API_29_5554.2023-06-14.16-28-43.mp4
Sample Behavior When Using
RootStack
For comparison, the following link shows the preferred outcome achieved when utilizing
RootStack
:Android.Emulator.-.Pixel_2_API_29_5554.2023-06-14.16-31-27.mp4
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 found it necessary to introduce an extra
OR
condition in our logic. For better readability and understanding of the flow, I decided to convert this structure into a switch statement.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
source
can be a number (viewing assets in native) but the decoded uri is always a string which makes the image fail to load. We needed to preserve the type of the passed source. (Coming from #31138)