Skip to content

Collapsable sidebar for documentation#693

Merged
ogrisel merged 5 commits intoscikit-learn:masterfrom
jaquesgrobler:Collapse_Sidebar
Mar 15, 2012
Merged

Collapsable sidebar for documentation#693
ogrisel merged 5 commits intoscikit-learn:masterfrom
jaquesgrobler:Collapse_Sidebar

Conversation

@jaquesgrobler
Copy link
Copy Markdown
Member

This is a new little add-on I though could be quite useful for the tutorials especially:
Basically the side-bar will be collapsable, allowing for the actual content to cover a larger area
of the screen.

When giving tutorials to a class directly from the documentation, for example, this could be
useful.

It works very well without problems as far as I can tell. The Examples section is set to ignoring this
function, due to it not really being necessary there and the layout goes a tad crazy as well when included.

I'll make an online version of the html build for those who want to have a quick look at it.

Note: I'm by no means a wizard with javascripts, CSS or html, so if you see something there I can do better, please say..

@jaquesgrobler
Copy link
Copy Markdown
Member Author

Here's a viewable online demo of the add-on:

http://jaquesgrobler.github.com/Collapse-sidebar/index.html

Your thoughts?

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Mar 14, 2012

This is indeed a really useful feature: I did that manually by editing the CSS file to give the tutorial at pycon. However I find the orange color a bit to strong. Maybe switching to "gray" with opacity: 0.1 would be better.

@jaquesgrobler
Copy link
Copy Markdown
Member Author

I agree, it's quite heavy on the eyes.. changed as you suggested and it looks a lot better.. Here's the link:
http://jaquesgrobler.github.com/Collapse-sidebar/index.html

Thanks!

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Mar 14, 2012

Looks good. 👍 for merging.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why did you hide the button; I think that it's a usefull featyre. did it look that ugly.

@jaquesgrobler
Copy link
Copy Markdown
Member Author

@GaelVaroquaux -

It's only on the examples page that I hide it - it shows everywhere else..

I had it there at first, but the layout didn't like it and I while I was trying to get it to play nice,
I decided that you wont really need it for the examples page.. so I added this to remove it specifically for that page
Everywhere else it displays and does it's thing.

I didn't want to spend too much time stuck on fixing the layout on examples, so just to get some version of it available, I removed it for that page. It seems to work well as far as I can tell.
Once I've got some of my other tasks done, I'll perhaps revisit this avenue and put it back in the examples page -
unless somebody else does that in the meanwhile

What do you think?

Regards, J

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Mar 14, 2012

Ok with that, just add a comment that explains why it's temporary disabled on the examples page.

@GaelVaroquaux
Copy link
Copy Markdown
Member

What do I think? Well, I am reviewing the PR on my mobile phone, so I don't have a vlear cut idea :).

@jaquesgrobler
Copy link
Copy Markdown
Member Author

@ogrisel Do you want me to put the comment on the html of the page itself? or where?

@GaelVaroquaux haha I forgot you're up in the mountains.. Hope the holiday is treating you well

@jaquesgrobler
Copy link
Copy Markdown
Member Author

@ogrisel Okay I've added a comment in gen.rst right where I disable it. I doubt this will be hard to solve for somebody that has some html/css skills beyond the limits of myself, so perhaps I should add this as an EasyFix problem in the meanwhile - until I can tend to it again?

@jaquesgrobler
Copy link
Copy Markdown
Member Author

I added an arrow to the button as suggested by @fannix on the mailing list.

Latest html-build: http://jaquesgrobler.github.com/Collapse-sidebar/index.html

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Mar 15, 2012

👍 for merging.

@GaelVaroquaux
Copy link
Copy Markdown
Member

Love it!

----- Original message -----

I added an arrow to the button as suggested by @fannix on the mailing
list.

Latest html-build:
http://jaquesgrobler.github.com/Collapse-sidebar/index.html


Reply to this email directly or view it on GitHub:
#693 (comment)

@agramfort
Copy link
Copy Markdown
Member

I love it too

ogrisel added a commit that referenced this pull request Mar 15, 2012
Collapsible sidebar for documentation
@ogrisel ogrisel merged commit dd55e12 into scikit-learn:master Mar 15, 2012
@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Mar 15, 2012

Thanks for the contrib, it will be very useful when teaching future tutorials.

@jakevdp jakevdp mentioned this pull request Mar 20, 2012
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.

4 participants