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

0.2.16 and 1.0.0alpha0: ui-sref-active has slight delay #2503

Closed
pavel-blagodov opened this issue Jan 30, 2016 · 8 comments
Closed

0.2.16 and 1.0.0alpha0: ui-sref-active has slight delay #2503

pavel-blagodov opened this issue Jan 30, 2016 · 8 comments
Assignees
Milestone

Comments

@pavel-blagodov
Copy link

I noticed that ui-sref-active has slight delay that leads to flickering of elements with that directive. This is especially noticeable in case of reload: true, but that's not the issue if we are using ng-class="{selected: ('app.state' | includedByState)}

@pavel-blagodov pavel-blagodov changed the title ui-sref-active has slight delay 1.0.0alpha0: ui-sref-active has slight delay Jan 30, 2016
@nateabele
Copy link
Contributor

Weird. Can you post a plunkr that demonstrates the issue?

@pavel-blagodov
Copy link
Author

@christopherthielen
Copy link
Contributor

I'll take a look at this before alpha.1

@christopherthielen christopherthielen modified the milestones: 1.0.0-beta, 1.0.0-alpha.1, 1.0.0-final Feb 9, 2016
@christopherthielen
Copy link
Contributor

This was introduced in 0.2.16 https://plnkr.co/edit/4gfShkbPt7tDHp4jBBNM?p=preview

Related: #1997 #2012

@christopherthielen
Copy link
Contributor

cc: @nateabele @joshuahiggins

@christopherthielen christopherthielen changed the title 1.0.0alpha0: ui-sref-active has slight delay 0.2.16 and 1.0.0alpha0: ui-sref-active has slight delay Feb 14, 2016
@joshuahiggins
Copy link
Contributor

This is related to the application of the class being pushed into the next cycle to prevent the race condition found in #1997. Should be a pretty low hanging fix. Want a PR against 0.2 or 1.0.0?

@christopherthielen
Copy link
Contributor

Would prefer against 1.0. It should cherry pick pretty smoothly to legacy.

I'd love a test too.

ns-codereview pushed a commit to couchbase/ns_server that referenced this issue Feb 17, 2016
We have to use latest ui router because it has transitionsProvider,
we need transitionsProvider in order to properly handle transition
to the state with rbac permissions
https://github.com/angular-ui/ui-router/releases/tag/1.0.0alpha0

Old ui-router is deprecated
https://github.com/angular-ui/ui-router/releases/tag/0.2.17

Process of migrating is pretty smooth, although there are couple bugs
angular-ui/ui-router#2504
angular-ui/ui-router#2503

Change-Id: I67fc81adecf5ebf9cf294171d5583f8555696cee
Reviewed-on: http://review.couchbase.org/59318
Reviewed-by: Dave Finlay <dave.finlay@couchbase.com>
Tested-by: Dave Finlay <dave.finlay@couchbase.com>
@christopherthielen christopherthielen modified the milestones: 1.0.0-final, 1.0.0-beta.3 Sep 22, 2016
christopherthielen added a commit that referenced this issue Nov 5, 2016
- Reduce digests caused by removing `$timeout` calls
- This seems to fix the broken behavior reported in both #2503 and #1997

Closes #2503
Closes #1997
Supercedes #2012
@christopherthielen
Copy link
Contributor

fixed by using $evalAsync
https://plnkr.co/edit/D8eB4KDVjBSgAuQeRUX5?p=preview

christopherthielen added a commit that referenced this issue Nov 5, 2016
fix(ui-sref-active): Avoid add/remove class race condition
refactor(ui-sref-active): Apply all CSS changes in a single `$evalAsync`

See also: 6a9d9ae #1997 #2503 #1997 #2012

Closes #2777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants