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

Wrapper component breaks layout #6821

Open
jmEvoqua opened this issue Nov 18, 2024 · 0 comments
Open

Wrapper component breaks layout #6821

jmEvoqua opened this issue Nov 18, 2024 · 0 comments
Labels
need triaging Issue that the owner of the area still need to triage

Comments

@jmEvoqua
Copy link

jmEvoqua commented Nov 18, 2024

Hi,

I noticed that a wrapper component which does not derive from anything breaks the layout. Is a non derived component not fully supported or is there something else I am not able to see?

With Wrapper:

component Base inherits Rectangle {
    background: gray;
    VerticalLayout {
        Rectangle {
            width: 480px;
            height: 240px;
            background: green;
        }

        @children
    }
}

component Wrapper {
    Base {
        Rectangle {
            background: red;
            width: 300px;
        }
    }
}

export component Main inherits Window {
    background: black;

    Wrapper { }
}

grafik

Without Wrapper:

export component Main inherits Window {
    background: black;

    Base {
        Rectangle {
            background: red;
            width: 300px;
        }
    }
}

grafik

Another interesting case when the base inside the wrapper has no children:

component Wrapper {
    Base {
        
    }
}

grafik

Or when the element inside the wrapper is conditional:

component Wrapper {
    if true: Base {
        Rectangle {
            background: red;
            width: 300px;
        }
    }
}

grafik

I would have expected that the wrapper does not change the layout in any way.

@ogoffart ogoffart added the need triaging Issue that the owner of the area still need to triage label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

2 participants