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

[HOTFIX : ZEPPELIN-1932] paragraph blur error #1879

Closed
wants to merge 3 commits into from
Closed

[HOTFIX : ZEPPELIN-1932] paragraph blur error #1879

wants to merge 3 commits into from

Conversation

cloverhearts
Copy link
Member

What is this PR for?

When one or more hidden editors are present, clicking on the editor will cause a blur error.
This means that when a paragraph is hidden through ng-if,
Caused by calling the blur method in the absence of an editor object.

What type of PR is it?

Hot Fix

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-1932

How should this be tested?

  1. create paragraph and open debug console.
  2. enable hide paragraph.
  3. page refresh
  4. click to anywhere paragraph.

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? no
  • Does this needs documentation? no

@minahlee
Copy link
Member

Tested, LGTM

@soralee
Copy link
Contributor

soralee commented Jan 11, 2017

@cloverhearts I'd like to test this. could you resolve some conflict file?

@cloverhearts
Copy link
Member Author

@soralee
Sure :)

rebase is done.

@soralee
Copy link
Contributor

soralee commented Jan 11, 2017

@cloverhearts Thank you 👍
Let me test it out and I'll comment this.

@soralee
Copy link
Contributor

soralee commented Jan 11, 2017

Tested and it works well 👍

@minahlee
Copy link
Member

Merge if there is no more discussion

@minahlee
Copy link
Member

@cloverhearts Can you also look into https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js#L764 this line?

I see another error related to editor.
screen shot 2017-01-12 at 3 49 44 pm

How to reproduce

  1. go to Basic Features (Spark) tutorial notebook
  2. run first markdown paragraph

@cloverhearts
Copy link
Member Author

@minahlee Okay, I will take look.

@cloverhearts
Copy link
Member Author

fixed

@minahlee
Copy link
Member

@cloverhearts update looks good to me.

@AhyoungRyu
Copy link
Contributor

LGTM

asfgit pushed a commit that referenced this pull request Jan 13, 2017
### What is this PR for?
When one or more hidden editors are present, clicking on the editor will cause a blur error.
This means that when a paragraph is hidden through ng-if,
Caused by calling the blur method in the absence of an editor object.

### What type of PR is it?
Hot Fix

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1932

### How should this be tested?
1. create paragraph and open debug console.
2. enable hide paragraph.
3. page refresh
4. click to anywhere paragraph.

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: cloverhearts <cloverheartsdev@gmail.com>

Closes #1879 from cloverhearts/hotfix/paragraphOnfocusEvent and squashes the following commits:

7071638 [cloverhearts] fix show title and paragraph context issue
8f4d0bf [cloverhearts] fixed readonly event error
5ecfabb [cloverhearts] check editor object is undeifned.

(cherry picked from commit 2b0e2a4)
Signed-off-by: Mina Lee <minalee@apache.org>
@asfgit asfgit closed this in 2b0e2a4 Jan 13, 2017
asfgit pushed a commit that referenced this pull request Feb 2, 2017
### What is this PR for?
#1879 check if `$scope.editor` is null on `focusParagraph` message, and if it is, just return without handling focus/blur.
Instead of doing null check in the beginning of `$scope.on(focusParagraph)`, I made null check to be scoped only to `$scope.editor`'s method invocation.
FYI, when I say focus/blur, it means paragraph focus. Focused paragraph has different css style from blurred paragraph.

### What type of PR is it?
Bug Fix | Hot Fix

### What is the Jira issue?
[ZEPPELIN-2033](https://issues.apache.org/jira/browse/ZEPPELIN-2033)

### How should this be tested?
Go to `Zeppelin Tutorial/Matplotlib (Python • PySpark)` notebook and see:
 - if first paragraph is blurred, when you click second paragraph.
 - if first paragraph is not run when you run second paragraph with shift + enter. In current master, first editor is not blurred even if you click second paragraph, which makes both first and second paragraph to be focused. This will make both paragraphs to be run.
 - if it is focused when you click third paragraph whose editor is hidden. In current master, it won't work.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Mina Lee <minalee@apache.org>

Closes #1963 from minahlee/ZEPPELIN-2033 and squashes the following commits:

3bf07ca [Mina Lee] Handle focus/blur of paragraph with hidden editor
asfgit pushed a commit that referenced this pull request Feb 2, 2017
### What is this PR for?
#1879 check if `$scope.editor` is null on `focusParagraph` message, and if it is, just return without handling focus/blur.
Instead of doing null check in the beginning of `$scope.on(focusParagraph)`, I made null check to be scoped only to `$scope.editor`'s method invocation.
FYI, when I say focus/blur, it means paragraph focus. Focused paragraph has different css style from blurred paragraph.

### What type of PR is it?
Bug Fix | Hot Fix

### What is the Jira issue?
[ZEPPELIN-2033](https://issues.apache.org/jira/browse/ZEPPELIN-2033)

### How should this be tested?
Go to `Zeppelin Tutorial/Matplotlib (Python • PySpark)` notebook and see:
 - if first paragraph is blurred, when you click second paragraph.
 - if first paragraph is not run when you run second paragraph with shift + enter. In current master, first editor is not blurred even if you click second paragraph, which makes both first and second paragraph to be focused. This will make both paragraphs to be run.
 - if it is focused when you click third paragraph whose editor is hidden. In current master, it won't work.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Mina Lee <minalee@apache.org>

Closes #1963 from minahlee/ZEPPELIN-2033 and squashes the following commits:

3bf07ca [Mina Lee] Handle focus/blur of paragraph with hidden editor

(cherry picked from commit fe11b32)
Signed-off-by: Mina Lee <minalee@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants