nusmods
nusmods copied to clipboard
Unify debug.ts and useGlobalDebugValue into featureFlags.ts
- Move debug.ts flags into new feature flags in featureFlags.ts. These flags should still read from query params.
- Replace useGlobalDebugValue with a new feature flag.
- Ensure featureFlags.ts doesn't throw any errors in tests.
I think we should actually move all the
debug.ts
stuff into dynamic feature flags that check query params on module init, which will prevent pages that change the params (e.g. Venues, Module search) from flipping the debug flags. This can also replaceuseGlobalDebugValue
, with the downside of losing the ability to flip flags after our JS loads.
Originally posted by @taneliang in https://github.com/nusmodifications/nusmods/pull/3212#discussion_r566568096