Skip to content
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

feat(progress): indeterminate progress implementation #3432

Merged
merged 19 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0c9fd25
refactor(linear-progress): modify styles and template for indetermina…
simeonoff Dec 10, 2018
86827b3
refactor(circular-bar): add indeterminate state and animation
simeonoff Dec 11, 2018
8e45264
refactor(progressbar): apply type classes to the host and refactor th…
Aleksandyr Dec 12, 2018
0bcf8bb
fix(progress): fix progress bars to work in IE11
simeonoff Dec 13, 2018
3be9e0a
Merge branch 'master' into indeterminate-progress
Dec 13, 2018
48ef059
chore(changelog, readme): update to reflect the new indeterminate pro…
simeonoff Dec 13, 2018
b2eb1dc
Merge branch 'indeterminate-progress' of https://github.com/IgniteUI/…
simeonoff Dec 13, 2018
153afe4
refactor(progressbar): update circular progress when not in indetermi…
simeonoff Dec 13, 2018
6a89277
test(progressbar): fix circularbar tests
Aleksandyr Dec 13, 2018
551f4fd
test(progress): fix failing tests after binding test to host
simeonoff Dec 13, 2018
f6e372f
Merge branch 'indeterminate-progress' of https://github.com/IgniteUI/…
simeonoff Dec 13, 2018
88aece7
fix(progressbar): prevent value update when indeterminate mode is on
Aleksandyr Dec 13, 2018
b5076b2
Merge branch 'master' into indeterminate-progress
Aleksandyr Dec 14, 2018
0609947
Merge branch 'master' into indeterminate-progress
zdrawku Dec 17, 2018
ff794f4
Merge branch '7.1.x' into indeterminate-progress
Dec 19, 2018
8d731a8
Merge branch '7.1.x' into indeterminate-progress
zdrawku Jan 2, 2019
e7dec59
Merge branch '7.1.x' into indeterminate-progress
kdinev Jan 7, 2019
692d7eb
Merge branch '7.1.x' into indeterminate-progress
zdrawku Jan 7, 2019
37fb219
Merge branch '7.1.x' into indeterminate-progress
zdrawku Jan 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Ignite UI for Angular Change Log

All notable changes for each version of this project will be documented in this file.
## 7.1.1
- **Progress Indicators**:
- `igx-circular-bar` and `igx-linear-bar` now feature an indeterminate input property. When this property is set to true the indicator will be continually growing and shrinking along the track.

## 7.1.0
### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,19 @@
////

/// Linear Progress
@include b(progress-linear) {
@include b(igx-linear-bar) {
$this: bem--selector-to-string(&);
@include register-component(str-slice($this, 2, -1));

@extend %linear-display !optional;

@include e(bar) {
@include e(base) {
@extend %linear-bar !optional;
}

@include e(bar-base) {
@extend %linear-bar-base !optional;
}

@include e(bar-progress) {
@extend %linear-bar-progress !optional;
}

@include e(bar-progress, $m: default) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--default !optional;
}

@include e(bar-progress, $m: danger) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--danger !optional;
}

@include e(bar-progress, $m: warning) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--warning !optional;
}

@include e(bar-progress, $m: info) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--info !optional;
}

@include e(bar-progress, $m: success) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--success !optional;
@include e(indicator) {
@extend %linear-indicator !optional;
@extend %linear-indicator--default !optional;
}

@include e(value) {
Expand Down Expand Up @@ -80,52 +52,61 @@
@extend %linear-value--hidden !optional;
}

