-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(searchbar): add shapes for ionic theme (#30210)
- Loading branch information
Showing
17 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Searchbar - Shape</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" | ||
/> | ||
<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> | ||
</head> | ||
|
||
<body> | ||
<ion-app> | ||
<ion-content class="ion-padding"> | ||
<h5 class="ion-padding-start ion-padding-top">Search - Default</h5> | ||
<ion-searchbar></ion-searchbar> | ||
|
||
<h5 class="ion-padding-start ion-padding-top">Search - Round</h5> | ||
<ion-searchbar shape="round"></ion-searchbar> | ||
|
||
<h5 class="ion-padding-start ion-padding-top">Search - Soft</h5> | ||
<ion-searchbar shape="soft"></ion-searchbar> | ||
|
||
<h5 class="ion-padding-start ion-padding-top">Search - Rectangular</h5> | ||
<ion-searchbar shape="rectangular"></ion-searchbar> | ||
</ion-content> | ||
</ion-app> | ||
</body> | ||
</html> |
This file contains 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { expect } from '@playwright/test'; | ||
import { configs, test } from '@utils/test/playwright'; | ||
|
||
/** | ||
* This behavior only applies to the `ionic` theme. | ||
* This behavior does not vary across directions. | ||
*/ | ||
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => { | ||
test.describe(title('searchbar: shape'), () => { | ||
['soft', 'round', 'rectangular'].forEach((shape) => { | ||
test(`${shape} - should not have visual regressions`, async ({ page }) => { | ||
await page.setContent( | ||
` | ||
<style> | ||
/* Background styles to show the border radius */ | ||
:root { | ||
background: #000; | ||
} | ||
</style> | ||
<ion-searchbar shape="${shape}"></ion-searchbar> | ||
`, | ||
config | ||
); | ||
|
||
const searchbar = page.locator('ion-searchbar'); | ||
|
||
await expect(searchbar).toHaveScreenshot(screenshot(`searchbar-shape-${shape}`)); | ||
}); | ||
}); | ||
}); | ||
}); |
Binary file added
BIN
+1.56 KB
...napshots/searchbar-shape-rectangular-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
+1.9 KB
...apshots/searchbar-shape-rectangular-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
+1.56 KB
...napshots/searchbar-shape-rectangular-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
+2.16 KB
...e.ts-snapshots/searchbar-shape-round-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
+2.43 KB
....ts-snapshots/searchbar-shape-round-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
+2.16 KB
...e.ts-snapshots/searchbar-shape-round-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
+1.84 KB
...2e.ts-snapshots/searchbar-shape-soft-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
+2.18 KB
...e.ts-snapshots/searchbar-shape-soft-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
+1.85 KB
...2e.ts-snapshots/searchbar-shape-soft-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.
This file contains 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
This file contains 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