-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[workbench layout restore] Detect failure, reset to default layout #1075
Comments
…ixes #1075) Signed-off-by: Sven Efftinge <sven.efftinge@typefox.io>
We have user reports that they still sometimes get an incomplete workbench (e.g. missing file navigator) when starting Theia. Triggering the "Reset Workspace Layout" commands clears the issue. |
Would it be ok to re-assign this issue to someone on our side? |
Thanks to @marcdumais-work , I am able to reproduce the problem as many times as I want from my local environment. As far as I can tell, in our current code base, the messed up layout on re-startup is caused by 2 things:
Old LayoutData interface:
New LayoutData interface:
Making a hot fix is easy: elaihau@1f6b54d |
We could introduce explicit version numbers in the layout data and implement conversions. Or simply never change the data format again 😂 |
@elaihau agreed I do not think it's necessary to be able to perfectly restore a workbench that was saved under and old version of the format. But it would be very good to detect those cases and reset the workbench to default. Do you think it's possible to catch those cases you found above in a generic way? Else @spoenemann 's suggestion of introducing a version number might be the way to go. The version number might tell us if the data we are trying to restore is expected to be compatible with current version, and, if not, we skip restoration and instead reset the workbench to default. WDYT? |
I mentioned 2 problems with the current code. 2 options if the widgetManager is unable to re-create a widget from the layout string: I will try both options and see which one works better. |
- The initial step that resolves eclipse-theia#1075 Signed-off-by: elaihau <liang.huang@ericsson.com>
- The initial step that resolves #1075 Signed-off-by: elaihau <liang.huang@ericsson.com>
once in a while, we encounter workbench layout restoration issues, e.g. when the underlying storage format is updated. The usual symptom is that some expected widgets will be missing. Then the easy way to restore a sane layout is to use the "Reset Workbench Layout" command.
It would be nice if we could detect this type of problem and reset the layout automatically to default.
The text was updated successfully, but these errors were encountered: