Show the loading view before the app starts (#134) #135

Merged
jcoffey-dev merged 1 commits from fix/boot-placeholder into main 2026-11-20 22:12:02 +00:00
Owner

Fixes #134.

Opening the app drew nothing until the bundle had downloaded and React mounted. index.html now holds the loading view inside #root, so it shows before any JavaScript runs, and React replaces it when it mounts. It's the admin console's loading view: the inbuxa mark bouncing with the spinner under it. There's no text, since nothing can be translated yet.

  • The app shows the same view (AppLoading, web/src/ui/misc.tsx) while the session is checked and the account's settings load, in place of the bare spinner, so the handover doesn't move anything.
  • The rules live in index.html because the stylesheet arrives with the bundle. Until a theme is applied they use the default theme's colors (ihasmail, dark), written out; after that they follow the theme.
  • The bounce and spin stop under prefers-reduced-motion.
  • The mark is inbuxa's on a renamed (APP_NAME) instance too: its name isn't known until the server answers.
  • Under a BASE_PATH the mark's URL gets the prefix like the favicon (checked with BASE_PATH=/mail: /mail/img/inbuxa-mark.png).

Tests: typecheck, web tests (1621), i18n:check; placeholder checked in headless Chromium (dark default background, mark and ring centered).

Fixes #134. Opening the app drew nothing until the bundle had downloaded and React mounted. `index.html` now holds the loading view inside `#root`, so it shows before any JavaScript runs, and React replaces it when it mounts. It's the admin console's loading view: the inbuxa mark bouncing with the spinner under it. There's no text, since nothing can be translated yet. - The app shows the same view (`AppLoading`, `web/src/ui/misc.tsx`) while the session is checked and the account's settings load, in place of the bare spinner, so the handover doesn't move anything. - The rules live in `index.html` because the stylesheet arrives with the bundle. Until a theme is applied they use the default theme's colors (ihasmail, dark), written out; after that they follow the theme. - The bounce and spin stop under `prefers-reduced-motion`. - The mark is inbuxa's on a renamed (`APP_NAME`) instance too: its name isn't known until the server answers. - Under a `BASE_PATH` the mark's URL gets the prefix like the favicon (checked with `BASE_PATH=/mail`: `/mail/img/inbuxa-mark.png`). **Tests:** typecheck, web tests (1621), `i18n:check`; placeholder checked in headless Chromium (dark default background, mark and ring centered).
jcoffey-dev added this to the 27.1 milestone 2026-11-20 22:09:13 +00:00
jcoffey-dev added 1 commit 2026-11-20 22:09:13 +00:00
Show the loading view before the app starts (#134)
ci / node (pull_request) Skipped
ci / version (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m3s
ci / docker-build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / announce (pull_request) Skipped
769992687b
Opening the app drew nothing until the bundle had downloaded and React
mounted: #root was empty. index.html now holds the loading view inside
#root, so it shows before any JavaScript runs and React replaces it when
it mounts. It's the admin console's: the inbuxa mark bouncing, with the
spinner under it, and no text, since nothing can be translated yet.

The app shows the same view, AppLoading, while the session is checked
and the account's settings load, in place of the bare spinner, so the
handover doesn't move anything. Its rules sit in index.html because the
stylesheet arrives with the bundle. Until a theme is applied they use the
default theme's colors written out; the stylesheet's :root holds the
light values, which would flash before applyTheme() runs. After that they
follow the theme. The bounce and the spin stop for reduced motion.

The mark is inbuxa's on a renamed instance too: its name isn't known until
the server answers.

Fixes #134
jcoffey-dev merged commit 366b731638 into main 2026-11-20 22:12:02 +00:00
jcoffey-dev deleted branch fix/boot-placeholder 2026-11-20 22:12:02 +00:00
Sign in to join this conversation.