nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Unify debug.ts and useGlobalDebugValue into featureFlags.ts

Open taneliang opened this issue 4 years ago • 0 comments

  1. Move debug.ts flags into new feature flags in featureFlags.ts. These flags should still read from query params.
  2. Replace useGlobalDebugValue with a new feature flag.
  3. 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 replace useGlobalDebugValue, 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

taneliang avatar Jan 29 '21 04:01 taneliang