Skip to content

Commit 6969ffd

Browse files
committed
fix: close shapes panel by default
The shapes panel (left sidebar) was always open by default when creating a new diagram or refreshing VSCode, which can be distracting and takes up screen space. This change uses Draw.io's native `sidebarWidth` configuration option set to 0 to hide the sidebar by default. Users can still manually open it via View → Shapes when needed. Fixes #484
1 parent 21c8a12 commit 6969ffd

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [1.9.0]
99

10+
### Changed
11+
12+
- Shapes panel (left sidebar) is now closed by default for a cleaner initial view (fixes [#484](https://github.com/hediet/vscode-drawio/issues/484))
13+
1014
### Fixed
1115

1216
- Reverts change to automatically follow VS Code dark/light theme [#457](https://github.com/hediet/vscode-drawio/issues/457)

src/DrawioClient/DrawioClientFactory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export class DrawioClientFactory {
9797
libraries: simpleDrawioLibrary(libs),
9898
zoomFactor: config.zoomFactor,
9999
globalVars: config.globalVars,
100+
sidebarWidth: 0,
100101
};
101102
},
102103
() => {

src/DrawioClient/DrawioTypes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ export interface DrawioConfig {
164164
* Specifies if the XML output should be compressed. The default is true.
165165
*/
166166
compressXml?: boolean;
167+
168+
/**
169+
* Specifies the initial width of the sidebar (shapes panel).
170+
* Set to 0 to hide the sidebar by default.
171+
*/
172+
sidebarWidth?: number;
167173
}
168174

169175
export interface ColorScheme {

0 commit comments

Comments
 (0)