-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(textarea): update background placement for ionic #29910
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
42b2a76
fix(input): update background placement for ionic
thetaPC fcd9937
test(textarea): remove rtl for fill
thetaPC 3bc0db6
test(textarea): move tests to shape
thetaPC dc9956c
test(textarea): add rtl for floating
thetaPC ae58c33
test(textarea): add label placement stacked
thetaPC cd4c654
test(textarea): update snapshots
thetaPC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,9 @@ import { expect } from '@playwright/test'; | |
| import { configs, test } from '@utils/test/playwright'; | ||
|
|
||
| /** | ||
| * Fill is only available in MD mode | ||
| * Fill is only available in MD and Ionic | ||
| */ | ||
| configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | ||
| configs({ modes: ['md', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('textarea: fill'), () => { | ||
| test.describe('textarea: fill solid', () => { | ||
| test('should not have visual regressions', async ({ page }) => { | ||
|
|
@@ -13,6 +13,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| <ion-textarea | ||
| fill="solid" | ||
| label="Email" | ||
| label-placement="stacked" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -25,49 +26,12 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-solid`)); | ||
| }); | ||
| test('should render correctly with floating label', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-textarea | ||
| fill="solid" | ||
| label="Email" | ||
| label-placement="floating" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
| counter="true" | ||
| ></ion-textarea> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-solid-label-floating`)); | ||
| }); | ||
| test('should not have visual regressions with shaped solid', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-textarea | ||
| shape="round" | ||
| fill="solid" | ||
| label="Email" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
| counter="true" | ||
| ></ion-textarea> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-shaped-solid`)); | ||
| }); | ||
| test('padding and border radius should be customizable', async ({ page }) => { | ||
| test('padding, border radius, and background should be customizable', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <style> | ||
| ion-textarea { | ||
| --background: #e5e5e5 !important; | ||
| --border-radius: 10px !important; | ||
| --padding-start: 50px !important; | ||
| --padding-end: 50px !important; | ||
|
|
@@ -78,7 +42,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| shape="round" | ||
| fill="solid" | ||
| label="Email" | ||
| label-placement="floating" | ||
| label-placement="stacked" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -99,6 +63,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| <ion-textarea | ||
| fill="outline" | ||
| label="Email" | ||
| label-placement="stacked" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -111,13 +76,23 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-outline`)); | ||
| }); | ||
| test('should render correctly with floating label', async ({ page }) => { | ||
| test('padding, border radius, and background should be customizable', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <style> | ||
| ion-textarea { | ||
| --background: #e5e5e5 !important; | ||
| --border-radius: 10px !important; | ||
| --padding-start: 50px !important; | ||
| --padding-end: 50px !important; | ||
| } | ||
| </style> | ||
|
|
||
| <ion-textarea | ||
| shape="round" | ||
| fill="outline" | ||
| label="Email" | ||
| label-placement="floating" | ||
| label-placement="stacked" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -128,15 +103,25 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| ); | ||
|
|
||
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-outline-label-floating`)); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-shaped-outline-custom`)); | ||
| }); | ||
| test('should not have visual regressions with shaped outline', async ({ page }) => { | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| /** | ||
| * Fill with floating label is only available in MD mode | ||
| */ | ||
| configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('textarea: fill'), () => { | ||
| test.describe('textarea: fill solid', () => { | ||
| test('should render correctly with floating label', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-textarea | ||
| shape="round" | ||
| fill="outline" | ||
| fill="solid" | ||
| label="Email" | ||
| label-placement="floating" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -147,21 +132,14 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| ); | ||
|
|
||
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-shaped-outline`)); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-solid-label-floating`)); | ||
| }); | ||
| test('padding and border radius should be customizable', async ({ page }) => { | ||
| }); | ||
| test.describe('textarea: fill outline', () => { | ||
| test('should render correctly with floating label', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <style> | ||
| ion-textarea { | ||
| --border-radius: 10px !important; | ||
| --padding-start: 50px !important; | ||
| --padding-end: 50px !important; | ||
| } | ||
| </style> | ||
|
|
||
| <ion-textarea | ||
| shape="round" | ||
| fill="outline" | ||
| label="Email" | ||
| label-placement="floating" | ||
|
|
@@ -175,7 +153,7 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { | |
| ); | ||
|
|
||
| const textarea = page.locator('ion-textarea'); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-shaped-outline-custom`)); | ||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-outline-label-floating`)); | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
Binary file added
BIN
+4.65 KB
...e.ts-snapshots/textarea-fill-outline-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.45 KB
....ts-snapshots/textarea-fill-outline-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.82 KB
...e.ts-snapshots/textarea-fill-outline-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-418 Bytes
(90%)
...s-snapshots/textarea-fill-outline-label-floating-md-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13 Bytes
(100%)
...-snapshots/textarea-fill-outline-label-floating-md-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-716 Bytes
(84%)
.../textarea.e2e.ts-snapshots/textarea-fill-outline-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-282 Bytes
(94%)
...textarea.e2e.ts-snapshots/textarea-fill-outline-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-276 Bytes
(93%)
.../textarea.e2e.ts-snapshots/textarea-fill-outline-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-4.37 KB
.../textarea.e2e.ts-snapshots/textarea-fill-outline-md-rtl-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-4.85 KB
...textarea.e2e.ts-snapshots/textarea-fill-outline-md-rtl-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-3.71 KB
.../textarea.e2e.ts-snapshots/textarea-fill-outline-md-rtl-Mobile-Safari-linux.png
Binary file not shown.
Binary file added
BIN
+4.55 KB
.../textarea-fill-shaped-outline-custom-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.47 KB
...textarea-fill-shaped-outline-custom-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.59 KB
.../textarea-fill-shaped-outline-custom-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-470 Bytes
(90%)
...ts-snapshots/textarea-fill-shaped-outline-custom-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+86 Bytes
(100%)
...s-snapshots/textarea-fill-shaped-outline-custom-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+16 Bytes
(100%)
...ts-snapshots/textarea-fill-shaped-outline-custom-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-4.45 KB
...ts-snapshots/textarea-fill-shaped-outline-custom-md-rtl-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-4.79 KB
...s-snapshots/textarea-fill-shaped-outline-custom-md-rtl-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-3.76 KB
...ts-snapshots/textarea-fill-shaped-outline-custom-md-rtl-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-5.57 KB
...ea.e2e.ts-snapshots/textarea-fill-shaped-outline-md-ltr-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-5.79 KB
...a.e2e.ts-snapshots/textarea-fill-shaped-outline-md-ltr-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-4.89 KB
...ea.e2e.ts-snapshots/textarea-fill-shaped-outline-md-ltr-Mobile-Safari-linux.png
Binary file not shown.
Binary file removed
BIN
-5.56 KB
...ea.e2e.ts-snapshots/textarea-fill-shaped-outline-md-rtl-Mobile-Chrome-linux.png
Binary file not shown.
Binary file removed
BIN
-5.88 KB
...a.e2e.ts-snapshots/textarea-fill-shaped-outline-md-rtl-Mobile-Firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-4.89 KB
...ea.e2e.ts-snapshots/textarea-fill-shaped-outline-md-rtl-Mobile-Safari-linux.png
Diff not rendered.
Binary file added
BIN
+4.33 KB
...ts/textarea-fill-shaped-solid-custom-ionic-md-ltr-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.07 KB
...s/textarea-fill-shaped-solid-custom-ionic-md-ltr-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.3 KB
...ts/textarea-fill-shaped-solid-custom-ionic-md-ltr-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file modified
BIN
-359 Bytes
(92%)
...e.ts-snapshots/textarea-fill-shaped-solid-custom-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file modified
BIN
+43 Bytes
(100%)
....ts-snapshots/textarea-fill-shaped-solid-custom-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10 Bytes
(100%)
...e.ts-snapshots/textarea-fill-shaped-solid-custom-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file removed
BIN
-4.27 KB
...e.ts-snapshots/textarea-fill-shaped-solid-custom-md-rtl-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-4.93 KB
....ts-snapshots/textarea-fill-shaped-solid-custom-md-rtl-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-3.67 KB
...e.ts-snapshots/textarea-fill-shaped-solid-custom-md-rtl-Mobile-Safari-linux.png
Diff not rendered.
Binary file removed
BIN
-4.35 KB
...area.e2e.ts-snapshots/textarea-fill-shaped-solid-md-ltr-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-4.83 KB
...rea.e2e.ts-snapshots/textarea-fill-shaped-solid-md-ltr-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-3.81 KB
...area.e2e.ts-snapshots/textarea-fill-shaped-solid-md-ltr-Mobile-Safari-linux.png
Diff not rendered.
Binary file removed
BIN
-4.35 KB
...area.e2e.ts-snapshots/textarea-fill-shaped-solid-md-rtl-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-4.88 KB
...rea.e2e.ts-snapshots/textarea-fill-shaped-solid-md-rtl-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-3.8 KB
...area.e2e.ts-snapshots/textarea-fill-shaped-solid-md-rtl-Mobile-Safari-linux.png
Diff not rendered.
Binary file added
BIN
+3.93 KB
...e2e.ts-snapshots/textarea-fill-solid-ionic-md-ltr-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.67 KB
...2e.ts-snapshots/textarea-fill-solid-ionic-md-ltr-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.99 KB
...e2e.ts-snapshots/textarea-fill-solid-ionic-md-ltr-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file modified
BIN
-410 Bytes
(90%)
....ts-snapshots/textarea-fill-solid-label-floating-md-rtl-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file modified
BIN
-440 Bytes
(90%)
...ll/textarea.e2e.ts-snapshots/textarea-fill-solid-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file modified
BIN
+66 Bytes
(100%)
...l/textarea.e2e.ts-snapshots/textarea-fill-solid-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file modified
BIN
-69 Bytes
(98%)
...ll/textarea.e2e.ts-snapshots/textarea-fill-solid-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file removed
BIN
-4.21 KB
...ll/textarea.e2e.ts-snapshots/textarea-fill-solid-md-rtl-Mobile-Chrome-linux.png
Diff not rendered.
Binary file removed
BIN
-4.74 KB
...l/textarea.e2e.ts-snapshots/textarea-fill-solid-md-rtl-Mobile-Firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-3.66 KB
...ll/textarea.e2e.ts-snapshots/textarea-fill-solid-md-rtl-Mobile-Safari-linux.png
Diff not rendered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,38 @@ | ||
| import { expect } from '@playwright/test'; | ||
| import { configs, test } from '@utils/test/playwright'; | ||
|
|
||
| /** | ||
| * This behavior does not vary across directions. | ||
| * The round shape is only available in the Ionic and Material Design themes. | ||
| * Shapes with different fill types are only available in the Material Design theme. | ||
| */ | ||
| configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('textarea: shape'), () => { | ||
| test.describe('fill: solid', () => { | ||
| test.describe('round', () => { | ||
| test('should not have visual regressions', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-textarea | ||
| shape="round" | ||
| fill="solid" | ||
| label="Email" | ||
| label-placement="stacked" | ||
| value="[email protected]" | ||
| ></ion-textarea> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const textarea = page.locator('ion-textarea'); | ||
|
|
||
| await expect(textarea).toHaveScreenshot(screenshot(`textarea-fill-solid-shape-round`)); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| /** | ||
| * This behavior does not vary across directions | ||
| * The round shape is only available in the Ionic and Material Design themes | ||
|
|
||
Binary file added
BIN
+2.28 KB
...e2e.ts-snapshots/textarea-fill-solid-shape-round-md-ltr-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.05 KB
...2e.ts-snapshots/textarea-fill-solid-shape-round-md-ltr-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+2.12 KB
...e2e.ts-snapshots/textarea-fill-solid-shape-round-md-ltr-Mobile-Safari-linux.png
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.