Skip to content

Migrate experimental feature flags to use global store

Administrator requested to merge fkling/refactor-experimental-features into main

Created by: fkling

This PR migrates the feature flags that currently reside in the state of SourcegraphWebApp to useExperimentalFeatures.

This won't improve performance or rerendering since those flags are only set once, but it avoids prop drilling those values to the components that need them.

  • showSearchContext
  • showSearchContextManagement
  • showOnboardingTour
  • showEnterpriseHomePanels
  • showMultilineSearchConsole
  • enableCodeMonitoring
  • enableAPIDocs

I'm creating a separate commit for every flag to make it easier to review.

Note: Finding the right place in the component hierarchy to add fetch the flags can be tricky. I tried to do it in a way that wouldn't require to change tests, but it wasn't always avoidable.

Merge request reports

Loading