[GitHub] zeppelin pull request #2641: Zeppelin 1363

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2641: Zeppelin 1363

anthonycorbacho
GitHub user tinkoff-dwh opened a pull request:

    https://github.com/apache/zeppelin/pull/2641

    Zeppelin 1363

    ### What is this PR for?
    Added dynamic forms for Note. All paragraphs has access to note forms.
   
    ### What type of PR is it?
    [Feature]
   
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-1363
   
    ### How should this be tested?
    Create global interpreter JDBC and Spark. Create note with 2 paragraphs
    ```
    %pyspark
   
    print("Textbox paragraph " + z.textbox('input', 'default'))
    print("Textbox note " + z.noteTextbox('note_input', 'default_note'))
   
    print("Select paragraph " +  z.select("sel", [("1","opt1"), ("2","opt2"), ("3","opt3")]))
    print("Select note " +  z.noteSelect("sel_note", [("1","noteOpt1"), ("2","noteOpt2"), ("3","noteOpt3")]))
   
    options = [("key1","Name1"), ("key2","Name2")]
    print("Checkbox paragraph "+ " and ".join(z.checkbox("chk", options, ["key1"])))
    print("Checkbox note "+ " and ".join(z.noteCheckbox("chk_note", options, ["key1","key2"])))
    ```
    ```
    %jdbc
   
    select '$${checkbox:chk_note=key1|key2,key1|key2}   $${note_input} ${note_input=sameName}'
    ```
   
    ### Screenshots (if appropriate)
    1) native forms
    ![1](https://user-images.githubusercontent.com/25951039/32273062-b4d02526-bf22-11e7-9c95-f5aa3b41b8a0.gif)
    2) remove
    ![2](https://user-images.githubusercontent.com/25951039/32273061-b4b0a926-bf22-11e7-8e5c-b26f37da7f61.gif)
    3) simple forms
    ![3](https://user-images.githubusercontent.com/25951039/32273060-b48fff78-bf22-11e7-81be-e1afac00b709.gif)
   
    ### Questions:
    * Does the licenses files need update? no
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tinkoff-dwh/zeppelin ZEPPELIN-1363

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2641.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2641
   
----
commit c566462a5f8b25f33d363e311ffbcc5bd0bd4a4b
Author: tinkoff-dwh <[hidden email]>
Date:   2017-10-26T07:09:27Z

    [ZEPPELIN-1363] note dynamic forms (simple; native: spark, python)

commit 9b2f3e9baefd68bb3fef918124d2f4ca09d195e1
Author: tinkoff-dwh <[hidden email]>
Date:   2017-10-31T19:45:58Z

    [ZEPPELIN-1363] button to remove form

commit bf8194e6f4493774e13e285dab44a4cef115ccd6
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T06:21:43Z

    Merge remote-tracking branch 'upstream/master' into ZEPPELIN-1363
   
    # Conflicts:
    # zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java

commit 29eaca241cd6a2c24705b4215f7701a69a3ef29d
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T06:56:13Z

    [ZEPPELIN-1363] fix tests

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
Github user tinkoff-dwh closed the pull request at:

    https://github.com/apache/zeppelin/pull/2641


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
GitHub user tinkoff-dwh reopened a pull request:

    https://github.com/apache/zeppelin/pull/2641

    [ZEPPELIN-1363] Note level dynamic form

    ### What is this PR for?
    Added dynamic forms for Note. All paragraphs has access to note forms.
   
    ### What type of PR is it?
    [Feature]
   
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-1363
   
    ### How should this be tested?
    Create global interpreter JDBC and Spark. Create note with 2 paragraphs
    ```
    %pyspark
   
    print("Textbox paragraph " + z.textbox('input', 'default'))
    print("Textbox note " + z.noteTextbox('note_input', 'default_note'))
   
    print("Select paragraph " +  z.select("sel", [("1","opt1"), ("2","opt2"), ("3","opt3")]))
    print("Select note " +  z.noteSelect("sel_note", [("1","noteOpt1"), ("2","noteOpt2"), ("3","noteOpt3")]))
   
    options = [("key1","Name1"), ("key2","Name2")]
    print("Checkbox paragraph "+ " and ".join(z.checkbox("chk", options, ["key1"])))
    print("Checkbox note "+ " and ".join(z.noteCheckbox("chk_note", options, ["key1","key2"])))
    ```
    ```
    %jdbc
   
    select '$${checkbox:chk_note=key1|key2,key1|key2}   $${note_input} ${note_input=sameName}'
    ```
   
    ### Screenshots (if appropriate)
    1) native forms
    ![1](https://user-images.githubusercontent.com/25951039/32273062-b4d02526-bf22-11e7-9c95-f5aa3b41b8a0.gif)
    2) remove
    ![2](https://user-images.githubusercontent.com/25951039/32273061-b4b0a926-bf22-11e7-8e5c-b26f37da7f61.gif)
    3) simple forms
    ![3](https://user-images.githubusercontent.com/25951039/32273060-b48fff78-bf22-11e7-81be-e1afac00b709.gif)
   
    ### Questions:
    * Does the licenses files need update? no
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tinkoff-dwh/zeppelin ZEPPELIN-1363

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2641.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2641
   
----
commit c566462a5f8b25f33d363e311ffbcc5bd0bd4a4b
Author: tinkoff-dwh <[hidden email]>
Date:   2017-10-26T07:09:27Z

    [ZEPPELIN-1363] note dynamic forms (simple; native: spark, python)

commit 9b2f3e9baefd68bb3fef918124d2f4ca09d195e1
Author: tinkoff-dwh <[hidden email]>
Date:   2017-10-31T19:45:58Z

    [ZEPPELIN-1363] button to remove form

commit bf8194e6f4493774e13e285dab44a4cef115ccd6
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T06:21:43Z

    Merge remote-tracking branch 'upstream/master' into ZEPPELIN-1363
   
    # Conflicts:
    # zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java

commit 29eaca241cd6a2c24705b4215f7701a69a3ef29d
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T06:56:13Z

    [ZEPPELIN-1363] fix tests

commit f30033a16e84e97dd94f4e33dafe16553f2e0264
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T11:50:58Z

    Merge remote-tracking branch 'upstream/master' into ZEPPELIN-1363
   
    # Conflicts:
    # zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user tinkoff-dwh commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    @Leemoonsoo
    Pls help review it


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    Cool! @tinkoff-dwh Thanks for the new feature!
   
    I tried and it works well. I have some comments on it's behavior.
   
    1. form value is not updated without pressing 'ENTER'
    ![zeppelin_note_dynamic](https://user-images.githubusercontent.com/1540981/32422761-a0378b2e-c2e5-11e7-8283-40a6e9f3fcd9.gif)
   
    When there're changes on note level form, run any paragraph reset those changes. I think applying change on paragraph run more make sense?
   
    2. Run on 'ENTER'
    ![zeppelin_note_dynamic_2](https://user-images.githubusercontent.com/1540981/32422833-12b2d9e2-c2e6-11e7-978c-aac9d278cbeb.gif)
   
    Paragraph level dynamic form by default run paragraph on 'ENTER'.
    Note level dynamic form does not run note on 'ENTER'. I think this behavior is little bit inconsistent.
    What do you think?
   



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user tinkoff-dwh commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    yep.
    Note level forms works like as paragraph forms, but action 'Save changes' except `Run paragraph'.
   
    Paragrap input (Enter) -> Note input (Enter)
    run paragraph -> save changes of note input
   
   
    Paragrap select (select value) -> Note select (select value)
    run paragraph -> save changes of note select
   
    Start all paragraphs can be long, so I think it is better to delegate this action (run all or one paragraph) to the user.
   
   
    Paragrap checkbox (select check) -> Note checkbox (check)
    run paragraph -> save changes of note checkbox


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user tinkoff-dwh commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    @Leemoonsoo
    yep.
    Note level forms works like as paragraph forms, but action 'Save changes' except `Run paragraph'.
   
    Paragrap input (Enter) -> Note input (Enter)
    run paragraph -> save changes of note input
   
    Paragrap select (select value) -> Note select (select value)
    run paragraph -> save changes of note select
   
    Start all paragraphs can be long, so I think it is better to delegate this action (run all or one paragraph) to the user.
   
    Paragrap checkbox (select check) -> Note checkbox (check)
    run paragraph -> save changes of note checkbox


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    1. Input dynamic form create
    2. Update dynamic form value (without ENTER)
    3. Run paragraph
   
    Paragraph level dynamic form run paragraph with updated value. But Note level dynamic form reset update and run paragraph with previous value. I think it make more sense to note level dynamic form also run paragraph with updated value in this case.
   
    > Start all paragraphs can be long, so I think it is better to delegate this action (run all or one paragraph) to the user.
   
    I agree.
   
    It would be more convenient if Note level dynamic form displays "Save (dynamic form change)", "Run notebook", "Reset (dynamic form change)" buttons when user update Note level dynamic form.
   
    Currently, user need to discover and learn default behavior different between paragraph level and note level dynamic form by trial. And this trial may take some time depend on people. Showing those buttons give informations about expected behavior of note level dynamic form and helps understand behavior immediately after user make changes on the form value. What do you think?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user tinkoff-dwh commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    @Leemoonsoo
    I propose to do:
     - auto save for all forms (select, checkbox, textbox)
     - add short description in header
        (Note forms)
        You can use these forms in your paragraphs
   
    Adding buttons would be a duplicate (we have autosave of forms and there is a button to Run all paragraphs)


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    @tinkoff-dwh sounds like a plan!


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user tinkoff-dwh closed the pull request at:

    https://github.com/apache/zeppelin/pull/2641


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
GitHub user tinkoff-dwh reopened a pull request:

    https://github.com/apache/zeppelin/pull/2641

    [ZEPPELIN-1363] Note level dynamic form

    ### What is this PR for?
    Added dynamic forms for Note. All paragraphs has access to note forms.
   
    ### What type of PR is it?
    [Feature]
   
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-1363
   
    ### How should this be tested?
    Create global interpreter JDBC and Spark. Create note with 2 paragraphs
    ```
    %pyspark
   
    print("Textbox paragraph " + z.textbox('input', 'default'))
    print("Textbox note " + z.noteTextbox('note_input', 'default_note'))
   
    print("Select paragraph " +  z.select("sel", [("1","opt1"), ("2","opt2"), ("3","opt3")]))
    print("Select note " +  z.noteSelect("sel_note", [("1","noteOpt1"), ("2","noteOpt2"), ("3","noteOpt3")]))
   
    options = [("key1","Name1"), ("key2","Name2")]
    print("Checkbox paragraph "+ " and ".join(z.checkbox("chk", options, ["key1"])))
    print("Checkbox note "+ " and ".join(z.noteCheckbox("chk_note", options, ["key1","key2"])))
    ```
    ```
    %jdbc
   
    select '$${checkbox:chk_note=key1|key2,key1|key2}   $${note_input} ${note_input=sameName}'
    ```
   
    ### Screenshots (if appropriate)
    1) native forms
    ![1](https://user-images.githubusercontent.com/25951039/32273062-b4d02526-bf22-11e7-9c95-f5aa3b41b8a0.gif)
    2) remove
    ![2](https://user-images.githubusercontent.com/25951039/32273061-b4b0a926-bf22-11e7-8e5c-b26f37da7f61.gif)
    3) simple forms
    ![3](https://user-images.githubusercontent.com/25951039/32273060-b48fff78-bf22-11e7-81be-e1afac00b709.gif)
   
    ### Questions:
    * Does the licenses files need update? no
    * Is there breaking changes for older versions? no
    * Does this needs documentation? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tinkoff-dwh/zeppelin ZEPPELIN-1363

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/2641.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2641
   
----
commit c566462a5f8b25f33d363e311ffbcc5bd0bd4a4b
Author: tinkoff-dwh <[hidden email]>
Date:   2017-10-26T07:09:27Z

    [ZEPPELIN-1363] note dynamic forms (simple; native: spark, python)

commit 9b2f3e9baefd68bb3fef918124d2f4ca09d195e1
Author: tinkoff-dwh <[hidden email]>
Date:   2017-10-31T19:45:58Z

    [ZEPPELIN-1363] button to remove form

commit bf8194e6f4493774e13e285dab44a4cef115ccd6
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T06:21:43Z

    Merge remote-tracking branch 'upstream/master' into ZEPPELIN-1363
   
    # Conflicts:
    # zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java

commit 29eaca241cd6a2c24705b4215f7701a69a3ef29d
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T06:56:13Z

    [ZEPPELIN-1363] fix tests

commit f30033a16e84e97dd94f4e33dafe16553f2e0264
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-01T11:50:58Z

    Merge remote-tracking branch 'upstream/master' into ZEPPELIN-1363
   
    # Conflicts:
    # zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java

commit 3ee482628cf66c743ad4c483f3e4146df8053c8a
Author: tinkoff-dwh <[hidden email]>
Date:   2017-11-07T16:33:58Z

    [ZEPPELIN-1363] autosave textbox

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user tinkoff-dwh commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    Ready to review


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    LGTM


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    Merge to master if no further review.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user asfgit closed the pull request at:

    https://github.com/apache/zeppelin/pull/2641


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2641: [ZEPPELIN-1363] Note level dynamic form

anthonycorbacho
In reply to this post by anthonycorbacho
Github user mjmeyer commented on the issue:

    https://github.com/apache/zeppelin/pull/2641
 
    Built 0.8.0 and see this working in md and pyspark interpreters.
   
    ```
    %md
    projectName: $${projectName}  
    ```
   
    ```
    %pyspark
    print("ProjectName " + z.noteTextbox('projectName'))
    ```
   
    How to reference a note level form field from spark or spark.sql interpreters???
    ```
    %spark
    println("Hello:" + z.noteTextbox("projectName"))
    ```
    Causes a paragraph level input field to be rendered  in this para, ignoring the one with same name at the top of the note.
   
   
   



---