Skip to content

multiDiffEditor: resize all diffs together by default - #350402

Open
Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
mainfrom
agents/enable-default-resize-all-diffs
Open

Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
mainfrom
agents/enable-default-resize-all-diffs

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Follow-up to #350132, which added the Resize All Diffs Together option for multi diff editors.

This enables multiDiffEditor.syncSplitView by default, so dragging the split between the original and modified side of one file resizes the split of every file in the multi diff editor. Users can still turn it off from the editor title overflow menu (Resize All Diffs Together) or the setting.

  • editorConfigurationSchema.ts: setting default false → true.
  • multiDiffEditorWidgetImpl.ts: the widget's fallback value matches the new default.
  • multiDiffEditorWidget.test.ts: the test for per-file split ratios with recycled templates now sets the setting to false explicitly, since it covers the unsynced mode.

How to test

  1. Open a multi diff editor in side-by-side mode (e.g. Source Control: View Changes).
  2. Drag the split of one file. The splits of all files resize together.
  3. Turn off Resize All Diffs Together from the editor title ... menu. Resizing one file no longer affects the others.

Validation

  • ./scripts/test.sh --reporter dot --run src/vs/editor/test/browser/widget/multiDiffEditorWidget.test.ts --run src/vs/sessions/contrib/changes/test/browser/changesViewActions.test.ts: passed (62 tests).
  • pnpm run oxlint on the changed files: passed.

Enable `multiDiffEditor.syncSplitView` by default, so resizing the split of one file in a multi diff editor resizes all files. The unsynced split view ratio test now opts out explicitly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change enabling synchronized split resizing by default.

No open issues 🎉

What changed in this PR

Following #350132, this PR enables synchronized split resizing by default in multi-file diff editors. Users can still disable it through Resize All Diffs Together or the setting.

Changes:

  • Sets multiDiffEditor.syncSplitView to default to true.
  • Aligns the widget’s fallback with the new default.
  • Explicitly disables synchronization in the test covering per-file split ratios.
File Description
src/​vs/​editor/​test/​browser/​widget/​multiDiffEditorWidget.test.ts Keeps the recycled-template test in unsynchronized mode.
src/​vs/​editor/​common/​config/​editorConfigurationSchema.ts Enables synchronized resizing by default.
src/​vs/​editor/​browser/​widget/​multiDiffEditor/​multiDiffEditorWidgetImpl.ts Updates the widget fallback to match the setting default.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants