Adding widthInEm field to injected text options - #332340
Draft
Aiday Marlen Kyzy (aiday-mar) wants to merge 23 commits into
Draft
Adding widthInEm field to injected text options#332340Aiday Marlen Kyzy (aiday-mar) wants to merge 23 commits into
Aiday Marlen Kyzy (aiday-mar) wants to merge 23 commits into
Conversation
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aiday Marlen Kyzy (aiday-mar)
marked this pull request as draft
August 24, 2026 14:56
Copilot started reviewing on behalf of
Aiday Marlen Kyzy (aiday-mar)
August 24, 2026 14:56
View session
Contributor
Screenshot ChangesBase: Added (8) |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds atomic widthInEm support for injected editor text, including wrapping, rendering, and component fixtures.
Changes:
- Propagates fixed-width metadata through editor projection and rendering.
- Migrates color decorators, inlay spacing, progress, and breakpoint placeholders.
- Adds unit and visual coverage for fixed-width injected text.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts |
Supports visual descriptions. |
src/vs/workbench/test/browser/componentFixtures/editor/injectedTextDecorations.fixture.ts |
Adds injected-text fixtures. |
src/vs/workbench/contrib/debug/test/browser/breakpoints.test.ts |
Tests breakpoint width. |
src/vs/workbench/contrib/debug/browser/media/debug.contribution.css |
Removes CSS width. |
src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts |
Sets breakpoint width metadata. |
src/vs/editor/test/common/viewModel/monospaceLineBreaksComputer.test.ts |
Tests fixed-width wrapping. |
src/vs/editor/test/common/viewModel/lineBreakData.test.ts |
Tests option validation. |
src/vs/editor/test/common/viewModel/inlineDecorations.test.ts |
Tests width projection. |
src/vs/editor/test/common/viewLayout/viewLineRenderer.test.ts |
Tests rendered spans. |
src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts |
Tests projected decorations. |
src/vs/editor/test/browser/view/domLineBreaksComputer.test.ts |
Adds DOM wrapping tests. |
src/vs/editor/standalone/browser/colorizer.ts |
Supplies empty width metadata. |
src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.ts |
Renders fixed-width parts. |
src/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css |
Removes CSS width. |
src/vs/editor/contrib/inlineProgress/browser/inlineProgress.ts |
Sets progress width metadata. |
src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.ts |
Updates renderer arguments. |
src/vs/editor/contrib/inlayHints/browser/inlayHintsController.ts |
Adds fixed-width hint spacing. |
src/vs/editor/contrib/colorPicker/browser/colorPicker.css |
Refactors decorator sizing. |
src/vs/editor/contrib/colorPicker/browser/colorDetector.ts |
Defines fixed swatch width. |
src/vs/editor/common/viewModel/viewModelLines.ts |
Updates line data construction. |
src/vs/editor/common/viewModel/viewModelImpl.ts |
Propagates width decorations. |
src/vs/editor/common/viewModel/monospaceLineBreaksComputer.ts |
Accounts for fixed widths. |
src/vs/editor/common/viewModel/modelLineProjection.ts |
Projects fixed-width parts. |
src/vs/editor/common/viewModel/inlineDecorations.ts |
Introduces fixed-width decorations. |
src/vs/editor/common/viewModel.ts |
Extends view-line data. |
src/vs/editor/common/viewLayout/viewLineRenderer.ts |
Renders atomic-width spans. |
src/vs/editor/common/viewLayout/linePart.ts |
Adds width metadata. |
src/vs/editor/common/modelLineProjectionData.ts |
Computes injected-text ranges. |
src/vs/editor/common/model/textModel.ts |
Stores and validates width options. |
src/vs/editor/common/model.ts |
Declares widthInEm. |
src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.ts |
Updates renderer arguments. |
src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.ts |
Updates renderer arguments. |
src/vs/editor/browser/viewParts/viewLines/viewLine.ts |
Passes fixed-width decorations. |
src/vs/editor/browser/view/domLineBreaksComputer.ts |
Supports DOM-based fixed-width wrapping. |
src/vs/editor/browser/controller/editContext/native/screenReaderContentRich.ts |
Passes fixed-width decorations. |
build/lib/stylelint/vscode-known-variables.json |
Updates CSS variable allowlist. |
Review details
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 36/36 changed files
- Comments generated: 6
- Review effort level: Balanced
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.
wip