The splash is the photograph, and it is painted before the app exists
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
Two things about the launch screen on the phone. **No mark on it.** The photograph is the screen now — the logo that sat in the middle is gone, and so is the vignette that existed to keep that logo readable. Nothing to read, just the picture, which is what was asked for. **It no longer waits for React.** Until now the splash was a React element, so it could not appear until the bundle had downloaded, parsed and mounted — on a phone that is the long blank stretch between opening the app and seeing anything, and it is why the splash seemed to arrive late and then flash past: by the time it rendered, the app was nearly ready. index.html now paints the same photograph from inline styles, so it is on screen as soon as the HTML is parsed, with the bundle still downloading behind it. React replaces the container's contents when it mounts, and the two screens are identical — same image, same object-fit, same base colour behind it while the picture decodes — so the handover cannot be seen as anything but the app arriving. The blank before even that is iOS's own launch screen, which is what apple-touch-startup-image covers: production already serves all fourteen, so a PWA that still opens white is one that was installed before those existed. Removing the icon from the home screen and adding it again is what makes iOS pick them up — its launch images are read at install time, not on every launch.
This commit is contained in:
1 parent
b6d3512c36
commit
45183c725f
4 files changed
+22
-15
No files matched your search
+13
-1
@@ -72,7 +72,19 @@
|
||||
<div class="aura-layer-2"></div>
|
||||
<div class="aura-layer-3"></div>
|
||||
</div>
|
||||
<div id="root"></div>
|
||||
<div id="root">
|
||||
<!-- The first thing the browser can paint at all. The splash React renders (`.boot-splash` in
|
||||
index.css) cannot appear until the app's bundle has downloaded and run, and on a phone that
|
||||
is the long blank stretch between opening the app and seeing anything. This is the same
|
||||
photo with the same rules, written inline so it needs neither the stylesheet nor a line of
|
||||
JavaScript, and React replaces the container's contents the moment it mounts — the two
|
||||
screens are identical, so the handover is invisible.
|
||||
The background behind the photo is the aura's base colour: the image takes a moment to
|
||||
decode, and a dark frame is not a flash of white. -->
|
||||
<div aria-hidden="true" style="position:fixed;inset:0;z-index:1;overflow:hidden;background:#100e0b">
|
||||
<img src="splash.webp" alt="" style="position:absolute;inset:0;width:100%;height:100%;object-fit:cover">
|
||||
</div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user