Preserve user-defined casing for File Explorer workspace titles - #331645
Merged
Lee Murray (mrleemurray) merged 3 commits intoAug 19, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves user-defined workspace casing in File Explorer headers while retaining standard casing for Untitled workspaces.
Changes:
- Dynamically marks named workspace headers for case preservation.
- Updates Modern UI CSS selectors.
- Expands header casing tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
explorerView.ts |
Manages workspace-title casing classes. |
fontRamp.css |
Applies casing rules using those classes. |
modernUI.contribution.test.ts |
Tests Explorer header transforms. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Extract the untitled-vs-named workspace decision into a testable helper and assert the resulting header transforms for untitled, named and single folder workspaces instead of only asserting on hand written CSS classes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aaron Munger (amunger)
approved these changes
Aug 19, 2026
Lee Murray (mrleemurray)
deleted the
mrleemurray/structural-lavender-angelfish
branch
August 19, 2026 16:12
Dileep Yavanmandha (dileepyavan)
pushed a commit
that referenced
this pull request
Aug 19, 2026
) * feat: preserve user-defined casing for File Explorer workspace titles * feat: add support for preserving merged workspace name casing in File Explorer * test: cover the Explorer workspace name casing decision Extract the untitled-vs-named workspace decision into a testable helper and assert the resulting header transforms for untitled, named and single folder workspaces instead of only asserting on hand written CSS classes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
This pull request improves how the File Explorer displays workspace names by ensuring that user-provided workspace names are shown with their original casing, rather than being automatically capitalized or uppercased. It introduces new logic and CSS classes to distinguish between user-named workspaces and system-generated or untitled workspaces, updates the Explorer view logic, and adds comprehensive tests to verify the new behavior.
Key changes include:
Explorer View Logic and API
shouldPreserveWorkspaceNameCasefunction to determine if the original casing of a workspace name should be preserved, based on workspace type and configuration. This function is used to apply appropriate styling only to user-named workspaces. (src/vs/workbench/contrib/files/browser/views/explorerView.ts)PRESERVE_WORKSPACE_NAME_CASE_CLASSandPRESERVE_MERGED_WORKSPACE_NAME_CASE_CLASSfor marking DOM elements that should preserve name casing. (src/vs/workbench/contrib/files/browser/views/explorerView.ts)ExplorerViewclass to manage and update these classes on the relevant DOM nodes when the workspace changes, the view is shown/hidden, or the header visibility changes. (src/vs/workbench/contrib/files/browser/views/explorerView.ts) [1] [2] [3] [4] [5]Styling
preserve-workspace-name-caseorpreserve-merged-workspace-name-case) will display workspace names with their original casing. Untitled and system-generated names continue to use standard capitalization. (src/vs/workbench/contrib/modernUI/browser/media/fontRamp.css)Testing
shouldPreserveWorkspaceNameCaseto ensure it correctly identifies when to preserve the workspace name's casing, covering empty, folder, untitled, and named workspace scenarios. (src/vs/workbench/contrib/files/test/browser/explorerView.test.ts)text-transformstyles are applied to the Explorer titles and pane headers in various scenarios. (src/vs/workbench/contrib/modernUI/test/browser/modernUI.contribution.test.ts) [1] [2] [3] [4]These changes ensure that the File Explorer more accurately reflects user intent regarding workspace naming, improving both consistency and user experience.