pandas icon indicating copy to clipboard operation
pandas copied to clipboard

DOC: Add light/dark theme switcher

Open datapythonista opened this issue 3 years ago • 13 comments

With the upgrade to the latest version of pydata-sphinx-theme (see #48285) our docs now are available in dark mode. By default, the Sphinx theme will use the version (light/dark) set up by the user. But would be nice to add a switcher to the navigation bar of the docs, so users can change the theme manually.

See for example in the top right corner of https://www.blosc.org/c-blosc2/c-blosc2.html the icon to change the sphinx theme. I think we should add the same to the pandas docs too.

datapythonista avatar Sep 17 '22 09:09 datapythonista

Hi, I am new to open source and would love to work on this issue. Can you assign this to me?

deepaksirohiwal avatar Sep 17 '22 12:09 deepaksirohiwal

Assigned. In the pandas repo, if you write /take in a comment of an issue or PR, it should get assigned to you. Thanks for working on this. If you need help setting up the environment... You can have a look at the developers documentation: https://pandas.pydata.org/docs/dev/development/index.html

datapythonista avatar Sep 17 '22 12:09 datapythonista

@datapythonista thank you for assigning me this issue.

deepaksirohiwal avatar Sep 17 '22 12:09 deepaksirohiwal

Hi @datapythonista, I wanted to know for which page exactly the dark theme is available because I am able to see the dark theme only on https://pandas.pydata.org/docs/dev/ and where exactly you want me to implement the switch (page and location)?

deepaksirohiwal avatar Sep 18 '22 19:09 deepaksirohiwal

We are using sphinx and the pydata sphinx theme to generate our docs. We don't need to implement it, we just need to set up the theme to show the light/dark switcher. You can check the theme, https://github.com/pydata/pydata-sphinx-theme and the contributing to the docs section in our documentation to understand better.

datapythonista avatar Sep 18 '22 19:09 datapythonista

@datapythonista Hi, I want to use /take command for other issue, but it seems to be not working. Does /take command need time to be assigned? Actually, I want to work on #48561 . Thanks.

WooilKim avatar Sep 19 '22 08:09 WooilKim

@datapythonista Hi, I want to use /take command for other issue, but it seems to be not working. Does /take command need time to be assigned? Actually, I want to work on #48561 . Thanks.

Ah, sorry, I think it may be take without the slash in pandas. Implemented in other projects too as /take, but when I implemented it in pandas having a heading slash was not usual yet

datapythonista avatar Sep 19 '22 09:09 datapythonista

@datapythonista Oh I think it works. I think it will be better to provide guide about the commands such as "take" for newbies like me.

WooilKim avatar Sep 19 '22 09:09 WooilKim

It's documented in the developers guide in our docs, not sure exactly where, but you should be able to find it.

datapythonista avatar Sep 19 '22 10:09 datapythonista

Hi, can I too work on this issue?

EricKart avatar Sep 19 '22 11:09 EricKart

Hi, can I too work on this issue?

Sure, go ahead. Thank you!

datapythonista avatar Sep 19 '22 11:09 datapythonista

Hi @datapythonista , is there any other way to generate the web page as it is showing me requests.exceptions.HTTPError: 403 Client Error: rate limit exceeded for url: https://api.github.com/users/ this error. Do I need to regenerate the web page every time I make any changes?

deepaksirohiwal avatar Sep 19 '22 19:09 deepaksirohiwal

You can use --ignore-io-errors to avoid that error.

datapythonista avatar Sep 19 '22 19:09 datapythonista

Hi @datapythonista, I have added a switcher to the doc file and I wanted to know how to write it in the documentation. Should I send a pull request first? image image

deepaksirohiwal avatar Sep 21 '22 21:09 deepaksirohiwal

Yes, if you have the changes locally, and want to get your changes into our official docs, the only way is opening a pull request

datapythonista avatar Sep 22 '22 00:09 datapythonista