Skip to content

Show Python in activity bar conditionally #26015

Description

Please consider showing the Python icon in the Activities bar only when Python is detected (or providing an option to do this). Something does detect Python related workspaces already, as the Python tests icon is not visible in other workspaces. It would be nice if the Python icon itself would appear iff the Python test icon appears.

I did not find a preexisting issue, searching for "activity bar", "workspace activation", "viewsContainers", "conditional"…

Activity

  1. mohityadav8 commented on Jun 21, 2026

    @mohityadav8

    Karthik Nadig (@karthiknadig) can i work on this if Eduardo Villalpando Mello (@edvilme) have not started working on this

  2. karthiknadig commented on Jun 21, 2026

    @karthiknadig
    Member

    Go for it

  3. mohityadav8 commented on Jun 21, 2026

    @mohityadav8

    Karthik Nadig (@karthiknadig) Quick finding before I start -- the Python Activity Bar icon isn't actually contributed by this repo (vscode-python's package.json has no viewsContainers). It comes from vscode-python-environments (id: python), and its when clause currently only checks the rollout setting, not whether the workspace has Python -- that's why it shows everywhere.

    The Testing icon hides correctly for a different reason: vscode-python only activates in Python workspaces (via workspaceContains:*), so it never registers a test controller elsewhere, and VS Code auto-hides empty view containers. Same mechanism could work here via a new context key in the other repo.

    Should I send the PR to vscode-python-environments directly, or would you rather vscode-python expose the "is this a Python workspace" signal for it to consume? Want to avoid duplicating detection logic across both extensions.

  4. mohityadav8 commented on Jul 24, 2026

    @mohityadav8

    /working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions