eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.38k stars 2.45k forks source link

Avoid changing context key view when changing selection #13768

Closed rschnekenbu closed 1 week ago

rschnekenbu commented 1 month ago

What it does

Closes #13375

In a tree view provided by an extension, refreshing the tree node selection was changing the context key view. This was changing the view in the root context. So when the actions in toolbar were refreshed, the "when" rule was always returning true for any view, not only the concerned one. Avoid changing the context key view should not be done on selection refresh in this case.

contributed on behalf of STMicroelectronics

How to test

  1. Use the procedure described in 13375
  2. Prior to the patch, when selecting elements in the NPM scripts view, the refresh icon was showing on every view.
  3. With the patch, the refresh action does not show on every view.

Review checklist

Reminder for reviewers

rschnekenbu commented 1 week ago

Pushed a new version that removes view from the view context key, as it makes no sense in a global context. It solves also usual conflicts on changelog file.