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

[Framework] Bump angular to 1.4.4 #81

Merged
merged 7 commits into from
Sep 10, 2015
Merged

[Framework] Bump angular to 1.4.4 #81

merged 7 commits into from
Sep 10, 2015

Conversation

larkin
Copy link
Contributor

@larkin larkin commented Aug 24, 2015

Upgrade angular to latest version, also update angular-route.

Needs full testing to discover potential issues with angular 1.4.4; I will be reporting bugs I find in this pull request and resolving them here.

Upgrade angular to latest version, also update angular-route.
@larkin
Copy link
Contributor Author

larkin commented Aug 24, 2015

InfoService throws errors which results in multiple infobubbles displaying:

screen shot 2015-08-24 at 12 42 40 pm

screen shot 2015-08-24 at 12 39 28 pm

Update the info gesture so that it does not schedule
multiple bubbles to be shown when multiple events fire,
for AngularJS 1.4.4 compatibility.
@VWoeltjen
Copy link
Contributor

It seems that mouseenter listeners associated with the InfoGesture are being attached three times. In Angular 1.4.4, this is interpreted as "invoke this method three times on mouse enter", which is causing extra bubbles to be launched. Only the topmost one gets correctly removed (or cancelled, if not already showing) when the mouse leaves.

Added a quick-fix to this branch which avoids rescheduling the display of a bubble if one is already scheduled; still investigating why that listener is getting attached three times in the first place.

@VWoeltjen
Copy link
Contributor

It appears that the root cause of the info bubble strangeness above is an Angular bug around attaching/detaching/reattching event listeners to mouseenter and mouseleave specifically. Filed angular/angular.js#12795

The multiple attachments of the same listener is weird (I think this is redundant attachment of gestures as multiple watches are fired for a given mct-representation), but should still be correct, because the extra gestures being attached are also being destroyed appropriately.

Fortunately, InfoGesture is the only place where mouseenter or mouseleave are listened-for in this fashion, so the workaround should be sufficient

...and add comment pointing back to the Angular issue
which motivates the workaround.
@larkin
Copy link
Contributor Author

larkin commented Sep 9, 2015

@VWoeltjen stellar bugtracing here. Always great to know it's not our bug and to be able to workaround it.

Anything else you've noticed in testing this branch that would prevent a merge?

@VWoeltjen
Copy link
Contributor

Still looking through. My approach is to look through bundles and test the major functionality associated with each bundle. Will add notes here as I go; I'll add an author checklist once I think this is ready to merge

@VWoeltjen
Copy link
Contributor

Now hitting an infinite digest exception when I try to create a Telemetry Panel while another Telemetry Panel is selected in the tree. I haven't observed this while creating other types; I'm speculating that this is related to some interaction between the Locator (probably LocatorController) and containment policies.

Avoid infinite digest loop from LocatorController associated
with upgrade to Angular 1.4.4
Check for existence of context capability from Remove action
during navigation check. This avoids an exception that
appears to have been swallowed in earlier versions of
Angular.
Update locator specs to provide expected functionality
of .
@VWoeltjen
Copy link
Contributor

Believe I've tracked down all the regressions introduced by transitioning to 1.4.4. Method of verification was to look through platform bundles and smoke-test major functionality associated with each bundle.

A summary of changes:

  • The locator control (e.g. to pick a destination for a telemetry panel) was causing an infinite digest when a Create action was invoked anywhere deeper than My Items. Not sure of the exact root cause, guessing the default depth for infinite-digest checking was reduced or something similar. In any event, stuck the LocatorController logic that exposes the top-level object (for the template to load a tree) into a timeout, to break up the digest cycles. Consequence of this is a (usually imperceptible) wait spinner appearing before the tree appears.
  • Added a check to RemoveAction to avoid an exception that was being thrown while checking to see if the removal of the object should also trigger a navigation change. This exception also gets hit on the current master branch but Angular 1.2.23 seems to have swallow it (had to add a try-catch to observe it)
  • Added a workaround for the redundant mouseenter calls associated with the info gesture.

Think this is ready to merge, pending second-party review. I wouldn't discourage any additional testing before merge, given the scope of the change 😁

Author Checklist

  1. Changes address original issue? Y
  2. Unit tests included and/or updated with changes? Y
  3. Command line build passes? Y
  4. Expect to pass code review? Y

@larkin larkin merged commit 426ab44 into master Sep 10, 2015
@larkin
Copy link
Contributor Author

larkin commented Sep 10, 2015

Review Checklist
Changes appear to address issue? Y
Appropriate unit tests included? Y
Code style and in-line documentation are appropriate? Y
Commit messages meet standards? Y
Project-specific information isolated to appropriate branches? Y

Integration Checklist
Automated build passing after merge? Y
No merge conflicts (or resolution trivial/obvious)? Y
All master branches up-to-date after merge? Y
Project-specific information isolated to appropriate branches? Y

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

Successfully merging this pull request may close these issues.

2 participants