Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(progressLinear): sync logic, perf upgrades, fix animations #4454

Closed
wants to merge 1 commit into from

Conversation

ThomasBurleson
Copy link
Contributor

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

BREAKING-CHANGES

Before:

md-progress-linear {
  display: block;
}
md-progress-circular {
   // display not set
   // position not set
}
md-progress-linear {
  display: inline-block;
  position: relative;
}
md-progress-circular {
  display: inline-block;
  position: relative;
}

Fixes #4421. Fixes #4409. Fixes #2540. Fixes #2364. Fixes #1926. Fixes #3802.

@ThomasBurleson
Copy link
Contributor Author

@robertmesserle, @topherfangio - ready for review.

@ThomasBurleson ThomasBurleson added the needs: review This PR is waiting on review from the team label Sep 3, 2015
@ThomasBurleson ThomasBurleson added this to the 0.11.0 milestone Sep 3, 2015
@ThomasBurleson ThomasBurleson self-assigned this Sep 3, 2015
@topherfangio
Copy link
Contributor

Will dig into the code changes shortly, but when running locally, I noticed a small issue:

  1. Open either of the Progress Linear or Progress Circular demos
  2. Turn off the animations using the On/Off toggle switch at the bottom
  3. Switch to the other demo
  4. Sometimes, the TypeError: Cannot read property 'runner' of undefined error is thrown

It appears identical to issue #4388.

Originally, it seemed to happen every time I switched the demos, but since your (now next to latest) commit, it seems to happen less.

if (mode() == MODE_DETERMINATE) {
animateIndicator(percentValue);
}
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason why the formatting has extra indentation here?

Also, should it be mode() === MODE_DETERMINATE (i.e. with the triple =)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, contrary to what most of the JS world says, the Google JS styleguide uses == instead of ===. I struggle to break the === habit on this project. =p

@ThomasBurleson ThomasBurleson force-pushed the wip/progressLinear-sync branch from fd26cd1 to 8bf7a8b Compare September 3, 2015 20:08
…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: inline-block;
  position: relative;
}
md-progress-circular {
  display: inline-block;
  position: relative;
}
```

Fixes #4421. Fixes #4409. Fixes #2540. Fixes #2364. Fixes #1926. Fixes #3802.
kennethcachia pushed a commit to kennethcachia/material that referenced this pull request Sep 23, 2015
…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.
@EladBezalel EladBezalel deleted the wip/progressLinear-sync branch January 16, 2016 00:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.