Skip to content
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

Fixed collapsed state when restoring view container parts #7893

Merged
merged 2 commits into from
May 26, 2020

Conversation

spoenemann
Copy link
Contributor

What it does

Fixes restoration of view container parts state, specifically the collapsed state.

How to test

Open a view container (e.g. Debug or Extensions), collapse some parts and reload the page.

Before this change: all visible parts are expanded.

After this change: parts are kept collapsed or expanded as before.

Review checklist

Reminder for reviewers

@akosyakov akosyakov added the shell issues related to the core shell label May 26, 2020
@kittaakos
Copy link
Contributor

Fixes #7037?

@@ -403,10 +403,8 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica
const part = parts[index];
const partState = partStates.find(s => part.partId === s.partId);
if (partState) {
part.setHidden(partState.hidden);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setHidden sets collapsed = false if the part is visible (not hidden).

@spoenemann
Copy link
Contributor Author

Fixes #7037?

No, that must be caused by something else. The npm scripts part seems to be restored asynchronously.

* The view container restores the visibility, order and relative sizes of contained
* widgets, but _not_ the widgets themselves. In case the set of widgets is not fixed,
* it should be restored in the specific subclass or in the widget holding the view container.
*/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is outdated. @akosyakov implemented restoring of contained widgets in 9320510

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ok

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified 👍

@akosyakov akosyakov merged commit be0d340 into master May 26, 2020
@akosyakov akosyakov deleted the view-container-parts branch May 26, 2020 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell issues related to the core shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants