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

Invalidate responsive layout when shell layout is invalidated #1799

Merged
merged 4 commits into from
Apr 21, 2023

Conversation

tarkah
Copy link
Member

@tarkah tarkah commented Apr 18, 2023

Responsive layout was only being recomputed if size changed. This caused a panic if a downstream widget changed between layout calls of the same view / User Interface root element. This is technically possible with Component and panic's can be reliably recreated by nesting a Component inside a Responsive and returning totally different elements from it's view after processing updates.

@tarkah tarkah changed the title Invalidate responsive layout when layout is called Invalidate responsive layout when shell layout is invalidated Apr 18, 2023
lazy/src/responsive.rs Outdated Show resolved Hide resolved
@hecrj hecrj added bug Something isn't working widget labels Apr 18, 2023
@hecrj hecrj added this to the 0.10.0 milestone Apr 18, 2023
Co-authored-by: Héctor Ramón <hector0193@gmail.com>
@tarkah tarkah requested a review from hecrj April 18, 2023 02:05
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks 🙇

I made a small change that allows us to avoid cloning the layout::Node altogether in ecc1a45.

@hecrj hecrj enabled auto-merge April 21, 2023 19:44
@hecrj hecrj merged commit 501b6b8 into iced-rs:master Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants