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

dependent dimension properties shrink/grow preview frame #4962

Closed
HookedBehemoth opened this issue Mar 27, 2024 · 1 comment
Closed

dependent dimension properties shrink/grow preview frame #4962

HookedBehemoth opened this issue Mar 27, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@HookedBehemoth
Copy link

I found this weird case where when a rectangle inside a VerticalBox defines its dimensions based on the parent dimensions, the preview keeps growing or shrinking when any parameter is changed. I'm uncertain how I'd expect this to behave.

steps to reproduce:
copy code, open preview, change anything

Recording.2024-03-27.192321.mp4
export component POC inherits Window {
    VerticalBox {
        Rectangle {
            width: min(parent.width, parent.height) * 110%;
            height: 500px;
        }
    }
}
@ogoffart
Copy link
Member

Thanks for the bug report.

This is actually a duplicate of #2902
The problem is that there is a loop in the binding computatin as the parent size depends on the layout size. We should actually error out or warn about it but it's hard because there is legimitate use, see #3997

(Closing as duplicate, but thanks anyway for reporting)

@ogoffart ogoffart closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
@ogoffart ogoffart added the duplicate This issue or pull request already exists label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants