eclipse-theia / theia

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

Unpinning an unclosable widget makes it closable #14370

Open KR155E opened 3 days ago

KR155E commented 3 days ago

Bug Description:

By pinning and unpinning a tab containing an unclosable widget, it becomes closable. The reason lies in the unpin function making the widget closable no matter what in https://github.com/eclipse-theia/theia/blob/f29c3d04241b32791462c7027938abeb887f8140/packages/core/src/browser/widgets/widget.ts#L373

JonasHelming commented 3 days ago

Thank you for the report! Seems like you have already debugged this, would you be interested in contributing a fix?

KR155E commented 3 days ago

With little time at hand, I tried implementing a quick fix, but extending Title to include something like "originalClosable" seemed dirty. On the other hand, not modifying title.closable at all on pin/unpin, and instead checking for PINNED_CLASS everywhere, turned out to be quite the rabbit hole. So, I'd prefer to let the experts fix this. ;-)

JonasHelming commented 3 days ago

@tsmaeder Could you have a look at this?