scm: allow diffDecorationsGutterWidth up to 10px#316395
Open
Priyanshu-byte-coder wants to merge 2 commits into
Open
scm: allow diffDecorationsGutterWidth up to 10px#316395Priyanshu-byte-coder wants to merge 2 commits into
Priyanshu-byte-coder wants to merge 2 commits into
Conversation
Fixes microsoft#278083 — the previous enum [1,2,3,4,5] prevented users from setting the SCM diff gutter wider than 5px. Replace enum constraint with minimum/maximum so the Settings UI renders a number input instead of a dropdown, letting users choose any integer from 1–10.
Keeps the runtime guard consistent with the new maximum of 10 set in the configuration schema. Values outside 1–10 still fall back to the default of 3.
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @lszomoruMatched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Raises the allowed range for scm.diffDecorationsGutterWidth from [1..5] to [1..10] and switches the schema from an enum to minimum/maximum, so the Settings UI renders a number input and HiDPI users can choose a wider gutter.
Changes:
- Replace
enum: [1,2,3,4,5]withminimum: 1, maximum: 10in the configuration schema. - Update runtime validation guard to accept widths up to 10 (still falling back to default
3otherwise).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/vs/workbench/contrib/scm/browser/scm.contribution.ts |
Schema change from enum to numeric range (1–10). |
src/vs/workbench/contrib/scm/browser/quickDiffDecorator.ts |
Bumps the upper bound in the runtime safety check from 5 to 10. |
Author
|
@lszomoru you were notified via CODENOTIFY for the files changed here. Copilot reviewed both files and raised no issues. The change is small:
Could you take a look when you get a chance? |
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.
Closes #278083
Problem
scm.diffDecorationsGutterWidthis constrained to the values[1, 2, 3, 4, 5]via a JSON Schemaenum. This means:Fix
Replace the
enumarray withminimum: 1/maximum: 10so the Settings UI shows a number input and any integer in that range is valid.Also raise the runtime safety guard in
quickDiffDecorator.tsfromwidth > 5towidth > 10to stay consistent — values outside[1, 10]still fall back to the default of3.Changes
src/vs/workbench/contrib/scm/browser/scm.contribution.tsenum: [1,2,3,4,5]→minimum: 1, maximum: 10src/vs/workbench/contrib/scm/browser/quickDiffDecorator.tswidth > 5→width > 10