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

feat: RemoteConfig loader #1577

Merged
merged 16 commits into from
Dec 5, 2024
Merged

feat: RemoteConfig loader #1577

merged 16 commits into from
Dec 5, 2024

Conversation

benjackwhite
Copy link
Collaborator

@benjackwhite benjackwhite commented Dec 3, 2024

Changes

Needs PostHog/posthog#26348

Work to implement the new RemoteConfig loader which will enable us to eventually replace /decide with /flags

This PR should not affect anything directly, but rather add a flagged _preview_remote_config option which will then load our new endpoint before calling decide (which we can then swap out for flags in the future).

The big change for reviewers is moving away from afterDecideResponse to onRemoteConfig which is almost the same as before. The things that require flags are changed to use the onFeatureFlags callbacks instead.

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Dec 5, 2024 8:47am

@posthog-bot
Copy link
Collaborator

Hey @benjackwhite! 👋
This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

Copy link

github-actions bot commented Dec 3, 2024

Size Change: +12.3 kB (+0.39%)

Total Size: 3.19 MB

Filename Size Change
dist/array.full.es5.js 259 kB +1.28 kB (+0.5%)
dist/array.full.js 362 kB +1.26 kB (+0.35%)
dist/array.full.no-external.js 361 kB +1.19 kB (+0.33%)
dist/array.js 177 kB +1.25 kB (+0.71%)
dist/array.no-external.js 175 kB +1.17 kB (+0.67%)
dist/external-scripts-loader.js 2.36 kB +71 B (+3.1%)
dist/main.js 177 kB +1.25 kB (+0.71%)
dist/module.full.js 362 kB +1.26 kB (+0.35%)
dist/module.full.no-external.js 361 kB +1.19 kB (+0.33%)
dist/module.js 177 kB +1.25 kB (+0.71%)
dist/module.no-external.js 175 kB +1.17 kB (+0.67%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 206 kB
dist/customizations.full.js 12.5 kB
dist/dead-clicks-autocapture.js 14.3 kB
dist/exception-autocapture.js 9.37 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 57.6 kB
dist/surveys.js 63.2 kB
dist/tracing-headers.js 1.75 kB
dist/web-vitals.js 10.3 kB

compressed-size-action

@benjackwhite benjackwhite marked this pull request as ready for review December 3, 2024 17:11
@benjackwhite benjackwhite added the bump patch Bump patch version when this PR gets merged label Dec 3, 2024
src/types.ts Outdated Show resolved Hide resolved
Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

seems to work when hooked up with the parent PR though

so other than a though about error handling which might be fine 🚢

Co-authored-by: Paul D'Ambra <[email protected]>
@benjackwhite benjackwhite merged commit bd75190 into main Dec 5, 2024
13 checks passed
@benjackwhite benjackwhite deleted the feat/serverless-decide branch December 5, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants