Commit 9bda34b
committed
fix(Image): close Image.Swap contract gaps from code review
- Broaden ImageSwap's transitionend handler to finalize done() on any
property, not just opacity. Previously the previous layer leaked
permanently if a consumer wrote a non-opacity transition on
previous-class. Docs now call out that previous-class must include
at least one transition for the exit to resolve.
- Clarify in the docs that data-[has-previous]:opacity-100 on
current-class is not optional — without it, the crossfade shows a
background bleed-through during the 0→1 fade-in. Updated the Class
routing bullet and added a dedicated bullet spelling out the pin
as required.
- Add a code comment in ImageSwap's currentSrc watcher explaining the
cleared-then-restored-src edge case so a future reader sees the
intentional trade-off.
- Rename test describe block 'sSR' → 'SSR' (auto-capitalization tripped
the Vitest reporter output).1 parent ebe7e5d commit 9bda34b
2 files changed
Lines changed: 12 additions & 4 deletions
File tree
- apps/docs/src/pages/components/semantic
- packages/0/src/components/Image
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
172 | | - | |
173 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
174 | 180 | | |
175 | 181 | | |
176 | 182 | | |
| |||
0 commit comments