Enhance centered layout with new fixedEditorWidth option#1
Enhance centered layout with new fixedEditorWidth option#1
Conversation
Co-authored-by: jdupak-ms <191465639+jdupak-ms@users.noreply.github.com>
Co-authored-by: jdupak-ms <191465639+jdupak-ms@users.noreply.github.com>
|
@copilot Explore if you can use the existing github action of this repository to produce a modified binary for review. |
I've explored the repository's GitHub Actions and build infrastructure. Here's what I found: Current GitHub Actions Status:
Build Infrastructure Analysis:
Challenges Identified:
Recommended Approach:
The centered layout changes are in core UI files and would be immediately visible when running VS Code with the modified code. Would you like me to create a simple demo or documentation showing the expected behavior instead? Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR enhances VS Code's centered layout functionality by changing
centeredLayoutFixedWidthfrom a boolean to an enum with three options, adding a new "fixed editor width" behavior that was requested in the issue.Changes Made
New Configuration Options
The
workbench.editor.centeredLayoutFixedWidthsetting now supports three values:false(default) - Proportional margins: Margins scale with window size, editor content expands/contracts'fixedWindowWidth'- Fixed window width: Maintains constant 900px width with equal margins (originaltruebehavior)'fixedEditorWidth'- Fixed editor width (NEW): Keeps editor width fixed but scales proportionally when window is too smallNew
fixedEditorWidthBehaviorThe new option provides intelligent responsive behavior:
Example with different window sizes:
Backward Compatibility
Full backward compatibility is maintained through automatic migration:
truesettings migrate to'fixedWindowWidth'(preserves current behavior)falsesettings remainfalse(preserves current behavior)Implementation Details
Files Modified:
src/vs/workbench/common/editor.ts- Updated type definitionssrc/vs/workbench/browser/workbench.contribution.ts- Added enum configuration schemasrc/vs/workbench/browser/parts/editor/editor.ts- Added validation and migration logicsrc/vs/base/browser/ui/centered/centeredViewLayout.ts- Implemented new layout behaviorKey Features:
This enhancement provides users with more flexible centered layout options while maintaining full compatibility with existing configurations.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
electronjs.orgnode-gyp(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.