-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify UI for selecting virtual environments (#1413)
## Changes Create our own environment selector quick pick: - Explicit "Select Python Environment" title, not "Select Interpreter" that the python extension uses - Show only environments, not all interpreters as the python extension does - Still show the option to use python extension selector for power users New selector: <img width="952" alt="Screenshot 2024-10-29 at 10 53 21" src="https://github.com/user-attachments/assets/757e5566-c5fb-419a-8480-68c09632cfab"> Old selector, or when you click on the "Use Python Extension to setup environments": <img width="952" alt="Screenshot 2024-10-29 at 10 53 30" src="https://github.com/user-attachments/assets/feee5575-4c0c-486b-8f77-75e4d5108843"> As before, when there's no detected environments we show "create" dialog directly: <img width="952" alt="Screenshot 2024-10-29 at 11 06 04" src="https://github.com/user-attachments/assets/b87ad8f0-fc7f-4702-a557-8833d394f19f"> ## Tests Manually
- Loading branch information
Showing
5 changed files
with
66 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import {Environment} from "../language/MsPythonExtensionApi"; | ||
|
||
export function environmentName(env: Environment) { | ||
const version = env.version | ||
? `${env.version.major}.${env.version.minor}.${env.version.micro} ` | ||
: ""; | ||
const name = env.environment?.name ?? env.path; | ||
return `${version}${name}`; | ||
} |