Skip to content

Gallery/Carousel collapse to zero height in non-expanding containers #160

@israel-dryer

Description

@israel-dryer

Bug (UX): A GroupBox (or any container) holding a Gallery or Carousel collapses to nothing when it isn't an expanding context — e.g. a scrollable page. Surfaced in the CLI gallery's Media page (scrollable=True): Avatar and Picture (explicit sizes) show; Gallery/Carousel (fill-driven) don't.

Root cause: Gallery and Carousel are fill-driven and request 0 height (the recycling grid / canvas has no natural height). In a scroll view, children get their requested size, so they collapse — and the surrounding group collapses with them. They render only when given height via fill="both", expand=True in a non-scroll, sized window (which is why the standalone examples look fine).

Fix: Gallery and Carousel should request a sensible default minimum height (e.g. ~2 tile rows for Gallery, one slide for Carousel) so they display in any container and never collapse a group. expand=True should still let them grow beyond the minimum. Watch the requested-min-height + pack/grid-propagate interaction so expand still works.

Likely a height=/min_rows= knob plus a non-zero default on the outer frame. Add a test that a Gallery/Carousel in a non-expanding parent has a non-zero height.

Separate from #159 (ThemeToggle); pre-existing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions