skiptools / skiptools/skip-ui

Section headers only render their first element

Open
#311 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

appearance bug compose layout
Dominant language
Swift
Stars
330
Forks
76
Avg merge
3h 6m
Merged PRs (30d)
1

Description

In https://github.com/skiptools/skipapp-showcase/blob/main/Sources/Showcase/GridPlayground.swift

private struct LazyVGridSectionedView: View {
    var body: some View {
        ScrollView {
            LazyVGrid(columns: [GridItem(.adaptive(minimum: 80))]) {
                ForEach(0..<5) { index in
                    Section {
                        VGridCellsView(start: index * 100, count: 10, color: .yellow)
                    } header: {
                        Text("Section \(index) Header")
                    } footer: {
                        Text("Section footer")
                    }
                    .border(.orange)
                }
            }
        }
    }
}

Copy and paste Text("Section \(index) Header"), so there are two Text views in the header.

Expected: You should see both views, aligned vertically. (In LazyHGrid, they should be aligned horizontally.)

Actual: Only the first Text view renders.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Sources/Showcase/GridPlayground.swift in the linked showcase and reproduce the issue by placing two Text views in the Section header. Compare the LazyVGrid and LazyHGrid examples; done means both header views render, vertically aligned in LazyVGrid and horizontally aligned in LazyHGrid.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.