[ZEPPELIN-2519] Disable watchers not in viewport#2326
Conversation
|
Thanks for the contribution @vipul1409
|
|
Probably meant "Thanks for the contribution @vipul1409" |
|
Oops. autocompletion didn't work. Sorry for confusing. |
|
I checked Jenkins Job. The sub job failing is https://travis-ci.org/vipul1409/zeppelin/jobs/230634157 It is failing because of some git access issues. Any suggestions on what could be the issue? |
| <script src="bower_components/MathJax/MathJax.js"></script> | ||
| <script src="bower_components/clipboard/dist/clipboard.js"></script> | ||
| <script src="bower_components/ngclipboard/dist/ngclipboard.js"></script> | ||
| <script src="bower_components/scrollMonitor/scrollMonitor.js"></script> |
There was a problem hiding this comment.
Is it possible to use scrollMonitor without installing it? it's not added to bower.js.
| "MathJax": "2.7.0", | ||
| "ngclipboard": "^1.1.1" | ||
| "ngclipboard": "^1.1.1", | ||
| "angular-viewport-watch": "^0.1.35" |
There was a problem hiding this comment.
It would be nicer to install angular-viewport-watch using npm instead of bower. Since we are trying to move npm from bower.
Here is one example.
|
Addressed review comments and moved the dependency to npm. One jenkins job is failing but looks unrelated to my changes. I also see build is marked as failed in master, just double checking if master build is also broken. |
|
Even latest master is breaking with exactly same error. I am not able to figure out the issue. Any help or suggestions will be great. |
| * limitations under the License. | ||
| */ | ||
|
|
||
| import 'angular-viewport-watch/angular-viewport-watch.js' |
There was a problem hiding this comment.
Thanks for update! It would be nicer to move import stmt into app.js where the library is actually used.
|
Additionally, Zeppelin supports angular API both in backend, frontend. Could you make sure that this PR doesn't break existing features? |
|
Sorry for delayed response. |
|
You can close and reopen this PR to trigger jenkins again (not travis). I will test and comment soon. Thanks for updating. |
|
Your travis job failed at |
|
Fixed all the issues and the tests have also passed. Please let me know if any more details are needed. |
|
Tested and works well (both in frontend, backend angular APIs). LGTM. |
|
Thanks @vipul1409 for great contribution. Merge to master if no further discussions. |
|
Hi @vipul1409, This PR occurs an error like TypeError: Cannot read property 'create' of undefined
at Object.link (http://localhost:9001/app.bundle.js:9662:52)
at http://localhost:9001/bower_components/angular/angular.js:1240:18
at invokeLinkFn (http://localhost:9001/bower_components/angular/angular.js:9814:9)
at nodeLinkFn (http://localhost:9001/bower_components/angular/angular.js:9215:11)
at compositeLinkFn (http://localhost:9001/bower_components/angular/angular.js:8510:13)
at publicLinkFn (http://localhost:9001/bower_components/angular/angular.js:8390:30)
at lazyCompilation (http://localhost:9001/bower_components/angular/angular.js:8728:25)
at boundTranscludeFn (http://localhost:9001/bower_components/angular/angular.js:8527:16)
at controllersBoundTransclude (http://localhost:9001/bower_components/angular/angular.js:9265:20)
at ngRepeatAction (http://localhost:9001/bower_components/angular/angular.js:29607:15) <div id="{{currentParagraph.id}}_paragraphColumn_main" ng-repeat="currentParagraph in note.paragraphs" ng-controller="ParagraphCtrl" ng-init="init(currentParagraph, note)" ng-class="columnWidthClass(currentParagraph.config.colWidth)" style="margin: 0; padding: 0;" viewport-watch="" class="ng-scope" data-ng-animate="1">When I remove |
|
Hi Kun,
Raised this PR for the fix.
https://github.com/apache/zeppelin/pull/2392/files
Regards,
…On Thu, Jun 1, 2017 at 9:11 PM, Kun ***@***.***> wrote:
Hi @vipul1409 <https://github.com/vipul1409>, This PR occurs an error like
TypeError: Cannot read property 'create' of undefined
at Object.link (http://localhost:9001/app.bundle.js:9662:52)
at http://localhost:9001/bower_components/angular/angular.js:1240:18
at invokeLinkFn (http://localhost:9001/bower_components/angular/angular.js:9814:9)
at nodeLinkFn (http://localhost:9001/bower_components/angular/angular.js:9215:11)
at compositeLinkFn (http://localhost:9001/bower_components/angular/angular.js:8510:13)
at publicLinkFn (http://localhost:9001/bower_components/angular/angular.js:8390:30)
at lazyCompilation (http://localhost:9001/bower_components/angular/angular.js:8728:25)
at boundTranscludeFn (http://localhost:9001/bower_components/angular/angular.js:8527:16)
at controllersBoundTransclude (http://localhost:9001/bower_components/angular/angular.js:9265:20)
at ngRepeatAction (http://localhost:9001/bower_components/angular/angular.js:29607:15) <div id="{{currentParagraph.id}}_paragraphColumn_main" ng-repeat="currentParagraph in note.paragraphs" ng-controller="ParagraphCtrl" ng-init="init(currentParagraph, note)" ng-class="columnWidthClass(currentParagraph.config.colWidth)" style="margin: 0; padding: 0;" viewport-watch="" class="ng-scope" data-ng-animate="1">
When I remove viewport-watch directive from notebook.html, there is no
error.
Could you fix it?
[image: image]
<https://cloud.githubusercontent.com/assets/4968473/26710441/d7940e48-4794-11e7-9b1f-d16462acc49e.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2326 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABpFHmRfDYpbbu_O4gDWD4w6K9FJCgaYks5r_4tugaJpZM4NVjZF>
.
--
Vipul Modi
Software Development Engineer 2
Flipkart Internet Pvt. Ltd.
|
|
Hi @vipul1409 , Could you check #2505? |

What is this PR for?
Currently all the watchers are enabled by default. I came across this github project https://github.com/wix/angular-viewport-watch to disable watchers not in viewport. This reduces number of watchers in notebooks with large number of paragraphs.
What type of PR is it?
[Improvement]
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2519
How should this be tested?
Outline the steps to test the PR here.
Screenshots (if appropriate)
Questions:
Does the licenses files need update?
Not sure of this part. This is under MIT license. Project link
Is there breaking changes for older versions?
No
Does this needs documentation?
No