Skip to content
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

Add native_pwi_disabled feature gate experiment #4507

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

estrattonbailey
Copy link
Member

This adds an experiment to the logged-out view on native only. To do so, we need to fetch Statsig config immediately. So, if we have no user to resume from, we do a full load of Statsig data to ensure we have accurate config based on the stable device ID.

To do this, I tested calling initialize with prefetchUsers on the options object, but this failed all three tests I did, in that it didn't load the config in time. So I opted to adjust the API of tryFetchGates to allow undefined as the DID value, which will then fall back to using the stable device ID.

This works in my testing every time:

  • delete app to clear storage
  • re-run yarn ios
  • see that the config in Statsig dashboard is correct
    • I've been using 100% on or 100% off
  • repeat

Copy link

render bot commented Jun 13, 2024

Copy link

github-actions bot commented Jun 13, 2024

Old size New size Diff
7.42 MB 7.42 MB 77 B (0.00%)

@@ -14,6 +14,8 @@ import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback'
import {LogEvents} from './events'
import {Gate} from './gates'

const SDK_KEY = 'client-SXJakO39w9vIhl3D44u8UupyzFl4oZ2qPIkjwcvuPsV'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind using it below in the Provider? it's hardcoded there too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, good call

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm, small nit

@estrattonbailey estrattonbailey merged commit 332524b into main Jun 17, 2024
6 checks passed
@gaearon gaearon deleted the test-pwi-native branch June 17, 2024 18:26
estrattonbailey added a commit that referenced this pull request Jun 18, 2024
* origin/main: (22 commits)
  Disable newskie dialog tap in hover card web (#4562)
  Implement thread locking (#4545)
  Prevent unecessary calls (#4561)
  Force callers of `getTimeAgo` to pass in the value for "now" (#4560)
  Fix: only apply self-thread load-more behavior on the outer edge of the reply tree (#4559)
  Server-side thread mutes (#4518)
  Explore fixes (#4540)
  Is it "newskie" or "newsky" 🤔  (#4557)
  fix keyboard overlaying onboarding inputs (#4558)
  Add `useGetTimeAgo` and utils (#4556)
  Unconditionally polyfill Intl.PluralRules for native (#4554)
  Dedupe Zod installation (#4551)
  Use exact imports for icons (#4549)
  Fix Android startup perf regression (#4544)
  Explore feed cards (#4521)
  Onboarding fixes (#4508)
  Add `native_pwi_disabled` feature gate experiment (#4507)
  Select, don't mutate (#4541)
  Don't show "Pin/Add" button on feed card w/ no session (#4539)
  Add patch for `RCTBaseTextInput` fixing `selectTextOnFocus` prop (#4533)
  ...
estrattonbailey added a commit that referenced this pull request Jun 18, 2024
* origin/main: (35 commits)
  Bump labeler limit to 20 (#4565)
  Migrate local thread mutes (#4523)
  Disable newskie dialog tap in hover card web (#4562)
  Implement thread locking (#4545)
  Prevent unecessary calls (#4561)
  Force callers of `getTimeAgo` to pass in the value for "now" (#4560)
  Fix: only apply self-thread load-more behavior on the outer edge of the reply tree (#4559)
  Server-side thread mutes (#4518)
  Explore fixes (#4540)
  Is it "newskie" or "newsky" 🤔  (#4557)
  fix keyboard overlaying onboarding inputs (#4558)
  Add `useGetTimeAgo` and utils (#4556)
  Unconditionally polyfill Intl.PluralRules for native (#4554)
  Dedupe Zod installation (#4551)
  Use exact imports for icons (#4549)
  Fix Android startup perf regression (#4544)
  Explore feed cards (#4521)
  Onboarding fixes (#4508)
  Add `native_pwi_disabled` feature gate experiment (#4507)
  Select, don't mutate (#4541)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants