compose-multiplatform-core
compose-multiplatform-core copied to clipboard
CMP-5786 iOS TF2: Implement textFieldMagnifierNode
Fixes 5786
Testing
Snippet for testing
val style = TextStyle(fontSize = 22.sp)
var textFieldState by remember { mutableStateOf("I am TextField") }
val textFieldState2 = remember { TextFieldState("I am TextField 2") }
Column(Modifier.fillMaxWidth().verticalScroll(rememberScrollState()).imePadding()) {
BasicTextField(
textFieldState,
onValueChange = { textFieldState = it },
Modifier.padding(16.dp).fillMaxWidth(),
textStyle = style
)
Box(Modifier.height(16.dp))
BasicTextField(
textFieldState2, Modifier.padding(16.dp).fillMaxWidth(), textStyle = style
)
val s3 = remember { TextFieldState(loremIpsum(wordCount = 10)) }
BasicTextField(
state = s3,
textStyle = style,
modifier = Modifier
.padding(16.dp)
.padding(start = 100.dp)
.width(200.dp)
.border(1.dp, Color.Black)
)
val s6 = remember { TextFieldState("SingleLine scrollable " + loremIpsum(wordCount = 50)) }
BasicTextField(
state = s6,
textStyle = style,
modifier = Modifier.padding(16.dp).padding(start = 100.dp).width(200.dp)
.border(1.dp, Color.Black),
lineLimits = TextFieldLineLimits.SingleLine
)
val s4 = remember { TextFieldState("Multiline scrollable " + loremIpsum(wordCount = 50)) }
BasicTextField(
state = s4,
textStyle = style,
modifier = Modifier.padding(16.dp).padding(start = 100.dp).width(200.dp)
.border(1.dp, Color.Black),
lineLimits = TextFieldLineLimits.MultiLine(maxHeightInLines = 6)
)
val s5 = remember { TextFieldState(loremIpsum(wordCount = 30)) }
BasicTextField(
state = s5,
textStyle = style,
modifier = Modifier.padding(50.dp).fillMaxWidth(),
decorator = {
TextFieldDefaults.TextFieldDecorationBox(
innerTextField = it,
enabled = true,
interactionSource = remember { MutableInteractionSource() },
singleLine = false,
value = s5.text.toString(),
visualTransformation = VisualTransformation.None,
leadingIcon = {
Icon(
imageVector = Icons.Default.Star,
contentDescription = null
)
},
trailingIcon = {
Icon(
imageVector = Icons.Default.Star,
contentDescription = null
)
}
)
}
)
}
This should be tested by QA
Release Notes
Features - iOS
- Magnifier support for BasicTextField(TextFieldState)
CI checks are not listed here
You should create pull/1549 branch and push. Then CI checks will run
CI checks are not listed here
You should create
pull/1549branch and push. Then CI checks will run
@igordmn , that what I did: https://github.com/JetBrains/compose-multiplatform-core/tree/pull/1549 It went well on CI, but hasn't beed added to checks here.
hasn't beed added to checks here.
It was added to the last commit you pushed to that branch. it probably needs to be the last commit of the PR to appear on the PR itself
Thanks a lot!