Skip to content

Show notification reaffirming Python extension still handles activation even if no prompt is shown #21793

Description

@karrtikr

When in pythonTerminalEnvVarActivation experiment:

  • Listen to onDidOpenTerminal and show a notification explaining that the Python extension handles activation
    • The notification would show up once per session/window
    • The notification will include a link to docs that go into more detail on how environment activation works and how to configure it (eg. explain that you can switch to the command running method once the default method is switched)
    • It will have a do not show again button that will prevent it from showing again, this decision should be synced via settings sync to minimize a user who acknoledged it from seeing it again
    • Since it's listening after extension activation, this should prevent a notification showing up on startup or after a syncing extensions
  • Still show the activated environment in the prompt when it's possible by only setting environment variables, try not to show the prompt in those cases.

Activity

  1. karrtikr commented on Aug 10, 2023

    @karrtikr
    Author

    Notification:

    Python extension automatically activates all terminals using environment variables, even when the name of the environment is not present in the terminal prompt. Learn more.
    [ Got it! ]

    ...where clicking got it will ensure we never show this notification again.

  2. karrtikr commented on Aug 10, 2023

    @karrtikr
    Author

    cc/ Courtney Webster (@cwebster-99) Daniel Imms (@Tyriar) Let me know if there's any feedback regarding notification text (including the "Learn more" wiki).

  3. Tyriar commented on Aug 10, 2023

    @Tyriar

    Python extension automatically activates all terminals using environment variables

    "activates" seems ambiguous here. I think we should omit the method "environment variables" as it's a little technical and instead go into that detail in the docs if they care.

    even when the name of the environment is not present in the terminal prompt

    Instead of calling out the inconsistency where the name may not show, should we instead say you can hover the terminal tab to get information about the activation?

    [ Got it! ]

    "Don't Show Again" is the standard wording for the action

    image

    I'm not sure if extensions can access the built-in don't show again action:

    https://github.com/microsoft/vscode/blob/34122ea014ef99f10e54908141bbb94bc54a1000/src/vs/workbench/services/notification/common/notificationService.ts#L210-L221

  4. karrtikr commented on Aug 10, 2023

    @karrtikr
    Author

    Updated notification:

    Python extension automatically activates all terminals using the selected environment. You can hover over the terminal tab to get information about the activation. Learn more.

    I agree, this sounds better. Btw here's what learn more points to https://aka.ms/vscodePythonTerminalActivation.

    "Don't Show Again" is the standard wording for the action

    "Don't show again" is definitely the text to go with when there're multiple buttons in the prompt, but here we only have one button and this is an informational prompt, which is why I went with "got it". We used to have such a notification when trying to educate users about selecting interpreter:

    image

    Regardless, let me know if "Don't show again" is still preferred and I can change it back ✌️

  5. karrtikr commented on Aug 11, 2023

    @karrtikr
    Author
  6. Tyriar commented on Aug 11, 2023

    @Tyriar

    I prefer "Don't Show Again" (with "Don't" and capital case), but PMs would be better as the final decision.

  7. Tyriar commented on Aug 11, 2023

    @Tyriar

    I agree, this sounds better. Btw here's what learn more points to https://aka.ms/vscodePythonTerminalActivation.

    Eventually could this point at a new https://code.visualstudio.com/docs/python/environments section that describes how the environment variable activation works?

  8. cwebster-99 commented on Aug 11, 2023

    @cwebster-99
    Member

    I think I prefer "Don't show again" even though this is informational. My main thought is I'm not sure users will understand that clicking "Got it!" will make the notification not show again if that makes sense. I think "Got it!" makes sense when we frame something as a tip.

    Python extension automatically activates all terminals using the selected environment. You can hover over the terminal tab to get information about the activation. Learn more.

    Small nit for the wording but "The Python extension automatically activates all terminals using the selected environment. You can hover over the terminal tab to see more information about the activation. Learn more."

  9. karrtikr commented on Aug 11, 2023

    @karrtikr
    Author

    Cool, btw Python extension historically prefers "Do not show again" instead of "Don't show again" for some reason I cannot recall Luciana Abud (@luabud)

    Let me know if I should also rename all prompt buttons to "Don't show again" instead.

  10. karrtikr commented on Aug 11, 2023

    @karrtikr
    Author

    Eventually could this point at a new https://code.visualstudio.com/docs/python/environments section that describes how the environment variable activation works?

    Once it stabilizes we'll definitely move some part of it if not the whole article there. I expect the limitations section can change quite frequently based on issue reports.

  11. luabud commented on Aug 11, 2023

    @luabud
    Member

    I think this was based on some standard we had defined in the past but it should be fine to change all of our "do not show again" to "don't show again" to shorten things up, especially given these are buttons.

  12. Tyriar commented on Aug 11, 2023

    @Tyriar

    Kartik Raj (@karrtikr) np, we can iterate over on vscode-docs pretty fast too. Not sure how often it's deployed from main but just commit to main for changes that are for the current version and vnext for the next version. Created microsoft/vscode-docs#6590 and stuck it on September

  13. cwebster-99 commented on Aug 11, 2023

    @cwebster-99
    Member

    I feel less strongly when choosing between "Don't" and "Do not" 😄 so if it is a standard we already have happy to keep it!

  14. Tyriar commented on Aug 11, 2023

    @Tyriar

    Since we're all one product, let's standardize on Don't as that's what UX decided (I think) for VS Code core. Consistency is good 🙂

  15. karrtikr commented on Aug 11, 2023

    @karrtikr
    Author

    Thanks everyone. Until we're in experiment, this doc does not apply to all users hence we cannot move it to official VS Code docs just yet. But I'm tracking it to make sure we handle it: #20950.

  16. locked as resolved and limited conversation to collaborators on Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions