You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Adding widthInEm field to injected text options (#332340)
* Add injected text decoration fixtures
Establish stable dark and light visual baselines for color decorators and inline progress before changing injected text width handling.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refactor line break test helper for injected text
Allow focused wrapping tests to supply injected text without changing existing test behavior.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Stabilize injected text decoration fixtures
Remove focus-dependent current-line highlighting so fixture hashes remain stable across clean explorer sessions.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Carry fixed width metadata through editor rendering
Thread optional injected-text width metadata through decoration normalization and line parts without changing wrapping or rendered output. The ordinary decoration path avoids allocating width storage when no fixed width is present.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add failing tests for fixed-width injected text
Cover wrapping width, atomic multi-character injections, and rendering through a width-enforcing wrapper that preserves decorated token spans.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add proportional-font injected text fixture
Exercise fixed-width wrapping through the real DOM line-break computer and use registered editor contribution metadata in the existing visual fixtures.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Exercise advanced injected text wrapping
Force the proportional-font fixture through the DOM line-break computer so it validates atomic fixed-width wrapping rather than the monospace fallback.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Support fixed-width injected text wrapping
Treat widthInEm injections as atomic in both monospace and DOM line-break computation and enforce the width on the existing flat renderer span. Reject custom tokens with fixed widths and retain the unchanged fast path for ordinary lines.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Account for inline progress decoration width
Declare the existing 1em inline progress placeholder width for wrapping. Its computed geometry and component fixture screenshot remain unchanged.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Account for inlay hint spacer width
Express the existing rounded pixel spacer width relative to the editor font so wrapping reserves the same width that CSS already renders.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Account for color decorator width when wrapping
Reserve the existing 1.2em occupied width while retaining the original 0.8em square and margins. Dark and light component fixture hashes remain identical.
Fixes#32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add fixed-width injected text coverage
Cover adjacent and oversized atomic injections, render the real padded inlay hint contribution in component fixtures, and add approved dark/light visual expectations for all fixed-width scenarios.
Refs #32856
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix fixed-width injected text rendering
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* wip
* wip
* review changes
* wip
* removing rendering code
* wip
* polishing
* polishing
* updating screenshots
* Remove injected text component fixtures
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* checking widthInEm is defined, finite and positive
* removing change to inlayhintscontroller
* making firstFixedWidthRange as being potentially undefined more explicit
* adding check on fixedWidthRangeIndex index
* using one accumulator
* using pixels for wrapping
* allowing to set empty content
* polish
* putting back inline progress nbsp
* updating color decorator screenshots
The color swatches use `content: ''`, so their `inline-block` aligns by
its bottom margin edge instead of an inner text baseline. This shifts
each swatch up by roughly half a pixel; the swatch body is otherwise
unchanged. Update the four affected hashes.
InlineProgress is untouched: restoring `noBreakWhitespace` there brought
its rendering back to the committed screenshots, since `widthInEm` only
feeds line-break computation and never reaches the DOM.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix 'the wrapping algorithm now wraps immediately after color boxes'
* fixing #332340 (comment)
* fixing #332340 (comment)
* fixing #332340 (comment)
* align the color decorator bottom
* restoring non breaking space
* checking is escaped line break at offset charStartOffset
* fixing 'Oversized width-only injected text creates an empty output line'
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Alexandru Dima <alex.dima@outlook.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments