You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mi...@apache.org on 2017/01/07 06:15:45 UTC

zeppelin git commit: [ZEPPELIN-1812] Ace editor show/hide problem.

Repository: zeppelin
Updated Branches:
  refs/heads/master 334dba597 -> 13168e668


[ZEPPELIN-1812] Ace editor show/hide problem.

### What is this PR for?
When editor hide is on and page refresh then editor is gone.
I was solve this problem.

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

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

### How should this be tested?
1. hide to editor mode on in paragraph configure.
2. page refresh (f5)
3. enable to show editor mode in paragraph configure.
4. if show editor then is correct.
### Screenshots (if appropriate)
#### before
![badeditor](https://cloud.githubusercontent.com/assets/10525473/21677078/62136de2-d2ed-11e6-9418-0be4453fd839.gif)

#### after
![goodeditor](https://cloud.githubusercontent.com/assets/10525473/21677092/6c8d97e8-d2ed-11e6-8966-a3b7af60c231.gif)

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

Author: cloverhearts <cl...@gmail.com>

Closes #1848 from cloverhearts/ZEPPELIN-1812 and squashes the following commits:

9c5ee63 [cloverhearts] add size check
d10d53d [cloverhearts] add element null check
4750e6f [cloverhearts] fix testcase
c3efea2 [cloverhearts] Revert "fixed test case"
037993d [cloverhearts] fixed test case
b7cd700 [cloverhearts] fixed ace editor hide problem


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/13168e66
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/13168e66
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/13168e66

Branch: refs/heads/master
Commit: 13168e6689f195631dba1825e2c04582c7480b9b
Parents: 334dba5
Author: cloverhearts <cl...@gmail.com>
Authored: Fri Jan 6 01:22:46 2017 -0800
Committer: Mina Lee <mi...@apache.org>
Committed: Sat Jan 7 15:15:31 2017 +0900

----------------------------------------------------------------------
 .../org/apache/zeppelin/integration/ParagraphActionsIT.java    | 6 +++---
 zeppelin-web/src/app/notebook/paragraph/paragraph.html         | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/13168e66/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
index fd0682e..f939579 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
@@ -463,8 +463,8 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       waitForParagraph(1, "FINISHED");
 
       collector.checkThat("Markdown editor is hidden after run ",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.editorHide')]")).isDisplayed(),
-          CoreMatchers.equalTo(false));
+          driver.findElements(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).size(),
+          CoreMatchers.equalTo(0));
 
       collector.checkThat("Markdown editor is shown after run ",
           driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
@@ -477,7 +477,7 @@ public class ParagraphActionsIT extends AbstractZeppelinIT {
       action.doubleClick(driver.findElement(By.xpath(getParagraphXPath(1)))).perform();
       ZeppelinITUtils.sleep(1000, false);
       collector.checkThat("Markdown editor is shown after double click ",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.editorHide')]")).isDisplayed(),
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).isDisplayed(),
           CoreMatchers.equalTo(true));
 
       collector.checkThat("Markdown editor is hidden after double click ",

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/13168e66/zeppelin-web/src/app/notebook/paragraph/paragraph.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.html b/zeppelin-web/src/app/notebook/paragraph/paragraph.html
index 75c8dc6..fac7aed 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.html
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.html
@@ -36,7 +36,7 @@ limitations under the License.
   </div>
 
   <div>
-    <div ng-show="!paragraph.config.editorHide && !viewOnly" style="margin-bottom:3px;">
+    <div ng-if="!paragraph.config.editorHide && !viewOnly" style="margin-bottom:3px;">
       <code-editor
         paragraph-id="paragraph.id"
         paragraph-context="paragraph"