Unify debug.ts and useGlobalDebugValue into featureFlags.ts
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start by comparing debug.ts, featureFlags.ts, and the useGlobalDebugValue implementation to trace how query parameters are read and when flags are initialized. Move the debug flags and global debug behavior into featureFlags.ts while preserving query-parameter support, then verify that featureFlags.ts does not throw errors in tests.
Written by the indexing model from the issue text.
Description
- 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.tsstuff 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
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 364
- Avg merge
- 7h 5m
- Merged PRs (30d)
- 14
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nusmodifications/nusmods
-
venue data
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nusmodifications/nusmods#4571 ·
-
venue data
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nusmodifications/nusmods#4570 ·
-
venue data
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nusmodifications/nusmods#4563 ·
-
venue data
Difficulty 1/5 Under an hour Newbie friendliness 75/100
nusmodifications/nusmods#4559 ·
-
venue data
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
nusmodifications/nusmods#4556 ·
All issues in nusmodifications/nusmods
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100