Skip to content

Support range-based lineLimit(_:) modifier #374

@d-date

Description

@d-date

Summary

The range-based lineLimit(_:) modifier (e.g., .lineLimit(3...6)) is not yet supported by Skip and produces a build error:

error: This API is not yet available in Skip. Consider placing it within a #if !SKIP block.
    .lineLimit(3...6)
     ^~~~~~~~~

Context

SwiftUI provides an overload of lineLimit that accepts a ClosedRange<Int> parameter, allowing a flexible line count between a minimum and maximum:

TextField("placeholder", text: $text, axis: .vertical)
    .lineLimit(3...6)

The integer-based .lineLimit(Int) works correctly (e.g., .lineLimit(2), .lineLimit(3)), but the range variant does not.

Expected Behavior

.lineLimit(3...6) should transpile to an equivalent Kotlin/Compose implementation that constrains the text field to show between 3 and 6 lines.

Workaround

Use the integer-based .lineLimit(6) instead, which sets only the maximum.

Environment

  • Skip UI: 1.50.3
  • Skip: 1.8.2
  • Swift: 6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions