Skip to content

Switch to sphinx-inline-tabs for tabs - #9008

Merged
pradyunsg merged 1 commit into
pypa:masterfrom
pradyunsg:better-tabs
Oct 19, 2020
Merged

Switch to sphinx-inline-tabs for tabs#9008
pradyunsg merged 1 commit into
pypa:masterfrom
pradyunsg:better-tabs

Conversation

@pradyunsg

Copy link
Copy Markdown
Member

Follow up to #8589, to give us significantly better looking tabs.

@pradyunsg pradyunsg added type: docs Documentation related skip news Does not need a NEWS file entry (eg: trivial changes) labels Oct 18, 2020
@pradyunsg

Copy link
Copy Markdown
Member Author

/cc @pfmoore @shireenrao :)

@pradyunsg

Copy link
Copy Markdown
Member Author

https://sphinx-inline-tabs.readthedocs.io/en/latest/index.html -- in case you're looking for the docs.

@shireenrao

Copy link
Copy Markdown
Contributor

These look great!!

@pfmoore

pfmoore commented Oct 18, 2020

Copy link
Copy Markdown
Member

The preview at https://pip--9008.org.readthedocs.build/en/9008/installing/ seems to be broken...

@shireenrao

Copy link
Copy Markdown
Contributor

Sorry I was commenting on the examples on the readthedocs page..

@pradyunsg pradyunsg closed this Oct 18, 2020
@pradyunsg pradyunsg reopened this Oct 18, 2020
@pradyunsg

Copy link
Copy Markdown
Member Author

Screenshot 2020-10-19 at 4 51 29 AM

Interesting. It works locally, but not on the RTD page -- but only on the installation thingie.

@pradyunsg

Copy link
Copy Markdown
Member Author

python /home/docs/checkouts/readthedocs.org/user_builds/pip/envs/9008/bin/sphinx-build -T -E -b readthedocsdirhtml -d _build/doctrees -D language=en . _build/html

Of course readthedocs uses it's own custom HTML builder called readthedocsdirhtml. >.<

@pfmoore

pfmoore commented Oct 19, 2020

Copy link
Copy Markdown
Member

So does that imply we need to request some change from RTD before this could be merged?

@pradyunsg

Copy link
Copy Markdown
Member Author

So does that imply we need to request some change from RTD before this could be merged?

Nah -- pradyunsg/sphinx-inline-tabs@ace2f95 is sufficient. I'll wait for a few minutes before a close-reopen here.

@pradyunsg pradyunsg closed this Oct 19, 2020
@pradyunsg pradyunsg reopened this Oct 19, 2020
@pradyunsg

Copy link
Copy Markdown
Member Author

Screenshot 2020-10-19 at 6 58 31 PM

Cool yea, that worked.

@pfmoore

pfmoore commented Oct 19, 2020

Copy link
Copy Markdown
Member

(Offtopic) Just while I think, would this also be something to consider if we wanted to start using MyST?

@pradyunsg

Copy link
Copy Markdown
Member Author

Just while I think, would this also be something to consider if we wanted to start using MyST?

As in?

It'll work the same way -- see https://github.com/pradyunsg/sphinx-inline-tabs/blame/main/docs/usage.md for how the MyST vs reST syntax is different. They both work the same way, and invoke the exact same code and whatnot.

@pfmoore

pfmoore commented Oct 19, 2020

Copy link
Copy Markdown
Member

Sorry, drive by comments while I'm doing something else. As in, does the MyST parser need to have explicit support for the RTD builders, and if so we should check that it does.

@pradyunsg

Copy link
Copy Markdown
Member Author

As in, does the MyST parser need to have explicit support for the RTD builders, and if so we should check that it does.

Ah, no. They're affecting separate components.

The "builder" is the bit that decides where to put the generated HTML files. Those HTML files are provided by rendering the "theme" using the "parsed content". MyST generates the parsed content, and hence is a drop-in replacement, without needing support in any other part of the pipeline.

FWIW, the documentation I've linked to is MyST based and is on RTD without issues. :)

@pradyunsg

pradyunsg commented Oct 19, 2020

Copy link
Copy Markdown
Member Author

I'mma click merge on this now -- since no one has raised concerns against doing this, and I genuinely think this looks much better. :)

Also, the longer this stays open, the greater the chances of conflicts and I dealt w/ enough of those for 20.2.4. Reverts are cheap too.

@pradyunsg
pradyunsg merged commit 08c99b6 into pypa:master Oct 19, 2020
@pradyunsg
pradyunsg deleted the better-tabs branch October 19, 2020 14:10
@shireenrao

Copy link
Copy Markdown
Contributor

The pip docs look really good!

@pradyunsg

Copy link
Copy Markdown
Member Author

@shireenrao IDK if you've seen #9012 -- you might be interested in that. ;)

@shireenrao

Copy link
Copy Markdown
Contributor

Woah!! Thats super clean! Kudos on making such a sleek looking theme!

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

skip news Does not need a NEWS file entry (eg: trivial changes) type: docs Documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants