skiptools / skiptools/skip-ui

Support range-based lineLimit(_:) modifier

Open
#374 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.