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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

the integrated learners page really sucks. how can we change it? #60

Closed
jakob-r opened this issue Aug 31, 2016 · 7 comments
Closed

the integrated learners page really sucks. how can we change it? #60

jakob-r opened this issue Aug 31, 2016 · 7 comments

Comments

@jakob-r
Copy link
Contributor

jakob-r commented Aug 31, 2016

Actually I don't hink it really sucks... 馃憖
But! It could be a bit better (also the other tables in the Appendix). Mayor issue: The header row shoud be always visible so that you know what the 'x' stands for.

We could use the DataTables thingy which is quite easy to do out of R into (HTML)Markdown and is quite stable and established. Normal HTML Table will be still there.

Or we program something on our own which makes sure that the top row of the table stays always on top. This is quite cumbersome to my knowledge but would add fit more into our "design" maybe.

@jakob-r jakob-r changed the title The integrated learners page really sucks. How can we change it? the integrated learners page really sucks. How can we change it? Aug 31, 2016
@jakob-r jakob-r changed the title the integrated learners page really sucks. How can we change it? the integrated learners page really sucks. how can we change it? Aug 31, 2016
@berndbischl
Copy link
Contributor

Or we program something on our own which makes sure that the top row of the table stays always on top. This is quite cumbersome to my knowledge but would add fit more into our "design" maybe.

i can see the point but i would rather not suggest to create too much custom code here. thats very often not a good solution. is there something "existing" that works well enough?

@jakob-r
Copy link
Contributor Author

jakob-r commented Sep 1, 2016

The DataTables JavaScript thing that we also use in mlr-shiny and which I linked above.

@schiffner schiffner self-assigned this Nov 3, 2016
@schiffner
Copy link
Contributor

Just to keep you all informed:

I had a closer look at the DataTables thingy.
It offers many different options and styles. We could split large tables over several pages or use the scroll_y option (https://datatables.net/examples/basic_init/scroll_y.html) to always have a visible top row.

There are two ways how to incorporate DataTables into the tutorial:

  1. via the R package DT
  2. directly by including the required css and js files and a js script that works on the html tables.

I tried both. 1. was really annoying and complicated. 2. is much simpler and I got it to work.
The only problem left at the moment is that the DataTables thingy is pretty sensitive to the order in which some js libraries are loaded and at the moment it only works if I exclude a js file necessary for the search function ...

@jakob-r
Copy link
Contributor Author

jakob-r commented Nov 4, 2016

Can you shortly describe what the problems were with 1.) and can you link me to your code where you try out 2.)? I could have a look.

@schiffner
Copy link
Contributor

Thanks!

I put what I tried reg. 2 in https://github.com/mlr-org/mlr-tutorial/tree/DataTable:
I added the required dependencies to the mkdocs.yml and wrote a small script that currently runs DataTable on every table in the tutorial (selector needs to be refined).
I also pushed the html-file for the integrated learners page where one js-file is out commented such that DataTables work.

@schiffner
Copy link
Contributor

Reg. 1): I tried this several weeks ago so I don't remember exactly:
Using the DT package works great when the html is generated by markdown::render, but not when generating md and building the html with mkdocs. The solutions I googled (like recreating parts of markdown::render, first saving the htmlwidget separately and then including it in the html) were all much more complicated than what I needed to do for 2.

@jakob-r
Copy link
Contributor Author

jakob-r commented Nov 9, 2016

Hmm. When you change the order of the scripts and put js/tables.js first both works. The JavaScript Console is also not so helpfull 馃槥

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

No branches or pull requests

4 participants