Skip to content

Commit 133e89e

Browse files
authored
[0.81] TextInputs are zero height if there is no value and no placeholder text (#15730)
* TextInputs are zero height if there is no value and no placeholder text * Change files * update snapshots
1 parent 0470482 commit 133e89e

5 files changed

Lines changed: 58 additions & 48 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "TextInputs are zero height if there is no value and no placeholder text",
4+
"packageName": "react-native-windows",
5+
"email": "30809111+acoates-ms@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/e2e-test-app-fabric/test/__snapshots__/TextInputComponentTest.test.ts.snap

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ exports[`TextInput Tests Single-line TextInputs can enable text selection 1`] =
254254
"Visual Tree": {
255255
"Comment": "singleline-text-input",
256256
"Offset": "0, 0, 0",
257-
"Size": "916, 29",
257+
"Size": "916, 28",
258258
"Visual Type": "SpriteVisual",
259259
"__Children": [
260260
{
@@ -564,7 +564,7 @@ exports[`TextInput Tests TextInputs can autocapitalize: Autocapitalize Character
564564
"Visual Tree": {
565565
"Comment": "capitalize-characters",
566566
"Offset": "0, 0, 0",
567-
"Size": "791, 19",
567+
"Size": "791, 28",
568568
"Visual Type": "SpriteVisual",
569569
"__Children": [
570570
{
@@ -639,7 +639,7 @@ exports[`TextInput Tests TextInputs can autocapitalize: Autocapitalize Turned Of
639639
"Visual Tree": {
640640
"Comment": "capitalize-none",
641641
"Offset": "0, 0, 0",
642-
"Size": "791, 19",
642+
"Size": "791, 28",
643643
"Visual Type": "SpriteVisual",
644644
"__Children": [
645645
{
@@ -717,7 +717,7 @@ exports[`TextInput Tests TextInputs can autocomplete, address country 1`] = `
717717
"Visual Tree": {
718718
"Comment": "textinput-autocomplete-address-country",
719719
"Offset": "0, 0, 0",
720-
"Size": "916, 29",
720+
"Size": "916, 28",
721721
"Visual Type": "SpriteVisual",
722722
"__Children": [
723723
{
@@ -873,7 +873,7 @@ exports[`TextInput Tests TextInputs can autocomplete, one-time-code 1`] = `
873873
"Visual Tree": {
874874
"Comment": "textinput-autocomplete-one-time-code",
875875
"Offset": "0, 0, 0",
876-
"Size": "916, 28",
876+
"Size": "916, 29",
877877
"Visual Type": "SpriteVisual",
878878
"__Children": [
879879
{
@@ -1153,7 +1153,7 @@ exports[`TextInput Tests TextInputs can be defined as a set using accessibilityP
11531153
"Visual Tree": {
11541154
"Comment": "textinput-set",
11551155
"Offset": "0, 0, 0",
1156-
"Size": "916, 93",
1156+
"Size": "916, 94",
11571157
"Visual Type": "SpriteVisual",
11581158
"__Children": [
11591159
{
@@ -1222,12 +1222,12 @@ exports[`TextInput Tests TextInputs can be defined as a set using accessibilityP
12221222
},
12231223
{
12241224
"Offset": "0, 31, 0",
1225-
"Size": "916, 33",
1225+
"Size": "916, 32",
12261226
"Visual Type": "SpriteVisual",
12271227
"__Children": [
12281228
{
12291229
"Offset": "0, 0, 0",
1230-
"Size": "916, 33",
1230+
"Size": "916, 32",
12311231
"Visual Type": "SpriteVisual",
12321232
"__Children": [
12331233
{
@@ -1286,12 +1286,12 @@ exports[`TextInput Tests TextInputs can be defined as a set using accessibilityP
12861286
},
12871287
{
12881288
"Offset": "0, 62, 0",
1289-
"Size": "916, 32",
1289+
"Size": "916, 33",
12901290
"Visual Type": "SpriteVisual",
12911291
"__Children": [
12921292
{
12931293
"Offset": "0, 0, 0",
1294-
"Size": "916, 32",
1294+
"Size": "916, 33",
12951295
"Visual Type": "SpriteVisual",
12961296
"__Children": [
12971297
{
@@ -1373,7 +1373,7 @@ exports[`TextInput Tests TextInputs can be editable 1`] = `
13731373
"Visual Tree": {
13741374
"Comment": "textinput-editable",
13751375
"Offset": "0, 0, 0",
1376-
"Size": "916, 29",
1376+
"Size": "916, 28",
13771377
"Visual Type": "SpriteVisual",
13781378
"__Children": [
13791379
{
@@ -1683,7 +1683,7 @@ exports[`TextInput Tests TextInputs can be set to not editable 1`] = `
16831683
"Visual Tree": {
16841684
"Comment": "textinput-not-editable",
16851685
"Offset": "0, 0, 0",
1686-
"Size": "916, 33",
1686+
"Size": "916, 32",
16871687
"Visual Type": "SpriteVisual",
16881688
"__Children": [
16891689
{
@@ -1836,7 +1836,7 @@ exports[`TextInput Tests TextInputs can clear on submit 1`] = `
18361836
"Visual Tree": {
18371837
"Comment": "textinput-clear-on-submit",
18381838
"Offset": "0, 0, 0",
1839-
"Size": "916, 10",
1839+
"Size": "916, 32",
18401840
"Visual Type": "SpriteVisual",
18411841
"__Children": [
18421842
{
@@ -1886,7 +1886,7 @@ exports[`TextInput Tests TextInputs can clear on submit 1`] = `
18861886
},
18871887
"Offset": "5, 5, 0",
18881888
"Opacity": 0,
1889-
"Size": "1, 1",
1889+
"Size": "1, 19",
18901890
"Visual Type": "SpriteVisual",
18911891
},
18921892
],
@@ -1986,7 +1986,7 @@ exports[`TextInput Tests TextInputs can clear on submit with custom submit key e
19861986
"Visual Tree": {
19871987
"Comment": "textinput-clear-on-submit-2",
19881988
"Offset": "0, 0, 0",
1989-
"Size": "916, 10",
1989+
"Size": "916, 32",
19901990
"Visual Type": "SpriteVisual",
19911991
"__Children": [
19921992
{
@@ -2061,7 +2061,7 @@ exports[`TextInput Tests TextInputs can customize its padding 1`] = `
20612061
"Visual Tree": {
20622062
"Comment": "textinput-padding",
20632063
"Offset": "0, 0, 0",
2064-
"Size": "916, 10",
2064+
"Size": "916, 29",
20652065
"Visual Type": "SpriteVisual",
20662066
"__Children": [
20672067
{
@@ -2293,7 +2293,7 @@ exports[`TextInput Tests TextInputs can have a color 1`] = `
22932293
"Visual Tree": {
22942294
"Comment": "style-color",
22952295
"Offset": "0, 0, 0",
2296-
"Size": "791, 28",
2296+
"Size": "791, 29",
22972297
"Visual Type": "SpriteVisual",
22982298
"__Children": [
22992299
{
@@ -2524,7 +2524,7 @@ exports[`TextInput Tests TextInputs can have a font style 1`] = `
25242524
"Visual Tree": {
25252525
"Comment": "style-fontStyle",
25262526
"Offset": "0, 0, 0",
2527-
"Size": "791, 29",
2527+
"Size": "791, 28",
25282528
"Visual Type": "SpriteVisual",
25292529
"__Children": [
25302530
{
@@ -2601,7 +2601,7 @@ exports[`TextInput Tests TextInputs can have a font weight 1`] = `
26012601
"Visual Tree": {
26022602
"Comment": "style-fontWeight",
26032603
"Offset": "0, 0, 0",
2604-
"Size": "791, 28",
2604+
"Size": "791, 29",
26052605
"Visual Type": "SpriteVisual",
26062606
"__Children": [
26072607
{
@@ -2757,7 +2757,7 @@ exports[`TextInput Tests TextInputs can have caretHidden 1`] = `
27572757
"Visual Tree": {
27582758
"Comment": "textinput-carethidden",
27592759
"Offset": "0, 0, 0",
2760-
"Size": "916, 33",
2760+
"Size": "916, 32",
27612761
"Visual Type": "SpriteVisual",
27622762
"__Children": [
27632763
{
@@ -2913,7 +2913,7 @@ exports[`TextInput Tests TextInputs can have custom return key label, React Nati
29132913
"Visual Tree": {
29142914
"Comment": "textinput-return-React Native",
29152915
"Offset": "0, 0, 0",
2916-
"Size": "916, 32",
2916+
"Size": "916, 33",
29172917
"Visual Type": "SpriteVisual",
29182918
"__Children": [
29192919
{
@@ -2991,7 +2991,7 @@ exports[`TextInput Tests TextInputs can have custom return key type, done 1`] =
29912991
"Visual Tree": {
29922992
"Comment": "textinput-return-done",
29932993
"Offset": "0, 0, 0",
2994-
"Size": "916, 32",
2994+
"Size": "916, 33",
29952995
"Visual Type": "SpriteVisual",
29962996
"__Children": [
29972997
{
@@ -3147,7 +3147,7 @@ exports[`TextInput Tests TextInputs can have custom return key type, next 1`] =
31473147
"Visual Tree": {
31483148
"Comment": "textinput-return-next",
31493149
"Offset": "0, 0, 0",
3150-
"Size": "916, 33",
3150+
"Size": "916, 32",
31513151
"Visual Type": "SpriteVisual",
31523152
"__Children": [
31533153
{
@@ -3225,7 +3225,7 @@ exports[`TextInput Tests TextInputs can have custom return key type, none 1`] =
32253225
"Visual Tree": {
32263226
"Comment": "textinput-return-none",
32273227
"Offset": "0, 0, 0",
3228-
"Size": "916, 32",
3228+
"Size": "916, 33",
32293229
"Visual Type": "SpriteVisual",
32303230
"__Children": [
32313231
{
@@ -3459,7 +3459,7 @@ exports[`TextInput Tests TextInputs can have custom return key type, send 1`] =
34593459
"Visual Tree": {
34603460
"Comment": "textinput-return-send",
34613461
"Offset": "0, 0, 0",
3462-
"Size": "916, 33",
3462+
"Size": "916, 32",
34633463
"Visual Type": "SpriteVisual",
34643464
"__Children": [
34653465
{
@@ -3615,7 +3615,7 @@ exports[`TextInput Tests TextInputs can have customer letter spacing, spacing=0
36153615
"Visual Tree": {
36163616
"Comment": "textinput-letterspacing-0",
36173617
"Offset": "0, 0, 0",
3618-
"Size": "916, 32",
3618+
"Size": "916, 33",
36193619
"Visual Type": "SpriteVisual",
36203620
"__Children": [
36213621
{
@@ -3771,7 +3771,7 @@ exports[`TextInput Tests TextInputs can have customer letter spacing, spacing=9
37713771
"Visual Tree": {
37723772
"Comment": "textinput-letterspacing-9",
37733773
"Offset": "0, 0, 0",
3774-
"Size": "916, 33",
3774+
"Size": "916, 32",
37753775
"Visual Type": "SpriteVisual",
37763776
"__Children": [
37773777
{
@@ -4177,7 +4177,7 @@ exports[`TextInput Tests TextInputs can have inline images, drawable props not s
41774177
"Visual Tree": {
41784178
"Comment": "textinput-inline-images-3",
41794179
"Offset": "0, 0, 0",
4180-
"Size": "916, 32",
4180+
"Size": "916, 33",
41814181
"Visual Type": "SpriteVisual",
41824182
"__Children": [
41834183
{
@@ -4255,7 +4255,7 @@ exports[`TextInput Tests TextInputs can have inline images, drawableLeft and dra
42554255
"Visual Tree": {
42564256
"Comment": "textinput-inline-images-2",
42574257
"Offset": "0, 0, 0",
4258-
"Size": "916, 33",
4258+
"Size": "916, 32",
42594259
"Visual Type": "SpriteVisual",
42604260
"__Children": [
42614261
{
@@ -4333,7 +4333,7 @@ exports[`TextInput Tests TextInputs can have shadows 1`] = `
43334333
"Visual Tree": {
43344334
"Comment": "textinput-shadow",
43354335
"Offset": "0, 0, 0",
4336-
"Size": "916, 32",
4336+
"Size": "916, 33",
43374337
"Visual Type": "SpriteVisual",
43384338
"__Children": [
43394339
{
@@ -4410,7 +4410,7 @@ exports[`TextInput Tests TextInputs can have text decoration lines 1`] = `
44104410
"Visual Tree": {
44114411
"Comment": "style-textDecorationLine",
44124412
"Offset": "0, 0, 0",
4413-
"Size": "791, 29",
4413+
"Size": "791, 28",
44144414
"Visual Type": "SpriteVisual",
44154415
"__Children": [
44164416
{
@@ -4487,7 +4487,7 @@ exports[`TextInput Tests TextInputs can have text shadows 1`] = `
44874487
"Visual Tree": {
44884488
"Comment": "style-textShadow",
44894489
"Offset": "0, 0, 0",
4490-
"Size": "791, 28",
4490+
"Size": "791, 29",
44914491
"Visual Type": "SpriteVisual",
44924492
"__Children": [
44934493
{
@@ -4718,7 +4718,7 @@ exports[`TextInput Tests TextInputs can rewrite characters: Replace Space with C
47184718
"Visual Tree": {
47194719
"Comment": "rewrite_clear_input",
47204720
"Offset": "0, 0, 0",
4721-
"Size": "867, 10",
4721+
"Size": "867, 28",
47224722
"Visual Type": "SpriteVisual",
47234723
"__Children": [
47244724
{
@@ -4793,7 +4793,7 @@ exports[`TextInput Tests TextInputs can rewrite characters: Replace Space with N
47934793
"Visual Tree": {
47944794
"Comment": "rewrite_no_sp_input",
47954795
"Offset": "0, 0, 0",
4796-
"Size": "916, 10",
4796+
"Size": "916, 28",
47974797
"Visual Type": "SpriteVisual",
47984798
"__Children": [
47994799
{
@@ -4868,7 +4868,7 @@ exports[`TextInput Tests TextInputs can rewrite characters: Replace Space with U
48684868
"Visual Tree": {
48694869
"Comment": "rewrite_sp_underscore_input",
48704870
"Offset": "0, 0, 0",
4871-
"Size": "892, 10",
4871+
"Size": "892, 28",
48724872
"Visual Type": "SpriteVisual",
48734873
"__Children": [
48744874
{
@@ -5253,7 +5253,7 @@ exports[`TextInput Tests TextInputs have a custom background color 1`] = `
52535253
"Visual Tree": {
52545254
"Comment": "textinput-custom-background-color",
52555255
"Offset": "0, 0, 0",
5256-
"Size": "916, 33",
5256+
"Size": "916, 32",
52575257
"Visual Type": "SpriteVisual",
52585258
"__Children": [
52595259
{
@@ -5330,7 +5330,7 @@ exports[`TextInput Tests TextInputs have a custom highlight color 1`] = `
53305330
"Visual Tree": {
53315331
"Comment": "textinput-custom-highlight-color",
53325332
"Offset": "0, 0, 0",
5333-
"Size": "916, 32",
5333+
"Size": "916, 33",
53345334
"Visual Type": "SpriteVisual",
53355335
"__Children": [
53365336
{
@@ -5641,7 +5641,7 @@ exports[`TextInput Tests TextInputs have a default placeholder text color 1`] =
56415641
"Visual Tree": {
56425642
"Comment": "textinput-default-placeholder-color",
56435643
"Offset": "0, 0, 0",
5644-
"Size": "916, 33",
5644+
"Size": "916, 32",
56455645
"Visual Type": "SpriteVisual",
56465646
"__Children": [
56475647
{
@@ -5718,7 +5718,7 @@ exports[`TextInput Tests TextInputs have a default text color 1`] = `
57185718
"Visual Tree": {
57195719
"Comment": "textinput-default-color",
57205720
"Offset": "0, 0, 0",
5721-
"Size": "916, 32",
5721+
"Size": "916, 33",
57225722
"Visual Type": "SpriteVisual",
57235723
"__Children": [
57245724
{
@@ -5796,7 +5796,7 @@ exports[`TextInput Tests TextInputs have a default underline color 1`] = `
57965796
"Visual Tree": {
57975797
"Comment": "textinput-default-underline-color",
57985798
"Offset": "0, 0, 0",
5799-
"Size": "916, 32",
5799+
"Size": "916, 33",
58005800
"Visual Type": "SpriteVisual",
58015801
"__Children": [
58025802
{
@@ -5873,7 +5873,7 @@ exports[`TextInput Tests TextInputs support secure entry 1`] = `
58735873
"Visual Tree": {
58745874
"Comment": "textinput-password",
58755875
"Offset": "0, 0, 0",
5876-
"Size": "916, 32",
5876+
"Size": "916, 33",
58775877
"Visual Type": "SpriteVisual",
58785878
"__Children": [
58795879
{
@@ -6041,17 +6041,17 @@ exports[`TextInput Tests TextInputs which have a searchbox role should also supp
60416041
"Visual Tree": {
60426042
"Comment": "textinput-searchbox",
60436043
"Offset": "0, 0, 0",
6044-
"Size": "916, 32",
6044+
"Size": "916, 31",
60456045
"Visual Type": "SpriteVisual",
60466046
"__Children": [
60476047
{
60486048
"Offset": "0, 0, 0",
6049-
"Size": "916, 32",
6049+
"Size": "916, 33",
60506050
"Visual Type": "SpriteVisual",
60516051
"__Children": [
60526052
{
60536053
"Offset": "0, 0, 0",
6054-
"Size": "916, 32",
6054+
"Size": "916, 33",
60556055
"Visual Type": "SpriteVisual",
60566056
"__Children": [
60576057
{

0 commit comments

Comments
 (0)