Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

refactor(accordion): use ngAnimate for animations #1675

Merged
merged 1 commit into from
Mar 21, 2015

Conversation

chrisirhc
Copy link
Contributor

Update: Most likely going to change this approach to something similar to what I did for #1772.

Not ready yet until carousel is fixed with ngAnimate as ngAnimate breaks carousel.

  • Deprecate collapse module

Consider removing the collapse module after transition module is deprecated as well.

@pkozlowski-opensource , the way I see it, ngAnimate makes animations coupled with the template. I think this makes sense as it's a layer of presentation logic. As such, perhaps having class names only in animations (and templates) might be okay.

TODO:

@ghost ghost assigned ajoslin Jan 28, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Jan 28, 2014

LGTM, once the todo list is done it seems good.

And it still works well without ngAnimate too.

It seems that we could factor these animations out into their own files/folder though? They have a lot in common.

@anton000
Copy link

@chrisirhc would love to get a status update on this. :)

.animation('.panel-collapse', function () {
return {
beforeAddClass: function (element, className, done) {
if (className == 'in') {

Choose a reason for hiding this comment

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

any specific reason why you wouldn't use a strict equality operator? (===)

@chrisirhc chrisirhc modified the milestones: 0.12, ngAnimate Sep 21, 2014
@chrisirhc chrisirhc modified the milestones: 0.12, 0.13 Nov 16, 2014
@Foxandxss
Copy link
Contributor

@chrisirhc this is old and a bit outdated, I rebased it but there is no animation, I guess I need to learn more about .animation and css animations :P

@Foxandxss
Copy link
Contributor

@chrisirhc
Copy link
Contributor Author

Rebased and fixed for Angular 1.3. Just needs review.

@chrisirhc chrisirhc force-pushed the feature/accordion-ngAnimate branch 2 times, most recently from 6f5a9f9 to 68f6653 Compare March 21, 2015 21:56
beforeAddClass: function (element, className, done) {
if (className == 'in') {
element
.css({height: '0'})
Copy link
Contributor

Choose a reason for hiding this comment

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

collapsing does that for you and it seems to be working without that line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, good catch.

@Foxandxss
Copy link
Contributor

This fixes #2871 as well.

@chrisirhc chrisirhc force-pushed the feature/accordion-ngAnimate branch from 5c95c5c to 09fe63c Compare March 21, 2015 22:17
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Mar 21, 2015
- Deprecate collapse module
  Consider removing it after transition module is deprecated as well.

Fixes angular-ui#2871
Closes angular-ui#1675
@chrisirhc chrisirhc changed the title refactor(accordion): use ngAnimate for animations (WIP) refactor(accordion): use ngAnimate for animations Mar 21, 2015
@chrisirhc chrisirhc force-pushed the feature/accordion-ngAnimate branch from 09fe63c to 603a4e7 Compare March 21, 2015 22:21
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Mar 21, 2015
- Deprecate collapse module
  Consider removing it after transition module is deprecated as well.

Fixes angular-ui#2871
Fixes angular-ui#3141
Closes angular-ui#1675
- Deprecate collapse module
  Consider removing it after transition module is deprecated as well.

Fixes angular-ui#2871
Fixes angular-ui#3141
Closes angular-ui#1675
@chrisirhc chrisirhc force-pushed the feature/accordion-ngAnimate branch from 603a4e7 to f9a9b97 Compare March 21, 2015 22:21
@chrisirhc chrisirhc merged commit f9a9b97 into angular-ui:master Mar 21, 2015
@karianna
Copy link
Contributor

I thought we didn't 'merge' PRs? Shouldn't this have been cherry picked instead?

@chrisirhc
Copy link
Contributor Author

@karianna This is rebased onto master, there's no Merge commit created, so it's the same as cherry-picking. It's just GitHub shows it as "Merged" if the exact commit SHA is preserved after merging.

Also FYI, you can only get to this "Merged" state if the user who created the PR created it off the tip of the master and it was merged while no other change has been committed to master.

@chrisirhc chrisirhc deleted the feature/accordion-ngAnimate branch March 23, 2015 06:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants