-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(textarea): adjusting min-height of the textarea for ionic theme #30957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from 35 commits
8e44a84
6d2cf2f
be69a19
ed3e0d3
98c4643
8d105ba
06dba03
1002e0a
00b375b
3c2ae2f
dbbde87
a64bba9
682c40f
d17e70c
4f4283a
388c87b
fe037ef
7780e6d
8390653
75b34a5
10cbe31
5b8a456
0deda70
d864510
c8c1fb1
f833b25
373f66a
527fac6
e05db9f
5f0075a
56a5638
d460dcc
3fb17c6
b68a30e
7866bb3
8b5def6
c39f687
27412d7
e98eeb4
8913885
ce3a0a8
6966803
a95083b
cad746a
787dadf
bc31434
afe5120
7fa136f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
thetaPC marked this conversation as resolved.
Show resolved
Hide resolved
thetaPC marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en" dir="ltr"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <title>Textarea - Rows</title> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
| <link href="../../../../../css/ionic.bundle.css" rel="stylesheet" /> | ||
| <link href="../../../../../scripts/testing/styles.css" rel="stylesheet" /> | ||
| <script src="../../../../../scripts/testing/scripts.js"></script> | ||
| <script nomodule src="../../../../../dist/ionic/ionic.js"></script> | ||
| <script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script> | ||
| <style> | ||
| .grid { | ||
| display: grid; | ||
| grid-template-columns: repeat(3, minmax(250px, 1fr)); | ||
| grid-row-gap: 20px; | ||
| grid-column-gap: 20px; | ||
| } | ||
|
|
||
| h2 { | ||
| font-size: 12px; | ||
| font-weight: normal; | ||
| color: #6f7378; | ||
| margin-top: 10px; | ||
| } | ||
|
|
||
| @media screen and (max-width: 800px) { | ||
| .grid { | ||
| grid-template-columns: 1fr; | ||
| padding: 0; | ||
| } | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <ion-app> | ||
| <ion-header> | ||
| <ion-toolbar> | ||
| <ion-title>Textarea - Rows</ion-title> | ||
| </ion-toolbar> | ||
| </ion-header> | ||
|
|
||
| <ion-content id="content" class="ion-padding"> | ||
| <div class="grid"> | ||
| <!-- Different row values --> | ||
| <div class="grid-item"> | ||
| <h2>Rows: 1</h2> | ||
| <ion-textarea | ||
| rows="1" | ||
| label="Small" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
|
|
||
| <div class="grid-item"> | ||
| <h2>Rows: 3</h2> | ||
| <ion-textarea | ||
| rows="3" | ||
| label="Medium" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
|
|
||
| <div class="grid-item"> | ||
| <h2>Rows: 8</h2> | ||
| <ion-textarea | ||
| rows="8" | ||
| label="Large" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
|
|
||
| <!-- Different sizes --> | ||
| <div class="grid-item"> | ||
| <h2>Rows: 3, Size Small</h2> | ||
| <ion-textarea | ||
| rows="3" | ||
| size="small" | ||
| label="Small Size" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
|
|
||
| <div class="grid-item"> | ||
| <h2>Rows: 3, Size Medium</h2> | ||
| <ion-textarea | ||
| rows="3" | ||
| size="medium" | ||
| label="Medium Size" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
|
|
||
| <div class="grid-item"> | ||
| <h2>Rows: 3, Size Large</h2> | ||
| <ion-textarea | ||
| rows="3" | ||
| size="large" | ||
| label="Large Size" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
|
|
||
| <!-- Auto-grow --> | ||
| <div class="grid-item"> | ||
| <h2>Rows: 3, Auto-grow</h2> | ||
| <ion-textarea | ||
| rows="3" | ||
| auto-grow="true" | ||
| label="Comments" | ||
| value="1 2 3 4 5 6 7 8 9 0" | ||
| ></ion-textarea> | ||
| </div> | ||
| </div> | ||
| </ion-content> | ||
| </ion-app> | ||
| </body> | ||
| </html> |
thetaPC marked this conversation as resolved.
Show resolved
Hide resolved
thetaPC marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,95 @@ | ||||||
| import { expect } from '@playwright/test'; | ||||||
| import { configs, test } from '@utils/test/playwright'; | ||||||
|
|
||||||
| /** | ||||||
| * This behavior does not vary across directions | ||||||
| * This behavior only applies to the `ionic` theme. | ||||||
| */ | ||||||
| configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||||||
| test.describe(title('textarea: rows'), () => { | ||||||
| test('should respect rows attribute with different values', async ({ page }) => { | ||||||
|
||||||
| await page.setContent( | ||||||
| ` | ||||||
| <div id="container" style="display: flex; flex-direction: column; gap: 20px;"> | ||||||
| <h2>Rows: 1</h2> | ||||||
thetaPC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| <ion-textarea | ||||||
| rows="1" | ||||||
| label="Small" | ||||||
thetaPC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| value="1 2 3 4 5 6 7 8 9 0" | ||||||
| ></ion-textarea> | ||||||
| <h2>Rows: 3</h2> | ||||||
| <ion-textarea | ||||||
| rows="3" | ||||||
| label="Medium" | ||||||
thetaPC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| value="1 2 3 4 5 6 7 8 9 0" | ||||||
| ></ion-textarea> | ||||||
| <h2>Rows: 8</h2> | ||||||
| <ion-textarea | ||||||
| rows="8" | ||||||
| label="Large" | ||||||
thetaPC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| value="1 2 3 4 5 6 7 8 9 0" | ||||||
| ></ion-textarea> | ||||||
| </div> | ||||||
| `, | ||||||
| config | ||||||
| ); | ||||||
|
|
||||||
| const container = page.locator('#container'); | ||||||
| await expect(container).toHaveScreenshot(screenshot(`textarea-rows-different-values`)); | ||||||
thetaPC marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| }); | ||||||
|
|
||||||
| test('should respect rows attribute with different sizes', async ({ page }) => { | ||||||
| await page.setContent( | ||||||
| ` | ||||||
| <div id="container" style="display: flex; flex-direction: column; gap: 20px;"> | ||||||
| <h2>Rows: 3, Size Small</h2> | ||||||
| <ion-textarea | ||||||
| rows="3" | ||||||
| size="small" | ||||||
| label="Small Size" | ||||||
| value="1 2 3 4 5 6 7 8 9 0" | ||||||
| ></ion-textarea> | ||||||
| <h2>Rows: 3, Size Medium</h2> | ||||||
| <ion-textarea | ||||||
| rows="3" | ||||||
| size="medium" | ||||||
| label="Medium Size" | ||||||
| value="1 2 3 4 5 6 7 8 9 0" | ||||||
| ></ion-textarea> | ||||||
| <h2>Rows: 3, Size Large</h2> | ||||||
| <ion-textarea | ||||||
| rows="3" | ||||||
| size="large" | ||||||
| label="Large Size" | ||||||
| value="1 2 3 4 5 6 7 8 9 0" | ||||||
| ></ion-textarea> | ||||||
| </div> | ||||||
| `, | ||||||
| config | ||||||
| ); | ||||||
|
|
||||||
| const container = page.locator('#container'); | ||||||
| await expect(container).toHaveScreenshot(screenshot(`textarea-rows-different-sizes`)); | ||||||
|
||||||
| await expect(container).toHaveScreenshot(screenshot(`textarea-rows-different-sizes`)); | |
| await expect(container).toHaveScreenshot(screenshot(`textarea-rows-sizes`)); |
Make sure to delete the old snapshots too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the decision made above, this should be or not removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be removed, the request is to change the file name. By changing the file name, the old snapshots will still be there so those are the ones that will be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the changes requested and done to the tests, this is no longer applicable.
Uh oh!
There was an error while loading. Please reload this page.