Enable API Explorer filter during regeneration path editing#7670
Open
jeffreybulanadi wants to merge 1 commit into
Open
Enable API Explorer filter during regeneration path editing#7670jeffreybulanadi wants to merge 1 commit into
jeffreybulanadi wants to merge 1 commit into
Conversation
The filterDescription command was gated on kiota.openApiExplorer.showIcons. When the user selects an existing client or plugin to regenerate, editPathsCommand calls updateTreeViewIcons with showIcons=false and showRegenerateIcon=true, which disabled the filter button in the API Explorer toolbar. The filter is equally useful when editing paths for regeneration, so the enablement condition now also accepts showRegenerateIcon being true. Closes microsoft#6099
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 selecting an existing client or plugin to regenerate, the filter button in the API Explorer toolbar was disabled and could not be used.
Root Cause
The filterDescription command is declared with enablement: kiota.openApiExplorer.showIcons
When the user clicks Edit Paths on a workspace item, EditPathsCommand calls updateTreeViewIcons(treeViewId, false, true), which sets showIcons=false (disabling generate and filter buttons) and showRegenerateIcon=true (enabling the regenerate button).
This left the filter disabled precisely when it is most needed, since the user is selecting paths from a potentially large API surface.
Change
Updated the enablement expression for kiota.openApiExplorer.filterDescription in package.json to:
kiota.openApiExplorer.showIcons || kiota.openApiExplorer.showRegenerateIcon
The filter is now enabled in both states where the API Explorer has content loaded.
Files Changed
Closes #6099