Nesting Section renders empty view
Open
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")
}
}
}
}
This renders as follows in Android:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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