Skip to content

DOC Link directly developer docs in the navbar #22550

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 9 commits into from
Mar 29, 2022

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #22541

Any other comments?

If merged, I think this should be cherry-picked into 1.0.X.

@thomasjpfan thomasjpfan changed the title DOC Point to developer docs by default in the navbar DOC Link directly developer docs in the navbar Feb 19, 2022
@thomasjpfan thomasjpfan marked this pull request as draft February 19, 2022 21:45
@thomasjpfan
Copy link
Member Author

thomasjpfan commented Feb 19, 2022

There is a downside to this PR. If we are updating the contributing docs in a PR, then the navbar built by the CI would not link to changes in the PR. (It would always link to https://scikit-learn.org/dev/developers/index.html)

@cmarmo
Copy link
Contributor

cmarmo commented Feb 19, 2022

There is a downside to this PR. If we are updating the contributing docs in a PR, then the navbar built by the CI would not link to changes in the PR. (It would always link to https://scikit-learn.org/dev/developers/index.html)

The website is updated daily, right?

EDIT: sorry I realize now what you mean. But the new rendering for the modified page will be build anyway, right?

@thomasjpfan thomasjpfan marked this pull request as ready for review February 19, 2022 22:26
@thomasjpfan
Copy link
Member Author

thomasjpfan commented Feb 19, 2022

But the new rendering for the modified page will be build anyway, right?

Yup, everything is still built.

I updated the PR with a workaround:

  1. The navbar links to the newly built development page for dev releases, which applies to PRs or main.
  2. On release builds, such as on 1.0.X, the link changes to https://scikit-learn.org/dev/developers/index.html

Copy link
Contributor

@cmarmo cmarmo left a comment

Choose a reason for hiding this comment

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

Thanks @thomasjpfan !

@cmarmo cmarmo added the Quick Review For PRs that are quick to review label Feb 22, 2022
@cmarmo
Copy link
Contributor

cmarmo commented Feb 28, 2022

@thomasjpfan I just realized that there is another link to the contributing guide in the homepage

<li><strong>About us:</strong> See <a href="about.html#people">authors</a> and <a href="developers/contributing.html">contributing</a></li>

Do you think it is possible to redirect this one too?
Thanks!

@glemaitre
Copy link
Member

On release builds, such as on 1.0.X, the link changes to https://scikit-learn.org/dev/developers/index.html

Are we fine with showing the following warning?

image

@thomasjpfan
Copy link
Member Author

Are we fine with showing the following warning?

If we are linking out of https://scikit-learn.org/stable into https://scikit-learn.org/dev then we need to still show it.

The UX issue when one navigates to the Development which links out to "dev" but then wants to look at the current API docs. The only way to do it is to go back, since the navbar is the dev page.

I'm not completely happy with this solution and it's a compromise.

Here are more alternative:

  1. A banner on the top of the stable "Contributing" and "Development" pages that says "For the latest development workflow see the [link to dev page]"
  2. Have "Development" open a new tab so one only needs to close the tab to get back to the stable page.

Copy link
Member

@lesteve lesteve left a comment

Choose a reason for hiding this comment

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

I'm not completely happy with this solution and it's a compromise.

I think it is good enough.

@thomasjpfan
Copy link
Member Author

thomasjpfan commented Mar 18, 2022

I updated the PR to open a new page when clicking on `Contributing" or "Development". I think this is common practice since we are linking off from the stable website to the dev website.

Note: On dev builds or PRs, we still link to the actual page. The linking off to the dev website only happens on stable builds.

@jeremiedbb
Copy link
Member

@thomasjpfan, from the artifacts the link opens a new page. Is it expected ?

@thomasjpfan
Copy link
Member Author

from the artifacts the link opens a new page. Is it expected ?

It's a bug. It should not open a new page. PR updated with 86fde2d (#22550) with a fix.

@jeremiedbb
Copy link
Member

jeremiedbb commented Mar 29, 2022

Hum actually I don't think it can be tested from the artifacts since they build the dev version. At least it allows to check that the links on the dev version doesn't open a new page.

Edit: I misread my own comment. Ignore this :)

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

I guess we need to backport in 1.0.X to have it immediately available on the stable doc

@jeremiedbb jeremiedbb merged commit fab022e into scikit-learn:main Mar 29, 2022
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Mar 29, 2022
lesteve pushed a commit that referenced this pull request Mar 30, 2022
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 6, 2022
Charlie-XIAO added a commit to Charlie-XIAO/scikit-learn that referenced this pull request Jan 6, 2024
…ty regarding the toctree, subject to change if maintainers suggest better approaches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Quick Review For PRs that are quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link to the latest Developer's guide rather than to stable.
5 participants