Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(swift-ios): let the composer grow without a line cap #5801

Closedsaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intot3code/rebuild-mobile-app-swift fromrefs/pull/5801/headopened View on GitHub

Showing 2 changed files with 47 additions and 1 deletion.

x
0 of 2 viewed, 2 left
9 additions and 1 deletionapps/swift-ios/Features/Chat/FeatureComposerView.swiftModified
View file
@@ -198,7 +198,7 @@
axis: .vertical
.font(T3Typography.composer)
- .lineLimit(1...7)
+ .modifier(FeatureComposerGrowingTextInput())
.focused(focused)
// Return is always editing input. Sending is deliberately button-only.
.submitLabel(.return)
@@ -448,6 +448,14 @@
​
+struct FeatureComposerGrowingTextInput: ViewModifier {
+ func body(content: Content) -> some View {
+ content
+ .lineLimit(1...)
+ .layoutPriority(1)
+ }
+}
+​
enum FeatureComposerCollapsePolicy {
static func shouldCollapse(
isFocused: Bool,
38 additions and 0 deletionsapps/swift-ios/Tests/FeatureTests/FeatureComposerPowerTests.swiftModified
View file
@@ -1,8 +1,46 @@