forked from angular/material
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(progressLinear, progressCircular): sync logic, fix linear animati…
…ons, perf upgrades synchronize progressLinear with similar logic used in progressCircular. * improve animation performances * watch md-mode for changes * refactor animation SCSS * enable hiding and no-animations with undefined/empty md-mode attributes * for both indicators, use `display:inline-block;` * update demos with enable switch * fix query mode * update Select to use enhanced progressCircular component * fix autocomplete styling of progress-linear.md-mode-indeterminate * auto-inject md-mode attribute if missing * use 'determinate' if value attribute is defined * otherwise use 'indeterminate' * $log.debug() notify user (via $log.debug) of injection * add API doc details regarding md-mode auto-injection * fix tests BREAKING-CHANGES Before: ```css md-progress-linear { display: block; } md-progress-circular { // display not set // position not set } ``` ```css md-progress-linear { display: block; position: relative; } md-progress-circular { display: block; position: relative; } ``` Fixes angular#4421. Fixes angular#4409. Fixes angular#2540. Fixes angular#2364. Fixes angular#1926. Fixes angular#3802. Closes angular#4454.
- Loading branch information
1 parent
ffbcff3
commit d74f93a
Showing
13 changed files
with
654 additions
and
258 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
92 changes: 54 additions & 38 deletions
92
src/components/progressCircular/demoBasicUsage/index.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 |
---|---|---|
@@ -1,43 +1,59 @@ | ||
<div ng-controller="AppCtrl as vm" layout="column" layout-margin style="padding:25px;"> | ||
|
||
<h4 style="margin-top:10px">Determinate</h4> | ||
<p>For operations where the percentage of the operation completed can be determined, use a determinate indicator. They give users a quick sense of how long an operation will take.</p> | ||
<div layout="row" layout-sm="column" layout-align="space-around"> | ||
<md-progress-circular md-mode="determinate" value="{{vm.determinateValue}}"></md-progress-circular> | ||
</div> | ||
|
||
<h4>Indeterminate</h4> | ||
<p>For operations where the user is asked to wait a moment while something finishes up, and it's not necessary to expose what's happening behind the scenes and how long it will take, use an indeterminate indicator.</p> | ||
<div layout="row" layout-sm="column" layout-align="space-around"> | ||
<md-progress-circular md-mode="indeterminate"></md-progress-circular> | ||
</div> | ||
|
||
<h4>Theming </h4> | ||
|
||
<p> | ||
Your current theme colors can be used to easily colorize your progress indicator with `md-warn` or `md-accent` colors. | ||
To easily hide a <b><md-progress-circular></b> component, simply set the <b>md-mode</b> to "" or null. | ||
</p> | ||
<div layout="row" layout-sm="column" layout-align="space-around" > | ||
<md-progress-circular class="md-hue-2" md-mode="{{vm.modes[0]}}" md-diameter="20px" ></md-progress-circular> | ||
<md-progress-circular class="md-accent" md-mode="{{vm.modes[1]}}" md-diameter="40" ></md-progress-circular> | ||
<md-progress-circular class="md-accent md-hue-1" md-mode="{{vm.modes[2]}}" md-diameter="60" ></md-progress-circular> | ||
<md-progress-circular class="md-warn md-hue-3" md-mode="{{vm.modes[3]}}" md-diameter="70"></md-progress-circular> | ||
<md-progress-circular md-mode="{{vm.modes[4]}}" md-diameter="96"></md-progress-circular> | ||
</div> | ||
|
||
<div layout="row" id="loaders"> | ||
|
||
<p style="margin-right: 20px">Show Progress Circular Indicators: </p> | ||
|
||
<h5>Off</h5> | ||
<md-switch | ||
ng-model="vm.activated" | ||
ng-change="vm.toggleActivation()" | ||
aria-label="Toggle Progress Circular Indicators"> | ||
<h5>On</h5> | ||
</md-switch> | ||
</div> | ||
<h4 style="margin-top:10px">Determinate</h4> | ||
|
||
<p>For operations where the percentage of the operation completed can be determined, use a determinate indicator. They | ||
give users a quick sense of how long an operation will take.</p> | ||
|
||
<div layout="row" layout-sm="column" layout-align="space-around"> | ||
<md-progress-circular md-mode="determinate" value="{{vm.determinateValue}}"></md-progress-circular> | ||
</div> | ||
|
||
<h4>Indeterminate</h4> | ||
|
||
<p>For operations where the user is asked to wait a moment while something finishes up, and it's not necessary to | ||
expose what's happening behind the scenes and how long it will take, use an indeterminate indicator.</p> | ||
|
||
<div layout="row" layout-sm="column" layout-align="space-around"> | ||
<md-progress-circular md-mode="indeterminate"></md-progress-circular> | ||
</div> | ||
|
||
<h4>Theming </h4> | ||
|
||
<p> | ||
Your current theme colors can be used to easily colorize your progress indicator with `md-warn` or `md-accent` | ||
colors. | ||
To easily hide a <b><md-progress-circular></b> component, simply set the <b>md-mode</b> to "" or null. | ||
</p> | ||
|
||
<div layout="row" layout-sm="column" layout-align="space-around"> | ||
<md-progress-circular class="md-hue-2" md-mode="{{vm.modes[0]}}" md-diameter="20px"></md-progress-circular> | ||
<md-progress-circular class="md-accent" md-mode="{{vm.modes[1]}}" md-diameter="40"></md-progress-circular> | ||
<md-progress-circular class="md-accent md-hue-1" md-mode="{{vm.modes[2]}}" md-diameter="60"></md-progress-circular> | ||
<md-progress-circular class="md-warn md-hue-3" md-mode="{{vm.modes[3]}}" md-diameter="70"></md-progress-circular> | ||
<md-progress-circular md-mode="{{vm.modes[4]}}" md-diameter="96"></md-progress-circular> | ||
</div> | ||
|
||
|
||
<hr ng-class="{'visible' : vm.activated}"> | ||
|
||
<div layout="row" id="loaders"> | ||
|
||
<p>Progress Circular Indicators: </p> | ||
|
||
<h5>Off</h5> | ||
<md-switch | ||
ng-model="vm.activated" | ||
ng-change="vm.toggleActivation()" | ||
aria-label="Toggle Progress Circular Indicators"> | ||
<h5>On</h5> | ||
</md-switch> | ||
</div> | ||
|
||
<p class="small"> | ||
Note: With above switch -- that simply clears the md-mode in each <code><md-progress-linear md-mode=""></code> | ||
element -- | ||
developers can easily disable the animations and hide their progress indicators. | ||
</p> | ||
|
||
</div> |
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
Oops, something went wrong.