@include m(striped) {
@include e(bar-progress) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--striped !optional;
@include m(danger) {
@include e(indicator) {
@extend %linear-indicator--danger !optional;
}
}

@include e(bar-progress, $m: default) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--striped !optional;
@include m(warning) {
@include e(indicator) {
@extend %linear-indicator--warning !optional;
}
}

@include e(bar-progress, $m: danger) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--striped !optional;
@include m(info) {
@include e(indicator) {
@extend %linear-indicator--info !optional;
}
}

@include e(bar-progress, $m: warning) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--striped !optional;
@include m(success) {
@include e(indicator) {
@extend %linear-indicator--success !optional;
}
}

@include m(striped) {
@include e(indicator) {
@extend %linear-indicator--striped !optional;
}
}

@include e(bar-progress, $m: info) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--striped !optional;
@include m(indeterminate) {
@include e(indicator) {
@extend %linear-indicator--indeterminate !optional;
}

@include e(bar-progress, $m: success) {
@extend %linear-bar-progress !optional;
@extend %linear-bar-progress--striped !optional;
@include e(value) {
@extend %linear-value !optional;
@extend %linear-value--hidden !optional;
}
}
}

/// Circular Progress
@include b(progress-circular) {
@include b(igx-circular-bar) {
$this: bem--selector-to-string(&);
@include register-component(str-slice($this, 2, -1));

@extend %circular-display !optional;

@include e(innercircle) {
@extend %circular-innercircle !optional;
@include e(inner) {
@extend %circular-inner !optional;
}

@include e(circle) {
@extend %circular-circle !optional;
@include e(outer) {
@extend %circular-outer !optional;
}

@include e(text) {
Expand All @@ -136,4 +117,16 @@
@extend %circular-text !optional;
@extend %circular-text--hidden !optional;
}

@include m(indeterminate) {
@extend %circular-display--indeterminate !optional;

@include e(outer) {
@extend %circular-outer--indeterminate !optional;
}

@include e(text) {
@extend %circular-text--hidden !optional;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$stripes-color: null,
$text-color: null
) {
$name: 'igx-progress-linear';
$name: 'igx-linear-bar';
$theme: apply-palette(map-get($schema, $name), $palette);

@return extend($theme, (
Expand Down Expand Up @@ -76,33 +76,26 @@
%linear-display {
position: relative;
display: flex;
align-items: center;
flex-flow: column nowrap;
width: 100%;
flex: 1 1 100%;
}

%linear-bar {
width: inherit;
height: $bar-height;
overflow: hidden;
}

%linear-bar-base {
position: absolute;
width: inherit;
height: inherit;
height: $bar-height;
background: --var($theme, 'track-color');
overflow: hidden;
z-index: 0;
}

%linear-bar-progress {
%linear-indicator {
width: 100%;
position: relative;
height: inherit;
backface-visibility: hidden;
}

%linear-bar-progress--striped {
%linear-indicator--striped {
background-image: linear-gradient(
-45deg,
$stripe-color 25%,
Expand All @@ -116,23 +109,39 @@
background-size: 40px 40px;
}

%linear-bar-progress--default {
%linear-indicator--indeterminate {
@include animation(indeterminate-bar 2s cubic-bezier(0, .085, .68, .53) infinite);
width: 100% !important;

&::before {
position: absolute;
content: '';
top: 0;
left: -200%;
width: 100%;
height: inherit;
background-color: inherit;
transform-origin: top right;
}
}

%linear-indicator--default {
background: --var($theme, 'fill-color-default')
}

%linear-bar-progress--danger {
%linear-indicator--danger {
background-color: --var($theme, 'fill-color-danger');
}

%linear-bar-progress--warning {
%linear-indicator--warning {
background-color: --var($theme, 'fill-color-warning');
}

%linear-bar-progress--info {
%linear-indicator--info {
background-color: --var($theme, 'fill-color-info');
}

%linear-bar-progress--success {
%linear-indicator--success {
background-color: --var($theme, 'fill-color-success');
}

Expand Down Expand Up @@ -191,7 +200,7 @@
$progress-circle-color: null,
$text-color: null
) {
$name: 'igx-progress-circular';
$name: 'igx-circular-bar';
$theme: apply-palette(map-get($schema, $name), $palette);

@return extend($theme, (
Expand All @@ -202,12 +211,15 @@
text-color: $text-color
));
}

/// @param {Map} $theme - The theme used to style the component.
/// @requires {mixin} igx-root-css-vars
/// @requires rem
/// @requires {mixin} rotate-center
/// @requires --var
@mixin igx-progress-circular($theme) {
// Include rotate animation
@include rotate-center();

@include igx-root-css-vars($theme);

// @debug $theme;
Expand All @@ -216,27 +228,44 @@
$circular-value-fw: 600;

%circular-display {
width: 100%;
height: 100%;
display: inline-flex;
flex: 1 1 auto;

svg {
width: 100%;
height: 100%;
min-width: 24px;
min-height: 24px;
}
}

%circular-display--indeterminate {
@include animation(rotate-center 1.4s linear infinite);
transform-origin: 50% 50%;
}

%circular-innercircle {
%circular-inner {
stroke-width: 4;
fill: transparent;
stroke: --var($theme, 'base-circle-color');
}

%circular-circle {
%circular-outer {
fill: transparent;
stroke: --var($theme, 'progress-circle-color');
stroke-width: 6;
stroke-linecap: round;
stroke-width: 4;
stroke-dashoffset: 289;
stroke-dasharray: 289;
transform-origin: 50% 50%;
transform: rotate(-90deg);
}

%circular-outer--indeterminate {
stroke-dashoffset: 180;
stroke-dasharray: 180;
@include animation(indeterminate-accordion 1.5s cubic-bezier(0, .085, .68, .53) infinite);
}

%circular-text {
font-size: $circular-value-fs;
font-weight: $circular-value-fw;
Expand All @@ -247,3 +276,31 @@
visibility: hidden;
}
}

@include keyframes('indeterminate-bar') {
0% {
transform: scaleX(0) translateX(-100%);
transform-origin: left;
}

50% {
transform: scaleX(1) translateX(50%);
transform-origin: right;
}

100% {
transform: scaleX(0) translateX(200%);
transform-origin: right;
}
}

@include keyframes('indeterminate-accordion') {
50% {
stroke-dashoffset: 260;
stroke-dasharray: 289;
}

100% {
stroke-dashoffset: -180;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ $dark-schema: (
igx-navbar: $_dark-navbar,
igx-navdrawer: $_dark-navdrawer,
igx-overlay: $_dark-overlay,
igx-progress-linear: $_dark-progress-linear,
igx-progress-circular: $_dark-progress-circular,
igx-linear-bar: $_dark-progress-linear,
igx-circular-bar: $_dark-progress-circular,
igx-radio: $_dark-radio,
igx-ripple: $_dark-ripple,
igx-slider: $_dark-slider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ $light-schema: (
igx-navbar: $_light-navbar,
igx-navdrawer: $_light-navdrawer,
igx-overlay: $_light-overlay,
igx-progress-linear: $_light-progress-linear,
igx-progress-circular: $_light-progress-circular,
igx-linear-bar: $_light-progress-linear,
igx-circular-bar: $_light-progress-circular,
igx-radio: $_light-radio,
igx-ripple: $_light-ripple,
igx-slider: $_light-slider,
Expand Down
Loading