Respect minimum hidden line count in diff editor - #336765
Open
victor-paltz wants to merge 1 commit into
Open
victor-paltz wants to merge 1 commit into
victor-paltz wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation consistently preserves the invariant and includes appropriate regression coverage.
Pull request overview
Ensures partially revealed diff regions never leave placeholders smaller than the configured minimum.
Changes:
- Centralizes hidden-line threshold enforcement.
- Applies the invariant to drag interactions.
- Clarifies configuration text and adds regression tests.
File summaries
| File | Description |
|---|---|
diffEditorViewModel.ts |
Enforces minimum hidden-line counts. |
hideUnchangedRegionsFeature.ts |
Routes drag updates through validated setters. |
editorConfigurationSchema.ts |
Clarifies the setting description. |
diffEditorWidget.test.ts |
Tests threshold behavior from both directions. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 makes
diffEditor.hideUnchangedRegions.minimumLineCountcontinue to apply while an unchanged region is partially revealed. When the remaining hidden lines would fall below the configured minimum, the rest of the region is revealed instead of rendering a tiny placeholder.The change also routes drag updates through the same invariant and clarifies the setting description.
Fixes #336762
Testing:
scripts/test.sh --runGlob '**/diffEditorWidget.test.js'npm run typecheck-client