Fix: Disable dropdown shows both 'Disable' and 'Disable (Workspace)' when extension is workspace-enabled#311190
Open
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Open
Fix: Disable dropdown shows both 'Disable' and 'Disable (Workspace)' when extension is workspace-enabled#311190Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Fixes microsoft#132085 - Editor hint in new file can't be reached by tabbing When rendering formatted text with action links (e.g., '[[action]]'), the resulting <a> elements now have tabIndex=0 to make them reachable via keyboard navigation (Tab key). This fixes an accessibility issue where the 'Select a language' hint in new untitled editors could not be focused using the Tab key.
…when extension is workspace-enabled When an extension is disabled globally but enabled for workspace (EnabledWorkspace state), the disable dropdown incorrectly shows both 'Disable' and 'Disable (Workspace)' options. DisableGloballyAction should only be enabled when the extension is EnabledGlobally (i.e., globally enabled and not yet disabled globally). When in EnabledWorkspace state, the extension is already disabled globally, so DisableGloballyAction should not be offered. Fixes microsoft#244138
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.
Summary
When an extension is disabled globally but enabled for workspace (
EnabledWorkspacestate), the disable button incorrectly shows a dropdown containing both 'Disable' and 'Disable (Workspace)' options.Root Cause
In
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts,DisableGloballyActionwas enabled for bothEnabledGloballyandEnabledWorkspacestates. When inEnabledWorkspace, the extension is already disabled globally — offering to disable it globally again is incorrect.Fix
Changed the condition to only enable
DisableGloballyActionwhenenablementState === EnabledGlobally:Fixes #244138
Thank you for your attention. If there are any issues or suggestions, please leave a comment and I will address them promptly.
Warmly, RoomWithOutRoof