-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Recommend" action to extension viewlet (#50419)
* Add "Recommend" action to extension viewlet Related to #13456 * Address PR requested changes * Change functionality and UX - Button goes from "Add to workspace recommendations" (clickable) to "Adding to workspace recommendations..." (unclickable) to "Added to workspace recommendations" (unclickable). - It is only visible if the current extension is installed and there's at least one folder in the root that doesn't have it recommended yet. In other words, if it's already recommended in every folder of the root, it is not visible. - In a single-root setup, it's immediately added to the recommendations. - In a multi-root setup, a quick-pick is displayed with only the folders where it is not yet recommended available as options. - In a multi-root setup, the button will go back to "Add to workspace recommendations" (clickable) instead of the unclickable state if there are still folders remaining where the current extension is not yet recommended. - An error or success notification is displayed after the work is done. - Configuration files are created if don't exist, modified otherwise. * Don't show the button if ext is recommended in ANY folder In the previous commit, the button would be displayed as long as there was at least one folder in the workspace where the extension wasn't recommended. Now, the button will be displayed only if the current extension is not recommended in any of the folders, as suggested in #50419 (comment) * Improvements based on PR suggestions - Lowercasing the extension ID before comparing - Directly styling & labeling the button on the `run` command after work is done instead of calling `update`. - Fix & delete unnecessary styles * Expose feature as command instead of button After a discussion with @ramya-rao-a and other members of the team, it was decided that it wasn't reasonable to have a dedicated button for a feature that's rarely used in such a visible place. So instead, the action will be exposed as a command that will only be available when there's an extension open in the editor area. In contrast with the previous implementation, this has the added benefit of allowing the user to use this action to recommend uninstalled extensions as well. * Simplify conditions for AddToRecommendations action * Move comments so that they dont get erased when recommendations are added programatically * Remove from unwanted before adding to recommendations * Array improvements * Friendly error msg
- Loading branch information
1 parent
ba69c69
commit 5eea6bc
Showing
3 changed files
with
147 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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