-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix navigating to reports via Search page on staging #2547
Conversation
} | ||
|
||
return `/${newUrl}`; | ||
} |
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 don't know why I did this to begin with. All the routes start without a slash.
Leaving out the screenshots because there are no visual changes but I did test on all platforms to verify things work OK. @NikkiWines lmk if there's anything that should be explained better - planning to do a follow up after this since I'm not happy with where things are at but staging is borked. Thanks!!!! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production in version: 1.0.39-5🚀
|
return {}; | ||
} | ||
|
||
const pathSegments = route.split('/'); | ||
return { | ||
reportID: lodashGet(pathSegments, 1), | ||
isParticipantsRoute: Boolean(lodashGet(pathSegments, 2)), |
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.
Coming from issue - app crash when url is invalid
If the url has multiple double slash eg: https://.....https//
, pathSegments[2]
will be false.
We should have simply checked the length of the array
More details here - #22507 (comment)
Details
Fixes the broken Search page on staging.
Fixed Issues
Fixes #2538
Tests
QA Steps
/search
screen and select a new chat/r/<reportID>/participants
route by tapping on a group chat header avatarNote: The browser button works unexpectedly if we navigate to a new chat via the "Search" page. Considering that to be not a blocker for now, but will keep looking into it in the future.
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android