Dev Tools: Show what a slot update changed, and where - #2277
Merged
Conversation
|
View your CI Pipeline Execution ↗ for commit cb36434
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
🌿 Interactive Playground and Documentation PreviewA preview deployment has been built for this pull request. Try out the changes live in the interactive playground: 🌱 Grown from commit ✅ Preview deployment has been cleaned up. |
commit: |
marcoroth
force-pushed
the
slots/dev-tools
branch
from
August 18, 2026 02:57
cb36434 to
386ab90
Compare
marcoroth
added a commit
that referenced
this pull request
Aug 19, 2026
This pull request fixes the slot flash in the dev tools overlay which were added in #2277. Both `cssText` strings in `SlotFlash` were written without `;` between the declarations, so each one reads as a single malformed declaration and the browser keeps none of it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request announces every write the slot index makes, and draws it in the browser.
The event carries the slot and not a rectangle, because measuring costs a layout and only a listener knows whether it wants one. Dev Tools uses it to flash what changed, coloured by operation, labelled with the file, the index, the row key and, for an attribute slot, which attribute was written. An element can carry several, and an attribute is the hardest kind of slot to tell apart by looking at the page, since nothing about a class or an id changing is visible in the way text changing is.
Four fixes came out of using it.
A removal was announced after the row had gone, so there was nothing left to measure and nothing to draw a box around, and it reported the collection instead of the row. Removing the only row made both faults visible at once. The event carries the row now, and is said before the row is taken out.
A slot given the value it already has is left alone. Writing it would cost a re-parse, destroy whatever the slot contained, and announce a change that did not happen, so a payload matching the page reports
{ applied: 0, deferred: [] }and touches nothing.class="card <%= state %>"marks the interpolated word whilesetAttributewrites the whole attribute, so applying the value dropped thecardthe template wrote beside it. A demo put its whole footer on one line the first time its layout was updated. A marker says which attribute a slot is, not which stretch of it, so refusing and saying so is the only honest answer until a marker carries the statics around the value.And the last row out of a collection leaves its shape behind. The server parks a row only for a collection that rendered empty, so emptying one in the browser left neither a row to copy nor a parked one, and a table with one row in it deleted is two clicks away from needing another.
CleanShot.2026-08-17.at.03.52.35.mp4