Skip to content

when clause for view/item/context not automatically reevaluated #140010

@yuyichao

Description

@yuyichao

Does this issue occur when all extensions are disabled?: Yes and No (because an extension is required to construct the situation.)

  • VS Code Version: 1.62.0 and source build from latest main branch.
  • OS Version: Linux (also web version)

Steps to Reproduce:

  1. Create a contribution to the view/item/context menu with a custom condition, e.g. "when": "view == myextension.view && myextension.should_show". (I've only tested the inline group)
  2. After the view is shown, change the value of myextension.should_show in the extension.
  3. The visibility of the button does not change.

For a contributed view from the same extension, this can be worked around by triggering a refresh of the whole view (by firing onDidChangeTreeData) but there doesn't seem to be a way to do this if the view is from somewhere else... The automatic update works in most other places I've tried...

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insiderstree-viewsExtension tree view issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions