Repository navigation
feat(workbench): allow side bar content font customization - #340334
Open
Liu (Fs2qFtoS) wants to merge 1 commit into
Open
Liu (Fs2qFtoS) wants to merge 1 commit into
Liu (Fs2qFtoS) wants to merge 1 commit into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Contributor
Author
|
@microsoft-github-policy-service agree |
This branch has not been deployed
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.
Side bar content currently uses the workbench font, so users need window zoom or custom CSS to adjust file-tree text independently. This change adds application-scoped
workbench.sideBar.fontFamilyandworkbench.sideBar.fontSizesettings for content in both the primary and secondary side bars.Changes apply immediately. Clearing the font family and resetting the size to 13 restores the existing CSS defaults. Font size is limited to 9–16px to fit the existing fixed-height tree rows. The bottom panel and side bar title styling retain their existing behavior; embedded editors and extension webviews keep their own font settings.
Related to #10605 and #519. This addresses the side bar content portion of those requests; the broader workbench-font request remains open.
Validation
npm run typecheck-client— passed.npm run eslint --for the three changed files — passed.npm run build-fast -- --client-only— passed.npm run test-browser-no-install -- --browser chromium-chrome --run src/vs/workbench/test/browser/parts/paneCompositePart.test.ts --run src/vs/workbench/test/browser/parts/sidebar/sidebarPart.test.ts --run src/vs/workbench/test/browser/parts/auxiliaryBarPart.test.ts— 8 passing on macOS.git diff --check— passed.The new browser tests verify computed font inheritance, live updates, reset behavior, size bounds, and panel isolation. Full desktop manual testing and Windows/Linux validation have not been performed.
Manual verification
Set
workbench.sideBar.fontFamilytoJetBrains Mono(when installed) andworkbench.sideBar.fontSizeto14. Check Explorer, Search, Source Control and a view moved to the secondary side bar. Change the size to16, then reset both settings. Verify that labels remain readable and that icons, inline rename inputs, selection and scrolling behave correctly.