skiptools / skiptools/skip-ui

Nesting Section renders empty view

Open
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Separating out a Form Section into its own view breaks something causing an empty view to display. Directly nesting the Section in the Form works fine.

Example:

public struct ContentView: View {
    public init() {
    }
    
    public var body: some View {
        Form {
            SectionView()
        }
    }
}

public struct SectionView: View {
    public init() {
    }
    
    public var body: some View {
        Section {
            HStack {
                Text("Text")
            }
        }
    }
}
Screenshot 2023-11-20 at 8 20 53 PM

This renders as follows in Android:

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

Reproduce the example using ContentView, SectionView, Form, and Section on Android, then trace how the nested view is rendered. Compare it with directly nesting Section in Form. Done means the extracted SectionView displays its HStack and Text instead of an empty view.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.