authgear / authgear/authgear-server
Make colorscheme.ts a module, instead of a classic script
- Dominant language
- Go
- Stars
- 2k
- Forks
- 125
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 32
Description
In https://github.com/authgear/authgear-server/issues/2058#issuecomment-1148203594 we worked around FOUC by making colorscheme.ts a classic script. But the logic there is now needed to be reused. A classic script cannot import code for reuse. This issue is about
- Reuse the logic in colorscheme.ts, by making it a module.
- Make sure there is no FOUC with this change
Contributor guide
Research direction
Start by locating colorscheme.ts and read the workaround discussed in issue #2058, especially the referenced comment. Refactor it into a reusable module while preserving its current startup behavior, then verify that the change still prevents flash of unstyled content (FOUC).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100