Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC Improves sidebar navigation for user guide #16964

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Aug 2, 2020

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Apr 19, 2020

Reference Issues/PRs

Alternative to #16951

What does this implement/fix? Explain your changes.

Updates the sidebar for the user guide for better navigation.

@adrinjalali
Copy link
Member

I think this is a nice one to have, but I rather have this one, and a sort of global one as well. With this change, it's hard to navigate once the user goes to a UG or an example, since that part of the navigation is gone.

@thomasjpfan
Copy link
Member Author

I was trying to go for a UX where the navigation is done from the navigation bar itself. Kind of like how pandas did it .

But I am okay with having the global one there as well. (It may be less LOC)

@adrinjalali
Copy link
Member

pandas has 3 levels of navigation, the navigation bar, the local one (which they have on the right side), and another one on the left side which is kinda the parent of the local one. This PR now almost implements the local one which pandas has on the right side only.

I also really like how the navigation is responsive to the scrolling in pandas, but no idea how hard/easy it is to implement.

@thomasjpfan
Copy link
Member Author

I also really like how the navigation is responsive to the scrolling in pandas, but no idea how hard/easy it is to implement.

I would say its intermediate. (It's a bootstrap feature)

We have a mixture. The TOC on the right can sometimes be the global or the local. On the PR when one is just on a index page such as supervised learning, it shows the toc just for the user guide. If one wants to navigate to another page, they can go to the top navbar. On the master supervised learning page it shows the local TOC which is not much.

If one is on the user guide, a user can navigate from the nav bar as well. The same pages that appear on master.

As for the example, this PR is the same as master.

TLDR: This PR only updates the user guide TOC.

@NicolasHug
Copy link
Member

In the original issue @amueller says

I prefer the first one and I think we should adjust the TOC on all of the pages so that the high-level overview stays present on all of the pages.

Isn't this PR doing the opposite? As far as I can tell the global overview isn't present anymore on the UG.

@thomasjpfan
Copy link
Member Author

thomasjpfan commented Apr 24, 2020

Isn't this PR doing the opposite? As far as I can tell the global overview isn't present anymore on the UG.

Yea its the opposite, I change the comment at the top to state this is an alternative.

I think having global everywhere would be be noise for long pages, such as the API page or any user guide page with many sections, since it is so many levels down.

I think using the navbar to navigate between pages and using the side bar to navigate within a page is a better UI/UX.

Sidenote: I will create another PR to place the global nav bar on the sidebar so we can compare them.

@thomasjpfan
Copy link
Member Author

#17033 places the global TOC on the sidebar everywhere.

@jnothman
Copy link
Member

So far I prefer this one... I think? Hard to see and test.

What I'm missing is subheadings (for in-page navigation) for Dataset loading utilities

@thomasjpfan thomasjpfan changed the title DOC Improves navigation of sidebar navigation DOC Improves navigation of sidebar navigation for only the user guide Apr 28, 2020
@thomasjpfan
Copy link
Member Author

This PR only updates the navigation for the user guide.

What I'm missing is subheadings (for in-page navigation) for Dataset loading utilities

The user guide is structured in a way where Dataset loading utilities and Computing with scikit-learn are just one file, while the other ones are indexes with children. In other words it would be nice to show the localtoc for Dataset loading utilities and Computing with scikit-learn and a more global one for the rest.

@amueller
Copy link
Member

I like this! I think this is a good next step!

@amueller
Copy link
Member

Right now this is a "global" page for the user guide, right? I'd like to see the local on the right hand in a Pr on top of this.

@thomasjpfan
Copy link
Member Author

Right now this is a "global" page for the user guide, right?

Yea it is a "global page" for the user guide.

@thomasjpfan
Copy link
Member Author

For reference, this is the current high level structure of the docs. Pages without toc are single pages, while pages with a TOC has more deeper levels.

  1. Preface toc
    1. Installation no-toc
    2. FAQ no-toc
    3. Support no-toc
    4. Related Projectts no-toc
    5. About us no-toc
    6. Testimonials no-toc
    7. Whats new toc
    8. Roadmap no-toc
    9. Governance no-toc
  2. Tutorial toc
  3. Getting Started no-toc
  4. User guide toc
    1. Supervised Learning toc
    2. Unsupervised Learning toc
    3. Model Selection toc
    4. Inspection toc
    5. Visualizations no-toc
    6. Data Transformations toc
    7. Data loading Utilities no-toc
    8. Computing no-toc
  5. Glossary no-toc
  6. Examples toc
  7. API no-toc
  8. Development toc

@amueller
Copy link
Member

I think this is great!

Copy link
Member

@amueller amueller left a comment

Choose a reason for hiding this comment

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

Love this! Clearly an improvement!

@NicolasHug
Copy link
Member

I'm a bit surprised by some of these. e.g. the "computing" page and the "Vizualisation" page where the sections are lost now.

@jnothman
Copy link
Member

this is a nice improvement. I'm a little confused about the mixed use of numbered and unnumbered section titles.

@glemaitre
Copy link
Member

I rebuild the documentation to see the artifacts.

@NicolasHug Could you give the link to the files that have missing sections. I could not see them.

@NicolasHug
Copy link
Member

I don't exactly remember but I believe the TOC was missing on some pages like https://scikit-learn.org/stable/modules/computing.html (on the left)

@jnothman
Copy link
Member

@thomasjpfan do you have responses to the minor critiques by @NicolasHug and myself above?

@thomasjpfan
Copy link
Member Author

@jnothman Both issues are addressed now:

  1. The toc on the left is now numbered.
  2. User guide has been reorganized a little to show the TOC on the left.

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

This is nice! Let's give it a whirl.

I'm a little uncomfortable about broken links to old documentation pages, but it should not be terrible.

@rth
Copy link
Member

rth commented Jul 26, 2020

@thomasjpfan There is now a merge conflict due to recently merged PR.

@jnothman jnothman changed the title DOC Improves navigation of sidebar navigation for only the user guide DOC Improves sidebar navigation for user guide Aug 2, 2020
@jnothman jnothman merged commit cc7e6db into scikit-learn:master Aug 2, 2020
@jnothman
Copy link
Member

jnothman commented Aug 2, 2020

Thanks as always, @thomasjpfan!

jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants