Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python New Commands for new VS Code Getting Started APIs #16054

Closed
jmew opened this issue Apr 27, 2021 · 1 comment
Closed

Python New Commands for new VS Code Getting Started APIs #16054

jmew opened this issue Apr 27, 2021 · 1 comment
Labels
area-editor-* User-facing catch-all feature-request Request for new features or functionality needs proposal Need to make some design decisions partner ask

Comments

@jmew
Copy link

jmew commented Apr 27, 2021

Will need some new commands and additions in the Python extension to support VS Code's new Getting Started API's for extensions

2 New Commands Needed

  1. A command to create a new python file, "Python: Create new file". Should just do the same logic we have in the existing start page but made into a command so it can be called in the new getting started APIs from VS Code
    image

  2. A new command named "Python: Create New Project" that has the following steps.

First, it opens a file picker like this.
image

and then it shows this Quick pick input that says "Enter a name for the new Python project". This will create a name for their Python workspace. By default, the placeholder will be the name of the folder they selected.
image

and finally show the python interpeter list from the "Python: Select Interpreter" command.

Once that is all selected, open a new VS Code window with that workspace (name of the workspace was entered by the user in "Enter name for python project") and have their interpreter setting saved so its automatically selected. A new untitled python file will be opened by default using the command "Python: Create file" (outlined in the next section).

If at any point during the steps, if the user exits, then nothing happens

2 New "When Clauses" Needed

Documentation about "When clauses": (https://code.visualstudio.com/api/references/when-clause-contexts#add-a-custom-when-clause-context)

  1. For if we detect the user has Python installed or not in their system. This will dictate the logic of whether to show the "install python" flow on the getting started page

  2. To check whether the user has ever set their Python interpreter. This will dictate the logic of whether to show the "select interpreter" section of the getting started page

@jmew jmew added feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team labels Apr 27, 2021
@karthiknadig karthiknadig added area-editor-* User-facing catch-all needs decision partner ask and removed triage-needed Needs assignment to the proper sub-team labels Apr 27, 2021
@luabud luabud added needs proposal Need to make some design decisions and removed needs decision labels May 5, 2021
@luabud
Copy link
Member

luabud commented Aug 19, 2022

This is now done via #19099

@luabud luabud closed this as completed Aug 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all feature-request Request for new features or functionality needs proposal Need to make some design decisions partner ask
Projects
None yet
Development

No branches or pull requests

3 participants