Commit ba991cd
DevBot
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.1 parent 2f0780b commit ba991cd
3 files changed
Lines changed: 53 additions & 1 deletion
File tree
- packages/element/src/internal/compiled
- www
- __tests__
- app/islands
| 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 | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
450 | 454 | | |
| 455 | + | |
451 | 456 | | |
452 | 457 | | |
453 | 458 | | |
| |||
456 | 461 | | |
457 | 462 | | |
458 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
| |||
0 commit comments