skiptools / skiptools/skip-ui

`.frame(maxWidth:)` ignores parent bounds

Open
#339 1 comment 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

VStack(spacing: 16) {
    Text("Divider (fills available width with padding)")
    Color.gray.frame(height: 1)

    Text("HStack with .frame(maxWidth: 400)")
    HStack {
        Text("Label")
            .foregroundColor(.secondary)
        Spacer()
        Text("Value")
    }
    .frame(maxWidth: 400)
    .border(.red)
}
.padding()

On iOS, the HStack aligns horizontally with the divider. On Android, the .frame(maxWidth: 400) forces the HStack to ignore the parent bounds.

Image Image

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 by running the provided VStack and HStack reproduction on Android, then compare its layout with the iOS result. Done means .frame(maxWidth: 400) respects the parent bounds so the HStack aligns with the divider as shown.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.