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

🪟 🎉 Fetch LaunchDarkly flags & experiments scoped to a workspace #22638

Merged
merged 5 commits into from
Feb 10, 2023

Conversation

josephkmh
Copy link
Contributor

@josephkmh josephkmh commented Feb 9, 2023

What

This PR allows us to use workspace-scoped flags on the frontend

How

  • Updates our SDK to version 3.1.0 (not strictly necessary for this PR, but opens the door to use contexts later)
  • Adjusts our mapUserToLDUser() method to accept an optional workspaceId
  • Changes our useCurrentWorkspaceId() hook to work outside <Route> elements (useful for other situations as well!)
  • Adjusts useEffect() in LDExperimentService that detects location changes and re-identifies the user

@octavia-squidington-iii octavia-squidington-iii added the area/frontend Related to the Airbyte webapp label Feb 9, 2023
@josephkmh josephkmh requested a review from timroes February 9, 2023 13:25
@josephkmh josephkmh marked this pull request as ready for review February 9, 2023 13:25
@josephkmh josephkmh requested a review from ambirdsall February 9, 2023 14:20
Copy link
Contributor

@timroes timroes 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, have seen and debugged together with Joey, so saw the functionality working as expected and allowing us to trigger in LaunchDarkly as we'd expect. Small comment, but other than that looks good for me.

@josephkmh josephkmh enabled auto-merge (squash) February 10, 2023 09:33
@josephkmh josephkmh merged commit dfc88f4 into master Feb 10, 2023
@josephkmh josephkmh deleted the joey/launch-darkly-workspace-context branch February 10, 2023 09:57
sh4sh pushed a commit that referenced this pull request Feb 10, 2023
)

* identify users by workspace

* refactor useCurrentWorkspaceId

* remove duplicate useEffect

* remove unused enum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants