-
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 1 commit
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'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('textarea: fill'), () => { | ||
| test.describe('textarea: fill solid', () => { | ||
| test('should not have visual regressions', async ({ page }) => { | ||
|
|
@@ -25,25 +25,6 @@ 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( | ||
| ` | ||
|
|
@@ -63,11 +44,12 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, 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 +60,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" | ||
|
|
@@ -111,13 +93,13 @@ 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('should not have visual regressions with shaped outline', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-textarea | ||
| shape="round" | ||
| fill="outline" | ||
| label="Email" | ||
| label-placement="floating" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -128,15 +110,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`)); | ||
| }); | ||
| test('should not have visual regressions with shaped outline', 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="stacked" | ||
| value="[email protected]" | ||
| helper-text="Enter your email" | ||
| maxlength="20" | ||
|
|
@@ -147,21 +139,43 @@ 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-shaped-outline-custom`)); | ||
| }); | ||
| test('padding and border radius should be customizable', 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( | ||
| ` | ||
| <style> | ||
| ion-textarea { | ||
| --border-radius: 10px !important; | ||
| --padding-start: 50px !important; | ||
| --padding-end: 50px !important; | ||
| } | ||
| </style> | ||
| <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.describe('textarea: fill outline', () => { | ||
| test('should render correctly with floating label', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <ion-textarea | ||
| shape="round" | ||
| fill="outline" | ||
| label="Email" | ||
| label-placement="floating" | ||
|
|
@@ -175,7 +189,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.56 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.15 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.73 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 added
BIN
+4.56 KB
...e.ts-snapshots/textarea-fill-outline-ionic-md-rtl-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.21 KB
....ts-snapshots/textarea-fill-outline-ionic-md-rtl-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.74 KB
...e.ts-snapshots/textarea-fill-outline-ionic-md-rtl-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 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 added
BIN
+4.54 KB
.../textarea-fill-shaped-outline-custom-ionic-md-rtl-light-Mobile-Chrome-linux.png
brandyscarney marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
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.52 KB
...textarea-fill-shaped-outline-custom-ionic-md-rtl-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.57 KB
.../textarea-fill-shaped-outline-custom-ionic-md-rtl-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 modified
BIN
-481 Bytes
(89%)
...ts-snapshots/textarea-fill-shaped-outline-custom-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
+134 Bytes
(100%)
...s-snapshots/textarea-fill-shaped-outline-custom-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
+12 Bytes
(100%)
...ts-snapshots/textarea-fill-shaped-outline-custom-md-rtl-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 added
BIN
+4.56 KB
...apshots/textarea-fill-shaped-outline-ionic-md-ltr-light-Mobile-Chrome-linux.png
brandyscarney marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
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.15 KB
...pshots/textarea-fill-shaped-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.73 KB
...apshots/textarea-fill-shaped-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 added
BIN
+4.56 KB
...apshots/textarea-fill-shaped-outline-ionic-md-rtl-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.21 KB
...pshots/textarea-fill-shaped-outline-ionic-md-rtl-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.74 KB
...apshots/textarea-fill-shaped-outline-ionic-md-rtl-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 added
BIN
+4.33 KB
...ts/textarea-fill-shaped-solid-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.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 added
BIN
+4.31 KB
...ts/textarea-fill-shaped-solid-custom-ionic-md-rtl-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.03 KB
...s/textarea-fill-shaped-solid-custom-ionic-md-rtl-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.28 KB
...ts/textarea-fill-shaped-solid-custom-ionic-md-rtl-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 modified
BIN
-368 Bytes
(92%)
...e.ts-snapshots/textarea-fill-shaped-solid-custom-md-rtl-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file modified
BIN
+52 Bytes
(100%)
....ts-snapshots/textarea-fill-shaped-solid-custom-md-rtl-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file modified
BIN
+8 Bytes
(100%)
...e.ts-snapshots/textarea-fill-shaped-solid-custom-md-rtl-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.84 KB
...snapshots/textarea-fill-shaped-solid-ionic-md-ltr-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.33 KB
...napshots/textarea-fill-shaped-solid-ionic-md-ltr-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.88 KB
...snapshots/textarea-fill-shaped-solid-ionic-md-ltr-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.8 KB
...snapshots/textarea-fill-shaped-solid-ionic-md-rtl-light-Mobile-Chrome-linux.png
|
Oops, something went wrong.
Binary file added
BIN
+5.38 KB
...napshots/textarea-fill-shaped-solid-ionic-md-rtl-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.84 KB
...snapshots/textarea-fill-shaped-solid-ionic-md-rtl-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.84 KB
...e2e.ts-snapshots/textarea-fill-solid-ionic-md-ltr-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.33 KB
...2e.ts-snapshots/textarea-fill-solid-ionic-md-ltr-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.88 KB
...e2e.ts-snapshots/textarea-fill-solid-ionic-md-ltr-light-Mobile-Safari-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.8 KB
...e2e.ts-snapshots/textarea-fill-solid-ionic-md-rtl-light-Mobile-Chrome-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.38 KB
...2e.ts-snapshots/textarea-fill-solid-ionic-md-rtl-light-Mobile-Firefox-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.84 KB
...e2e.ts-snapshots/textarea-fill-solid-ionic-md-rtl-light-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.