Skip to content

Added support for truncation mode#288

Merged
marcprux merged 1 commit intoskiptools:mainfrom
fhasse95:Truncation-Mode
Jan 6, 2026
Merged

Added support for truncation mode#288
marcprux merged 1 commit intoskiptools:mainfrom
fhasse95:Truncation-Mode

Conversation

@fhasse95
Copy link
Contributor

@fhasse95 fhasse95 commented Jan 4, 2026

Currently the Text does not support the truncationMode modifier.
This PR adds support for it by extending the Text and EnvironmentValues structs.

Example SwiftUI code to test the changes:

let text = "This is a very long text that does not fit into the available space."
Text(text).lineLimit(1).truncationMode(.head)
Text(text).lineLimit(1).truncationMode(.middle)
Text(text).lineLimit(1).truncationMode(.tail)
Text(text + " Multi-line text will also be truncated.").lineLimit(2).truncationMode(.tail)

Example (iOS):
iOS

Example (Android):
Android


Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

@cla-bot cla-bot bot added the cla-signed label Jan 4, 2026
@marcprux
Copy link
Member

marcprux commented Jan 6, 2026

Great contribution, thanks!!

@marcprux marcprux merged commit ac5cb35 into skiptools:main Jan 6, 2026
2 checks passed
marcprux added a commit to skiptools/skipapp-showcase that referenced this pull request Jan 6, 2026
@marcprux
Copy link
Member

marcprux commented Jan 6, 2026

Do you happen to have a corresponding skip-fuse-ui PR for this (similar to skiptools/skip-fuse-ui#76)?

@fhasse95 fhasse95 deleted the Truncation-Mode branch January 18, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants