Skip to content

Conversation

@r-kamath
Copy link
Member

@r-kamath r-kamath commented Apr 26, 2016

What is this PR for?

This is an improvement for table display. By using Handsontable we can load and display more data in paragraphs. Tested using sample tabular data consisting 10000x80 cells

What type of PR is it?

Improvement

Todos

  • - Decimal formatting
  • - Rendering without angular/html directives
  • - UI fixes
  • - License doc update

What is the Jira issue?

How should this be tested?

TODO : test cases to follow

Screenshots (if appropriate)

apr 26 2016 17 38

Questions:

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

@prabhjyotsingh
Copy link
Contributor

@r-kamath build fails with

Failed tests: 
  SparkParagraphIT.testSqlSpark:169 Paragraph from SparkParagraphIT of testSqlSpark result: 
Expected: "age job marital education balance\n30 unemployed married primary 1,787"
     but: was "age\njob\nmarital\neducation\nbalance\n30 unemployed married primary 1787\nage\njob\nmarital\neducation\nbalance"

Looks like this require selenium test update.

@astroshim
Copy link
Contributor

I passed the build with no problems and functionality is working very well.
but @r-kamath you should make the green CI.
Thanks.

@felixcheung
Copy link
Member

How does this work with some of the pending data table changes?
like #6, #714, #725, #761

@r-kamath
Copy link
Member Author

Won't affect #714 and #725

#6 and #761 are using jQuery Datatables
This PR is a proposal to use Handsontable instead of datatables. Handsontable is more like a spreadsheet and has good performance with many builtin features and plugin support.

I've done a basic performance test with 20000x80 rows and columns data and few paragraphs with a subset.
PR #761 : https://drive.google.com/open?id=0B8L8gc9P-C-6eEhHeFVRd3cxNEE
PR #858 : https://drive.google.com/open?id=0B8L8gc9P-C-6dEo3OWVWa1J3QTQ

@felixcheung
Copy link
Member

We would need export to file feature which seems like is not supported in the free Handsontable version?

@r-kamath
Copy link
Member Author

Right, it is supported only in pro ver. Handsontable's Export feature is in front-end. IMHO export should be a backend feature and will be a good addition to our Notebook REST api.

<script src="bower_components/zeroclipboard/dist/ZeroClipboard.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/pikaday/pikaday.js"></script>
<script src="bower_components/handsontable/dist/handsontable.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pickaday.js, moment.js, ZeroClipboard.js, pikaday.css are they required to use handsontable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZeroClipboard and pikaday.js are not required, need to see how to remove them from the build.
As of now moment.js is used only for number formatting (7bb508e)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wrong. All three deps are required. Use without pikaday #2841

@Leemoonsoo
Copy link
Member

Is it possible to handle '%html' inside of table cell?

if i run

println(s"""%table key\tvalue
html\t%html <dev style='color:blue'>blue</div>
""")

Master branch
image

This PR
image

@r-kamath
Copy link
Member Author

@Leemoonsoo that's in the todo list. Can be done either in FE or in server. Thoughts?

@r-kamath
Copy link
Member Author

r-kamath commented Apr 29, 2016

@Leemoonsoo %html rendering is fixed in a96c94a

@Leemoonsoo
Copy link
Member

%html rendering is working nicely! If pickaday.js, moment.js, ZeroClipboard.js are required to use handsontable, they also need to be in 'zeppelin-distribution/src/bin_license/LICENSE'

@r-kamath
Copy link
Member Author

r-kamath commented May 2, 2016

@Leemoonsoo license doc updated and rebased 2e422ea 4fbb22b

@prabhjyotsingh
Copy link
Contributor

LGTM! nice improvement 👍

@Leemoonsoo
Copy link
Member

@r-kamath Are there any more works left for unchecked todo item 'UI fixes', in the description of this PR?

@r-kamath
Copy link
Member Author

r-kamath commented May 4, 2016

@Leemoonsoo the only pending item is the sort header arrow style. Should we try something more stylish ?
screen shot 2016-05-04 at 11 44 08 pm

screen shot 2016-05-04 at 11 42 36 pm

@Leemoonsoo
Copy link
Member

Arrow style looks fine. I think it's good to be merged!

@r-kamath
Copy link
Member Author

r-kamath commented May 4, 2016

@Leemoonsoo cool. I have checked the 'UI fixes'. thanks

@Leemoonsoo
Copy link
Member

Last CI test failure is unrelated to the change. LGTM.

@felixcheung
Copy link
Member

does this PR change the export to CSV capability?

@corneadoug
Copy link
Contributor

@felixcheung No, There is still no export to CSV feature

@r-kamath
Copy link
Member Author

r-kamath commented May 5, 2016

@felixcheung this PR is only for improving table performance. CSV/TSV export is in #725 and #714

@prabhjyotsingh
Copy link
Contributor

@r-kamath can you resolve branch conflict.

@r-kamath
Copy link
Member Author

@prabhjyotsingh conflict resolved f13ba91

@prabhjyotsingh
Copy link
Contributor

Thanks @r-kamath for contributing towards front-end performance.
Merging if no more discussion.

@corneadoug
Copy link
Contributor

Anyway to not have:

  • zeroclipboard
  • pikaday
  • moment

included when installing Handsontable?

@r-kamath
Copy link
Member Author

@corneadoug
Copy link
Contributor

@r-kamath https://github.com/handsontable/hot-builder
I understand that by default it seems to be needed, however I'm reticent to include 3 different dependencies that we are not using.

@r-kamath
Copy link
Member Author

Not sure if we can avoid those dependencies by choosing hot-builder!
Though we are not using the copy/ paste, date picker and date formatting, it is still a feature in Handsontable.
IMO we shouldn't be worried about those three dependencies because it is not a part of our web bower.json

@prabhjyotsingh
Copy link
Contributor

I would agree with @r-kamath, as long as those dependencies are not been written in bower.json we should be ok.
https://github.com/apache/incubator-zeppelin/pull/858/files#diff-6bcc7568e5b6af0b1499ab172fc66af4L33

@corneadoug
Copy link
Contributor

corneadoug commented May 10, 2016

I don't get why its not important to have unused additional dependencies in our build, as long as its not in bower.json, maybe somebody can explain more.

@r-kamath
Copy link
Member Author

@corneadoug Again, this is an issue on handsontable please follow these links. Those entries in index.html should disappear when handsontable team fix the issue.
handsontable/handsontable#2841
handsontable/handsontable#2974

Also it is included in the Improvement-suggestions section.

More details here : https://github.com/handsontable/handsontable

@Leemoonsoo @prabhjyotsingh what say?

@corneadoug
Copy link
Contributor

@r-kamath I don't want to make this PR wait forever.
If it was easy to do, I would prefer removing those dependencies. Mainly because everytime we want to add a dependency, we should ask ourselves if its really necessary, so adding 3 dependencies that are not being used is even worst.

Since Handsontable seems to be helpful in term of performances, it might still be worth it to have those unnecessary dependencies. However, after this PR, we should try to find a way to get rid of them somehow (by keeping an eye for a fix in handsontable, or making a PR there, or even trying their hotbuilder)

@r-kamath
Copy link
Member Author

@corneadoug I'm following up on handsontable repo. Will find some time to explore for a potential PR.

@corneadoug
Copy link
Contributor

Merging if there is no more discussions

@asfgit asfgit closed this in 4eccfcd May 16, 2016
@ghost
Copy link

ghost commented May 20, 2016

Great Job. I have a silly question, how do you debug your code in zeppelin, I mean , what IDE do you use and how you make breakpoint or sth like that ...

@corneadoug
Copy link
Contributor

@yantaiv Better ask that in the mailing list, you would get more answers
But overall:
You can use any IDE you want, there is informations about dev mode in the README

@gauravkumar37
Copy link

Thanks for the wonderful commit.
However, I faced one issue. I am not able to select any data in the table using mouse for copying it. (checked on FF & chrome latest versions)

asfgit pushed a commit that referenced this pull request Jun 6, 2016
…nse file.

### What is this PR for?
<Jquery.floatThead> is no longer used.
But the license document contains the appropriate information.

Due to the following PR <jquery.floatThead> was removed.
Resulting in a using < HandsonTable >.
#858

### What type of PR is it?
 Documentation

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

### 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 #960 from cloverhearts/ZEPPELIN-953 and squashes the following commits:

d9ac1f1 [CloverHearts] Merge branch 'master' into ZEPPELIN-953
5cddba6 [CloverHearts] deleted jquery.floatThead at license file
@corneadoug
Copy link
Contributor

@gauravkumar37 handled in #973

asfgit pushed a commit that referenced this pull request Jun 9, 2016
### What is this PR for?
This PR fixes a few minor issues from the recent introduction of Handsontable for table rendering (#858):
* Render up to 5 digits after decimal point instead of always rounding to integers
* Allow visual selection of table cells (for copy)
* Default to text renderer instead of numeric renderer

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

### Todos

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

### How should this be tested?
Output some rows with floating point numbers and render them in a table.

### 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: Hao Xia <hao@optimizely.com>

Closes #973 from jasonxh/hao/render-table and squashes the following commits:

a663833 [Hao Xia] Remove cell selection. Allow visually selecting table text.
7bc85b5 [Hao Xia] Table rendering improvements: * Render up to 5 digits after decimal point * Allow visual selection of table cells * Default to text renderer
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.

7 participants