Remove Onyx.connect() for the key: ONYXKEYS.NVP_LAST_LOCATION_PERMISSION_PROMPT#66740
Remove Onyx.connect() for the key: ONYXKEYS.NVP_LAST_LOCATION_PERMISSION_PROMPT#66740danieldoglas merged 17 commits intoExpensify:mainfrom
Conversation
|
@allgandalf The PR is ready |
allgandalf
left a comment
There was a problem hiding this comment.
dummy review to keep PR in k2 and in sight, sorry for the delay @DylanDylann , the PR was not in my K2 so i totally forgot to review this one today
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-07-30.at.12.44.37.PM.movMacOS: DesktopScreen.Recording.2025-07-30.at.12.48.08.PM.mov |
allgandalf
left a comment
There was a problem hiding this comment.
@DylanDylann can you add an automated test for this one?
|
@allgandalf You mean UTs for shouldStartLocationPermissionFlow func, right? |
|
I think UI test will make more sense here right? |
@allgandalf Why do you think that? this only be an until function. You mean we need to cover test for all the flow, right? |
|
yeah, are you planning to add a UT for this? i'm a bit confused by what you meant |
|
@allgandalf Yeah I think UT for shouldStartLocationPermissionFlow func is enough |
|
@allgandalf Any update? |
There was a problem hiding this comment.
Instead of adding lastLocationPermissionPrompt as a parameter here, can we instead:
- create a
useIOUUtilsthat will return the current functions - leave
NVP_LAST_LOCATION_PERMISSION_PROMPTas aconnectWithoutViewdependency here - use the
shouldStartLocationPermissionFlowfunction as a dependency in the functions that use it
That way we don't need to add a dependency for NVP_LAST_LOCATION_PERMISSION_PROMPT in all places that use that function.
@DylanDylann @allgandalf please let me know if you think this would be a better approach
|
Makes sense to me @danieldoglas ! |
|
@danieldoglas @allgandalf If we use connectWithoutView, the component won't re-render when shouldStartLocationPermissionFlow changes, which might lead to unexpected behavior. Also, since the above suggestion still uses useIOUUtils directly within the UI, I’m not certain connectWithoutView is applicable in this case. Please feel free to correct me if I’m mistaken. |
|
|
I think (and I might be wrong, @allgandalf @tgolen please correct me if I am) that if you create a useIOUUtils that returns That way if there's any changes in the but again, I might be misunderstanding this. So I'll let the others chime in. |
|
@allgandalf Could you please review this PR? |
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.1.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.1.88-3 🚀
|
Explanation of Change
Fixed Issues
$ #66323
PROPOSAL:
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-07-19.at.21.01.03.mov
Android: mWeb Chrome
Screen.Recording.2025-07-19.at.20.59.05.mov
iOS: Native
Screen.Recording.2025-07-19.at.20.59.53.mov
iOS: mWeb Safari
Screen.Recording.2025-07-19.at.20.56.07.mov
MacOS: Chrome / Safari
Screen.Recording.2025-07-19.at.20.44.57.mov
MacOS: Desktop
Screen.Recording.2025-07-19.at.20.51.26.mov