-
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(progress-bar): update styles to iOS 17 specs (#28759)
Issue number: Internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Ionic's progress bar implementation deviates from the appearance of a progress bar on iOS 17. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Progress bar is updated to have rounded corners (around the container). - Increases progress bar height to `4px` - Solid progress bars (progress bars with a buffer value of `1`) will have a consistent background appearance. - Buffer progress bars will continue to have the colored background appearance as they do in v7. ## Does this introduce a breaking change? - [x] Yes - [ ] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ### Breaking Changes - `--buffer-background` has been removed in favor of `--background`. ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Accomplishing rounded caps for the inner progress with Ionic's scale transformation was not viable. To maintain 60fps animations for the progress, rounded corners were applied to the container. --------- Co-authored-by: ionitron <[email protected]> Co-authored-by: Liam DeBeasi <[email protected]>
- Loading branch information
1 parent
48c0d2c
commit f65235a
Showing
17 changed files
with
51 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
@import "./progress-bar"; | ||
@import "./progress-bar.ios.vars"; | ||
|
||
// iOS Progress bar | ||
// -------------------------------------------------- | ||
|
||
:host { | ||
height: 3px; | ||
@include border-radius($progress-bar-ios-border-radius); | ||
|
||
height: $progress-bar-ios-height; | ||
} | ||
|
||
:host(.progress-bar-solid) { | ||
/** | ||
* On iOS the unfilled portion of the progress bar | ||
* is always a consistent background color. We | ||
* only apply this style when the progress bar is | ||
* solid (with a buffer value of 1). This maintains | ||
* the custom Ionic appearance for a buffered progress bar. | ||
*/ | ||
--background: #{$background-color-step-100}; | ||
} |
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,8 @@ | ||
// iOS Progress bar | ||
// -------------------------------------------------- | ||
|
||
/// @prop - Height of the progress bar | ||
$progress-bar-ios-height: 4px !default; | ||
|
||
/// @prop - Border radius of the progress bar container | ||
$progress-bar-ios-border-radius: 9999px !default; |
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 |
---|---|---|
@@ -1,8 +1,14 @@ | ||
@import "./progress-bar"; | ||
@import "./progress-bar.md.vars"; | ||
|
||
// Material Design Progress bar | ||
// -------------------------------------------------- | ||
|
||
:host { | ||
height: 4px; | ||
height: $progress-bar-md-height; | ||
} | ||
|
||
|
||
:host(.ion-color) .progress-buffer-bar { | ||
background: #{current-color(base, 0.3)}; | ||
} |
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,5 @@ | ||
// MD Progress bar | ||
// -------------------------------------------------- | ||
|
||
/// @prop - Height of the progress bar | ||
$progress-bar-md-height: 4px !default; |
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
Binary file modified
BIN
+448 Bytes
(100%)
...rogress-bar.e2e.ts-snapshots/progress-bar-basic-ios-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
+748 Bytes
(100%)
...ogress-bar.e2e.ts-snapshots/progress-bar-basic-ios-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
+447 Bytes
(100%)
...rogress-bar.e2e.ts-snapshots/progress-bar-basic-ios-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
+445 Bytes
(100%)
...rogress-bar.e2e.ts-snapshots/progress-bar-basic-ios-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
+813 Bytes
(100%)
...ogress-bar.e2e.ts-snapshots/progress-bar-basic-ios-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
+457 Bytes
(100%)
...rogress-bar.e2e.ts-snapshots/progress-bar-basic-ios-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.
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