-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(progress-bar): add styling for the ionic theme #30185
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
8 commits
Select commit
Hold shift + click to select a range
e5b00af
Add new styles
OS-pedrolourenco 79d5e31
Fix lint issues
OS-pedrolourenco 2d5aa94
CR
OS-pedrolourenco 09bfdc0
CR
OS-pedrolourenco 632456b
Update design token after getting new design page
OS-pedrolourenco 32dc863
Merge branch 'next' into ROU-11591
OS-pedrolourenco 1707011
Update screenshots to new bar background colour
OS-pedrolourenco 24c17fb
Update another design token after getting new design page
OS-pedrolourenco 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
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
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| @use "../../themes/ionic/ionic.globals.scss" as globals; | ||
| @use "./progress-bar"; | ||
|
|
||
| // Ionic Progress bar | ||
| // -------------------------------------------------- | ||
|
|
||
| :host { | ||
| --background: #{globals.$ion-bg-neutral-subtle-default}; | ||
|
|
||
| height: globals.$ion-scale-100; | ||
| } | ||
|
|
||
| // Progress Bar Shapes | ||
| // ------------------------------------------------------------------------------- | ||
|
|
||
| :host(.progress-bar-shape-round) { | ||
| @include globals.border-radius(globals.$ion-round-xs); | ||
| } | ||
|
|
||
| :host(.progress-bar-shape-rectangular) { | ||
| @include globals.border-radius(globals.$ion-rectangular-xs); | ||
| } | ||
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
2 changes: 1 addition & 1 deletion
2
core/src/components/progress-bar/test/basic/progress-bar.e2e.ts
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
Binary file added
BIN
+25.9 KB
....e2e.ts-snapshots/progress-bar-basic-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
+38.7 KB
...e2e.ts-snapshots/progress-bar-basic-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
+26.6 KB
....e2e.ts-snapshots/progress-bar-basic-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
+25.7 KB
....e2e.ts-snapshots/progress-bar-basic-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
+39.2 KB
...e2e.ts-snapshots/progress-bar-basic-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
+26.4 KB
....e2e.ts-snapshots/progress-bar-basic-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.
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 |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en" dir="ltr"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <title>Progress Bar - Shape</title> | ||
| <meta | ||
| name="viewport" | ||
| content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||
| /> | ||
| <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-header> | ||
| <ion-toolbar> | ||
| <ion-title>Progress Bar - Shape</ion-title> | ||
| </ion-toolbar> | ||
| </ion-header> | ||
|
|
||
| <ion-content class="ion-padding"> | ||
| <ion-list lines="none"> | ||
| <ion-list-header> | ||
| <ion-label> Default </ion-label> | ||
| </ion-list-header> | ||
| <ion-item> | ||
| <ion-progress-bar value="0.50"></ion-progress-bar> | ||
| </ion-item> | ||
|
|
||
| <ion-list-header> | ||
| <ion-label> Round </ion-label> | ||
| </ion-list-header> | ||
| <ion-item> | ||
| <ion-progress-bar value="0.50" shape="round"></ion-progress-bar> | ||
| </ion-item> | ||
|
|
||
| <ion-list-header> | ||
| <ion-label> Rectangular </ion-label> | ||
| </ion-list-header> | ||
| <ion-item> | ||
| <ion-progress-bar value="0.50" shape="rectangular"></ion-progress-bar> | ||
| </ion-item> | ||
| </ion-list> | ||
| </ion-content> | ||
| </ion-app> | ||
| </body> | ||
| </html> |
56 changes: 56 additions & 0 deletions
56
core/src/components/progress-bar/test/shape/progress-bar.e2e.ts
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 |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { expect } from '@playwright/test'; | ||
| import { configs, test } from '@utils/test/playwright'; | ||
|
|
||
| configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('progress-bar: shape'), () => { | ||
| test('round - should not have visual regressions', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <style> | ||
| :root { | ||
| background: #ccc7c7; | ||
thetaPC marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| .container { | ||
| padding: 10px; | ||
| } | ||
| </style> | ||
|
|
||
| <div class="container"> | ||
| <ion-progress-bar value="0.50" shape="round"></ion-progress-bar> | ||
| </div> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const container = page.locator('.container'); | ||
|
|
||
| await expect(container).toHaveScreenshot(screenshot(`progress-bar-shape-round`)); | ||
| }); | ||
|
|
||
| test('rectangular - should not have visual regressions', async ({ page }) => { | ||
| await page.setContent( | ||
| ` | ||
| <style> | ||
| :root { | ||
| background: #ccc7c7; | ||
| } | ||
|
|
||
| .container { | ||
| padding: 10px; | ||
| } | ||
| </style> | ||
|
|
||
| <div class="container"> | ||
| <ion-progress-bar value="0.50" shape="rectangular"></ion-progress-bar> | ||
| </div> | ||
| `, | ||
| config | ||
| ); | ||
|
|
||
| const container = page.locator('.container'); | ||
|
|
||
| await expect(container).toHaveScreenshot(screenshot(`progress-bar-shape-rectangular`)); | ||
| }); | ||
| }); | ||
| }); | ||
Binary file added
BIN
+219 Bytes
...shots/progress-bar-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
+386 Bytes
...hots/progress-bar-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
+220 Bytes
...shots/progress-bar-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
+264 Bytes
...s-snapshots/progress-bar-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
+452 Bytes
...-snapshots/progress-bar-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
+271 Bytes
...s-snapshots/progress-bar-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.
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
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
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.