-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[expo-dev-menu][expo-dev-launcher] Disable onboarding popup with URL query param #19024
[expo-dev-menu][expo-dev-launcher] Disable onboarding popup with URL query param #19024
Conversation
ENG-5957 Make a user facing API to disable the intro pop up
as this gets in the way of testing, and the current mechanism was built for Snack and is not user friendly Document as well |
packages/expo-dev-menu/android/src/debug/java/expo/modules/devmenu/DevMenuDevSettings.kt
Show resolved
Hide resolved
packages/expo-dev-menu/android/src/main/java/expo/modules/devmenu/DevMenuActivity.kt
Show resolved
Hide resolved
...ages/expo-dev-menu/android/src/main/java/expo/modules/devmenu/extensions/DevMenuExtension.kt
Show resolved
Hide resolved
...es/expo-dev-menu/android/src/main/java/expo/modules/devmenu/modules/DevMenuInternalModule.kt
Show resolved
Hide resolved
packages/expo-dev-menu/android/src/release/java/expo/modules/devmenu/DevMenuManager.kt
Show resolved
Hide resolved
5dc8218
to
0ecc284
Compare
0ecc284
to
faaa4b7
Compare
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.
Looks good! Personally I think it makes more sense to have a separate flag for disabled rather than turning off isOnboardingFinished
in this case, but I don't think it makes much of a difference.
Is there some instructions / plans for documentation around this? I'm not 100% familiar with detox configurations, it might be nice to add some info around this
@@ -84,8 +84,10 @@ public class DevMenuPreferences: NSObject, RCTBridgeModule { | |||
|
|||
/** | |||
Returns `true` only if the user finished onboarding, `false` otherwise. | |||
This is now public because expo-dev-launcher needs access |
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 is now public because expo-dev-launcher needs access | |
This is public because expo-dev-launcher needs access |
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.
@ajsmth I am actively working on the docs for this -- had a discussion with @brentvatne yesterday and we are attempting to figure out exactly where this should be in the docs ("Development Builds" and/or "EAS E2E tests").
I'll go ahead and land this and create a separate PR for the doc changes.
…query param (#19024) Add code to check for `disableOnboarding` in the URL and set `DevMenuPreferences.isOnboardingFinished=true` before the app launches. Additionally, if testing in Detox, you can pass in a launch param to disable the onboarding popup in iOS (but not in Android). Made this change in the `apps/bare-expo` Detox tests.
…query param (expo#19024) Add code to check for `disableOnboarding` in the URL and set `DevMenuPreferences.isOnboardingFinished=true` before the app launches. Additionally, if testing in Detox, you can pass in a launch param to disable the onboarding popup in iOS (but not in Android). Made this change in the `apps/bare-expo` Detox tests.
Hi @douglowder I saw your description and was wondering - will this change not work on android? |
@pradeipp this change works correctly on Android. The issue with Android is just with Detox testing, and is still under investigation. |
great, thank you @douglowder is there an issue for it that I can follow? |
Why
The onboarding popup breaks some UI tests (e.g. Detox), so there should be an easy way to disable it without having to rebuild the app.
How
Add code to check for
disableOnboarding
in the URL and setDevMenuPreferences.isOnboardingFinished=true
before the app launches.Additionally, if testing in Detox, you can pass in a launch param to disable the onboarding popup in iOS (but not in Android) as in this example:
Test Plan
Tested by passing in a URL like
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&disableOnboarding=1
in the dev launcher.Checklist
expo prebuild
& EAS Build (eg: updated a module plugin).