HomeElementl

[dagit] Clean up feature flag code

Description

[dagit] Clean up feature flag code

Summary:
Update how we define and access feature flags in Dagit JS.

  • Add a flag prefix to all feature flag names. This makes the naming a bit more consistent, so we can have better expectations about how these values are referenced (and what they represent) in code.
  • Create useFeatureFlags, which returns a map of flag:boolean. This is basically the same as what we're doing with permissions, which means that the callsite can just extract the desired value from the returned map.
  • Memoize a little more aggressively so that we aren't always parsing from localStorage JSON.
  • Update callsites.

I also removed an outdated flag (LeftNav).

Test Plan: Buildkite. Run Dagit to sanity check behavior.

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://dagster.phacility.com/D8395

Details

Provenance
dishAuthored on Jun 16 2021, 3:21 PM
Reviewer
bengotow
Differential Revision
D8395: [dagit] Clean up feature flag code
Parents
R1:9c89861c3e95: chore: pin psycop2-binary
Branches
Unknown
Tags
Unknown