eclipse-theia / theia

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

Improve implementation around widget management #13818

Closed pisv closed 1 week ago

pisv commented 2 weeks ago

What it does

Mainly, this PR ensures that any widget promises returned by the WidgetManager will only resolve when the entire widget creation process has completed successfully, including the 'onWillCreateWidget` part.

(Prior to the fix, some widget promises returned by the WidgetManager could resolve as soon as the widget was created by its factory, which did not take into account the other parts of the widget creation process, such as the 'onWillCreateWidget' part.)

How to test

This PR is intended to be verified mainly by code inspection, but it is important to make sure that no regressions are introduced: all tests should still pass, and everything related to widget management should still work normally.

Review checklist

Reminder for reviewers

pisv commented 1 week ago

As far as I can tell, everything still works as expected and the introduced awaiting of the onWillCreateWidget listeners absolutely make sense in my opinion. Thank you very much @pisv!

@martin-fleck-at Thank you very much for your review and approval!