authgear / authgear/authgear-server

Make colorscheme.ts a module, instead of a classic script

Open
#4,506 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.