Skip to content

Use native lineHeight on 26.0+ systems#154

Merged
olejnjak merged 4 commits intomainfrom
line-height
Jan 22, 2026
Merged

Use native lineHeight on 26.0+ systems#154
olejnjak merged 4 commits intomainfrom
line-height

Conversation

@olejnjak
Copy link
Member

@olejnjak olejnjak commented Jan 5, 2026

When on iOS 26, watchOS 26 and tvOS 26 font(...) viewModifier uses newly added viewModifier lineHeight for setting line height instead of our computation.

Checklist

  • Added tests (if applicable)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for using the native SwiftUI lineHeight view modifier on newer OS versions, but contains critical versioning errors. The PR references iOS 26.0, watchOS 26.0, and tvOS 26.0, which are non-existent versions. The correct versions should be iOS 18.0, watchOS 11.0, and tvOS 18.0 where the native lineHeight modifier was introduced.

Key changes:

  • Adds conditional logic to use native lineHeight modifier on supposedly newer OS versions (though version numbers are incorrect)
  • Updates CI/CD workflows to use macos-latest instead of macos-15
  • Removes the .github/xcode-version file

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Sources/ACKategories/SwiftUIExtensions/FontModifier.swift Adds availability check (with incorrect version numbers) and native lineHeight API usage for newer OS versions
CHANGELOG.md Documents the feature addition with incorrect version reference
.github/xcode-version Removes explicit Xcode version specification
.github/workflows/tests.yml Updates runner from macos-15 to macos-latest
.github/workflows/docbuild.yml Updates runner from macos-15 to macos-latest
.github/workflows/build.yml Updates runner from macos-15 to macos-latest

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@olejnjak
Copy link
Member Author

olejnjak commented Jan 5, 2026

I am not entirely sure if we want such different behavior or not 😔

@komkovla
Copy link
Contributor

komkovla commented Jan 5, 2026

I am for this change 👍 as this will be used system wide and actual difference between implementation is neglectable

@IgorRosocha
Copy link
Contributor

LGTM, seem reasonable enough. 👍

@olejnjak olejnjak merged commit 6778fc3 into main Jan 22, 2026
6 checks passed
@olejnjak olejnjak deleted the line-height branch January 22, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants