Skip to content

feat(text): add date, selection, and size-fitting support - #1110

Merged
Kyle-Ye merged 7 commits into
mainfrom
feature/text_api
Sep 27, 2026
Merged

Kyle-Ye merged 7 commits into
mainfrom
feature/text_api

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Sep 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Implement date styles and serialization with matching availability and documentation.
  • Add date and timer interpolation, current-date formatting, and progress interval text.
  • Add text selectability types and connect platform text representations.
  • Implement size-dependent text variants with fit checks, cache reuse, and layout integration.
  • Add regression coverage for date formatting, serialization, interpolation, and size-fitting invalidation.

Implement date, date-range, and interval Text initializers.

Preserve date and time format storage, dynamic date sources, configured unit boundaries, and DateStyle decoding behavior. Add regression coverage for storage equality and formatting configuration.
Add legacy timer interval overloads, localized date and timer interpolation, and progress interval text.

Resolve progress as attributed percentages with scheduled updates and numeric transitions. Handle zero-duration intervals and NaN reference dates, and cover date API defaults and forwarding behavior.
Resolve exact date formats and localized templates through the current-date text storage, with environment values and optional time zone overrides.

Add tests for storage equality, reference date updates, locale changes, and time zone overrides.
@github-actions github-actions Bot added area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: text Text, labels, line style, and text rendering APIs. type: feature New API, behavior, platform support, or user-facing capability. labels Sep 27, 2026
@tuist

tuist Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 3e60cf5a9

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 53.8s 3e60cf5a9

@codecov

codecov Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.52426% with 412 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.69%. Comparing base (018f209) to head (9e9bea5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nSwiftUICore/View/Text/Text/Text+SizeFitting.swift 13.60% 273 Missing ⚠️
...ces/OpenSwiftUICore/View/Text/Text/Text+View.swift 0.00% 76 Missing ⚠️
...tUICore/View/Text/Resolve/ResolvableProgress.swift 0.00% 25 Missing ⚠️
...ces/OpenSwiftUICore/View/Text/Text/Text+Date.swift 89.47% 20 Missing ⚠️
...penSwiftUICore/View/Text/Text/Text+Selection.swift 0.00% 15 Missing ⚠️
...penSwiftUICore/Util/StandardLibraryAdditions.swift 0.00% 2 Missing ⚠️
.../OpenSwiftUICore/Data/Util/ScrapeableContent.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1110      +/-   ##
==========================================
- Coverage   33.70%   33.69%   -0.02%     
==========================================
  Files         799      807       +8     
  Lines       62211    64608    +2397     
==========================================
+ Hits        20969    21767     +798     
- Misses      41242    42841    +1599     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit e35c421 into main Sep 27, 2026
6 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/text_api branch September 27, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: text Text, labels, line style, and text rendering APIs. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant