Skip to content

Conversation

@DonJayamanne
Copy link
Contributor

Fixes #273603

Copilot AI review requested due to automatic review settings October 27, 2025 23:58
@DonJayamanne DonJayamanne self-assigned this Oct 27, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the cell editor width wasn't properly updating when the window was resized horizontally. The changes introduce a type-safe CellLayoutChangeReason type to track why layout changes occur, and update the editor width logic to use the viewCell's layout info during horizontal resize events.

Key changes:

  • Introduces CellLayoutChangeReason type for type-safe layout change tracking
  • Updates editor width calculation to use viewCell.layoutInfo.editorWidth for nbLayoutChange and viewCellLayoutChange events
  • Replaces string literals with typed constants throughout the codebase

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.ts Adds CellLayoutChangeReason type, updates method signatures to use the new type, and modifies editor width calculation logic to properly handle horizontal resizing
src/vs/workbench/contrib/notebook/test/browser/view/cellPart.test.ts Updates test code to use typed layout change reasons instead of string literals

@DonJayamanne DonJayamanne marked this pull request as ready for review October 28, 2025 00:04
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 28, 2025
@DonJayamanne DonJayamanne merged commit 1be558e into main Oct 28, 2025
28 checks passed
@DonJayamanne DonJayamanne deleted the don/jolly-shrew branch October 28, 2025 05:49
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.

notebook cells do not resize correctly horizontally

3 participants