Support range-based lineLimit(_:) modifier
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
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
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
Start by locating Skip UI's handling of the SwiftUI lineLimit overloads and compare the existing integer-based implementation. Use the reported TextField example with .lineLimit(3...6) to verify that it transpiles to a Kotlin/Compose implementation enforcing both minimum and maximum lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100