Skip to content

Commit 484085c

Browse files
committed
docs(CHANGES) Add 0.0.1a20 sidebar logo LCP fix entry
why: Document the user-visible LCP regression fix shipping in 0.0.1a20 alongside the visual-identity ship that already landed on trunk. what: - Lead paragraph for 0.0.1a20 explaining the prefetch→preload switch and its critical-path priority impact. - ### Fixes section with "Sidebar logo loads as a critical-path resource" deliverable covering the link directive switch, img fetchpriority attr, and CSS aspect-ratio fallback. - Reorder so Fixes precedes Documentation per the CHANGES subheading order convention.
1 parent abd3421 commit 484085c

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

CHANGES

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,39 @@ $ uv add gp-sphinx --prerelease allow
1818

1919
<!-- To maintainers and contributors: Please add notes for the forthcoming version below -->
2020

21+
gp-sphinx 0.0.1a20 closes a Largest-Contentful-Paint regression on
22+
the sidebar logo across every consumer docs site. Web-Vitals reports
23+
recorded LCP timings of 2.7 to 6.7 seconds because the bundled theme
24+
emitted a `<link rel="prefetch" as="image">` hint for the logo URLs
25+
instead of a `<link rel="preload" as="image" fetchpriority="high">`;
26+
the prefetch directive is reserved for future-navigation hints that
27+
browsers defer to idle. Switching the directive to `preload` plus
28+
`fetchpriority="high"` promotes the logo to the same critical-path
29+
priority the bundled fonts already use.
30+
31+
### Fixes
32+
33+
#### Sidebar logo loads as a critical-path resource
34+
35+
Sidebar logos were the Largest Contentful Paint element on every
36+
consumer docs site with timings of 2.7 to 6.7 seconds. The
37+
`gp-furo-theme` template emitted `<link rel="prefetch">` hints for
38+
the logo URLs — a low-priority "future navigation" directive that
39+
browsers defer until idle — even though the logo sits above the
40+
fold on first paint. The fix switches the directive to
41+
`<link rel="preload" as="image" fetchpriority="high">`, mirroring
42+
the pattern already used for the bundled font preloads, and adds a
43+
matching `fetchpriority="high"` attribute to the `<img>` tag.
44+
45+
Cumulative Layout Shift was already zero on these sites — the
46+
`<img>` carries `width="200" height="200"` so the browser reserves
47+
the 200×200 box before bytes arrive. As belt-and-suspenders for any
48+
consumer using `gp-furo-theme` standalone (without
49+
`sphinx-gp-theme`'s overlay), the `.sidebar-logo-container` CSS
50+
gains `aspect-ratio: 1 / 1` and `.sidebar-logo` gains
51+
`height: auto`, so the box reserves the same square regardless of
52+
whether the HTML attrs make it through theme customisations. (#40)
53+
2154
### Documentation
2255

2356
#### Visual identity for the gp-sphinx docs site

0 commit comments

Comments
 (0)