Commit 005a971
fix(www): restore docs sidebar + footer chrome lost in the compiled-shell refactor (#1318)
* fix(www): restore docs sidebar + footer chrome lost in the compiled-shell refactor (#1317)
Root cause: 7bbef34 (ADR-0143 compiled-shell refactor) deleted the
.docs-sidebar styles and the rich four-column footer from open-layout;
the follow-up test cleanup codified the stripped chrome instead of
restoring it, while entry-render-runtime kept injecting navItems /
currentPath / locale / home into the shell props every render.
Restores:
- docs sidebar (desktop sticky nav + mobile native-details disclosure,
#995 idiom) driven by the previously-dead _generated-nav navSections,
filtered to the active section family with aria-current page marking
- four labeled footer navigation columns (product/resources/company/
legal, en/zh) + footer-bottom strip; orphaned `padding: 0` media rule
replaced with real responsive grid collapse
- header nav links now carry localized hrefs and aria-current state
Coverage hardening (the process gap that let this ship green):
- site-chrome.spec.ts: semantic sidebar/footer assertions (section
filtering, active marking, home renders no sidebar, mobile
disclosure, four labeled columns, bilingual targets)
- visual-baselines.spec.ts: dedicated footer/sidebar element snapshots
(every locale x theme x viewport on home, guide, architecture) —
the route sweep's fullPage:false never captured the page bottom
- accessibility-performance.spec.ts: footer keeps the zero-headings
invariant but now also asserts 4 navigation landmarks + structured
link targets, so the bare-strip regression cannot pass again
- open-layout-navigation.test.ts: pure-function policy tests for URL
safety, locale canonicalization, section filtering, footer model
* fix(element): attribute promotion must not be clobbered by pre-upgrade null sets (#1318)
Hydration on every non-default-locale page failed with
`[compiled-claim] item attribute drift on "href"`: the claim-time
re-derivation of computed shell chrome (sidebar rows, footer columns)
saw default-value signals while the SSR DOM was rendered from
locale-injected props.
Root cause chain (facade-host):
1. A pending pre-upgrade property write of `locale: null` (no real
assignment intent) was coerced by applyPendingOwnValues into the
compiled default ('en') and applied AFTER syncAttributesToSignals —
clobbering the attribute-promoted 'zh'.
2. Generated field initializers that merely restate the compiled default
were likewise captured as pending pre-upgrade sets.
Fixes:
- restatesDefault(): generated initializers that restate the compiled
default (their documented contract, see reconcileOwnProperties) no
longer enter pendingOwnValues.
- applyPendingOwnValues(): null/undefined pending values carry no
pre-upgrade intent and are skipped instead of being coerced to the
default over the promoted attribute value.
Element suite: 254 passed. WWW e2e chromium: 219 passed including
public-routes zh sweep and visual baselines.
* fix(www): de-duplicate footer chrome baselines (route-invariant chrome)
The footer is identical across routes for a given locale/theme/viewport,
so per-route footer snapshots are byte-identical and fail the
exact-duplicate baseline gate (#1230 M15). The footer now owns ONE
baseline per locale x theme x viewport (shot on the home route); the
docs sidebar keeps its per-route baselines because its section filtering
makes each route's chrome distinct. Desktop sidebar baselines were
regenerated under the fixed property-contract behavior (claim now
succeeds and the island actually hydrates, so the committed pixels
reflect the hydrated shell rather than the pre-fix stuck-SSR state).
* fix(www): drop the locale dimension from sidebar chrome baselines
Sidebar labels come from the untranslated generated nav, so en and zh
sidebar pixels are identical and the en/zh pairs fail the
exact-duplicate baseline gate. Sidebar baselines are now shot on the en
locale only, keyed by theme x viewport x route (zh sidebar semantics
stay covered by site-chrome.spec.ts).
---------
Co-authored-by: DevBot <devbot@openelement.dev>1 parent 9bb6877 commit 005a971
151 files changed
Lines changed: 1004 additions & 18 deletions
File tree
- packages/element/src/internal/compiled
- www
- __tests__
- app
- islands
- site-ui
- e2e
- visual-baselines.spec.ts-snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
| |||
150 | 166 | | |
151 | 167 | | |
152 | 168 | | |
153 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
154 | 182 | | |
155 | 183 | | |
156 | 184 | | |
| |||
294 | 322 | | |
295 | 323 | | |
296 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
297 | 331 | | |
298 | 332 | | |
299 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
37 | 67 | | |
38 | 68 | | |
39 | 69 | | |
| |||
0 commit comments