Add workbench.editor.tabHoverInformation to customize editor tab hover - #335954
Open
Jeeva M (jeeva-m-21) wants to merge 1 commit into
Open
Add workbench.editor.tabHoverInformation to customize editor tab hover#335954Jeeva M (jeeva-m-21) wants to merge 1 commit into
workbench.editor.tabHoverInformation to customize editor tab hover#335954Jeeva M (jeeva-m-21) wants to merge 1 commit into
Conversation
Fixes microsoft#163166 Adds a setting that controls the information shown when hovering over an editor tab: `short` (file name), `long` (absolute path, the default and today's behaviour) and `detail` (file name and absolute path on separate lines). The colour half of the request already ships via tab.hoverBackground and tab.hoverForeground, so only the information part is added here.
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Benjamin Christopher Simmonds (@benibenj)Matched files:
|
Author
@microsoft-github-policy-service agree |
Author
|
@microsoft/github-policy-service agree |
Author
|
@microsoft-github-policy-service agree |
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.
Fixes #163166
Adds
workbench.editor.tabHoverInformation, which controls the information shown when hovering over an editor tab:short: the name of the filelong(default): the absolute path of the file — exactly what is shown todaydetail: the name of the file on the first line and its absolute path on the second lineThe values come straight from the issue body.
longis the default, so the current behaviour is unchanged for anyone who does not set the option.The colour half of the request is already available through the existing
tab.hoverBackground/tab.hoverForegroundcolors, so this only covers the information part.Implementation notes
getHoverTitle()ineditorTabsControl.tsused to hardcodeVerbosity.LONG. It now resolves the verbosity from the new option via a smallgetHoverTitleText()helper:Verbosity.SHORTis the file name andVerbosity.LONGis the absolute path, soshortandlongneed no new label logic.detailbuildsname + '\n' + path.MarkdownString.appendText()turns the\ninto a paragraph break and escapes markdown tokens, so a single string produces both the markdown hover and themarkdownNotSupportedFallback. Preview tabs keep their existing(_preview_ …)decoration in every mode.IEditorPartOptionsthrough the existing genericObject.assign(options, config.workbench.editor)ingetEditorPartOptions().workbench.editor.labelFormatalready does, so the setting applies to already-open tabs without a reload.Verification
multiEditorTabsControl.test.ts(default,short,detail, and preview-tab decoration).npm run test-browser-no-install -- --browser chromium→ 28271 passing, 133 pending, 2 failing; both failures reproduce on a clean tree and are unrelated (AutomationsCardsWidget,ChatStatusDashboard).MultiEditorTabsControlsuite: 26 passing, 0 failing.tsc --project ./src/tsconfig.json --noEmit --skipLibCheck,npm run valid-layers-checkandeslinton the changed files are all clean.