Open robobenklein opened 1 year ago
went with this, patches are no longer serialized as widgets, but as our own serialize type and thus need some extra things to be implemented...
it's closer to the atom implementation, but I'll make some changes given this opportunity anyways
https://github.com/CodeRibbon/CodeRibbon-Theia/commit/a32c2691416856e3ca89d5ad4b358a2d768b2d33
It's just the darn sizers at this point, and the restore function works perfectly fine after the main application view is ready
, but not during the restoreLayout?
Clearly my own restoreLayout does what it intends:
After this, application goes from attached_shell
to initialized_layout
, so far so good, but then on the next IBL update:
And thus the sizer data is lost?
Also probably related to the sizers problem, but scroll-position gets messed up after deserialize as well. Looking like something is adjusting the layout during the load process?
https://github.com/eclipse-theia/theia/blob/v1.29.0/packages/core/src/browser/shell/application-shell.ts#L604
getLayoutData
still contains unserialized widgets, so conversion happens outside the application-shell scope, therefore we need to be compatible enough with DockPanel that the outer code behaves the same.https://github.com/eclipse-theia/theia/blob/v1.29.0/packages/core/src/browser/shell/shell-layout-restorer.ts#L156
getLayoutData
from theAS
is called by restorerdeflate
: https://github.com/eclipse-theia/theia/blob/v1.29.0/packages/core/src/browser/shell/shell-layout-restorer.ts#L191Assumes property names must match exactly
widget
orwidgets
byisWidget(s)Property
...Widget itself if stateful should provide storeState(), but looks like CR Patches will mostly be subject to the widget manager's whims: https://github.com/eclipse-theia/theia/blob/v1.29.0/packages/core/src/browser/widget-manager.ts
So in the end maybe a patch should not be reported as a first-class widget? (We could dig into it via our own serializer)