Hide contact import button on web#63936
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-06-11.at.23.26.54.mp4MacOS: Chrome / SafariScreen.Recording.2025-06-11.at.23.25.10.movMacOS: DesktopScreen.Recording.2025-06-11.at.23.07.33.mov |
| const isWebOrDesktop = platform === CONST.PLATFORM.WEB || platform === CONST.PLATFORM.DESKTOP || platform === CONST.PLATFORM.MOBILE_WEB; | ||
| const showImportContacts = canUseNativeContactImport && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED); |
There was a problem hiding this comment.
| const isWebOrDesktop = platform === CONST.PLATFORM.WEB || platform === CONST.PLATFORM.DESKTOP || platform === CONST.PLATFORM.MOBILE_WEB; | |
| const showImportContacts = canUseNativeContactImport && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED); | |
| const isNative = platform === CONST.PLATFORM.ANDROID || platform === CONST.PLATFORM.IOS; | |
| const showImportContacts = canUseNativeContactImport && isNative && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED); |
How about adding platform condition here only?
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@perunt Do we need to QA this? There are no QA steps. |
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.1.66-0 🚀
|
|
@perunt we followed steps from the original issue, hope, it is ok |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.66-5 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.66-5 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.66-5 🚀
|
| const showImportContacts = canUseNativeContactImport && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED); | ||
| const platform = getPlatform(); | ||
| const isNative = platform === CONST.PLATFORM.ANDROID || platform === CONST.PLATFORM.IOS; | ||
| const showImportContacts = isNative && canUseNativeContactImport && !(contactPermissionState === RESULTS.GRANTED || contactPermissionState === RESULTS.LIMITED); |
There was a problem hiding this comment.
Showing this for all instances on native was causing 'no results found' instead of 'invalid phone number', we fixed this in #73618
There was a problem hiding this comment.
this caused a bug - Expense - Import contacts option is shown briefly in Share page
Explanation of Change
Fixed Issues
$ #63917
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop