skiptools / skiptools/skip-ui

Layout shift HStack with four maxWidth: .infinity buttons

Open
#270 1 comment 0 reactions 1 assignee View on GitHub

@aabewhite is already working on this.

Since Jan 9, 2026.

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

Description

To repro: skip create an open-source Skip Lite app. Run it in the Android Emulator on a Medium Phone API 36. Replace ContentView.swift with this:

// SPDX-License-Identifier: GPL-2.0-or-later

import SwiftUI

struct GrowableButton: View {
    var body: some View {
        Button {} label: {
            Text("Hi")
                .frame(maxWidth: .infinity)
        }
            .buttonStyle(.borderedProminent)
    }
}

struct ContentView: View {
    var body: some View {
        HStack {
            GrowableButton()
            GrowableButton()
            GrowableButton()
            GrowableButton()
        }
    }
}

This works just great on iOS, but in Android, there's a layout shift, as it initially shows only the first button at ~0.75 width of the screen, and then renders all four buttons. Screen recording below.

https://github.com/user-attachments/assets/c3ff5bdc-e170-4a09-bb35-242b465638da

At 0.25 speed:

https://github.com/user-attachments/assets/a5998bc5-b925-4314-98be-ddd77aff25cf

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.