Skip to content

Slightly weird installation buttons maybe due to pydata-sphinx-theme 1.5.3? #29152

Closed

Description

@lesteve

Describe the issue linked to the documentation

I recently browsed the dev website curious to see if I could spot differences after #29134 was merged.

Maybe it's just me, but I found that the install boxes where you select pip vs conda and potentially your OS is a bit confusing, the nesting of the two boxes looks visually complicated.
https://scikit-learn.org/dev/install.html#installing-the-latest-release
image

Compare this to the stable website which I find a bit clearer maybe:
https://scikit-learn.org/stable/install.html#installing-the-latest-release
image

Maybe @Charlie-XIAO you have some suggestions on how to improve it with some CSS magic?

Suggest a potential alternative/fix

The PyTorch similar info for example seems a lot clearer to me than ours (both stable and dev website) https://pytorch.org/get-started/locally/#start-locally:
image

The scikit-learn 1.4 seemed clearer as well:
https://scikit-learn.org/1.4/install.html#installing-the-latest-release
image

Activity

  1. added
    Low Priority
    Needs Triage
    and removed
    Needs Triage
    on May 31, 2024
  2. betatim commented on May 31, 2024

    @betatim
    Member

    This is what it looks like on the light theme for me. Which I think is fine and better than your dark mode screenshot (which I think is indeed confusing).

    Screenshot 2024-05-31 at 16 57 00

    The Pytorch one might be good, if we can figure out what to do about the fact that for conda there is no second level.

  3. glemaitre commented on May 31, 2024

    @glemaitre
    Member

    I was surprised seeing @lesteve comment because I found it much better when I checked before to merge:

    image

    But apparently, "on my computer" I have this extra vertical light blue line that @lesteve does not have. I don't really understand why do we have different rendering :)

  4. Charlie-XIAO commented on Jun 1, 2024

    @Charlie-XIAO
    Contributor

    They were due to pydata/pydata-sphinx-theme#1555, which are considered improvements regarding accessibility.

    • pytorch version: I know how to achieve this but then we need to write JS and raw HTML instead of relying on sphinx-design and simply write reStructuredText.

    • 0.15.2 version: Should be easy - I just need to revert the new styling by pydata-sphinx-theme.

    Another option is to make some customization based on 0.15.3, then I would need to understand more clearly why people find the new version weird. Would it be sufficient if I make non-active tabs have distinguishable backgrounds as they do in the light theme?

  5. lesteve commented on Jun 1, 2024

    @lesteve
    MemberAuthor

    I put a "Low Priority" label, so no need to rush 😉. Maybe it is just me as well that is bothered by this, in which case this may be good enough and we can focus on more important things.

    Thinking about it, what I find confusing is the implementation as a nested table. I don't think of it as a nested table but as independent buttons I can click with at the end the command I can copy and paste to install scikit-learn.

    Also I think having the OS first and then afterwards pip / conda makes more sense to me. There is the main question (OS) and then the more subtle variation (conda vs pip). I am guessing, the order was reversed compared to 1.4.2 in part because I because this is implemented as a nested table (but maybe I am wrong) and also because for conda this is the same thing for all the OSes.

    In the light theme, the shade of light blue vs white helps a bit but still I don't find it great. Same thing for the additional horizontal line in @glemaitre's screenshot.

    I get the argument about pure rst which is more maintainable than js + HTML. Maybe one compromise would be some CSS magic to make tabs to appear more like individual buttons and remove the lines around the table. Sorry I know only how to do the latter so here is a screenshot if that helps:
    image

    Then there is the question whether rst + CSS magic is more maintainable than js + HTML, maybe not ... and I still prefer OS before conda/pip ...

  6. Charlie-XIAO commented on Jun 1, 2024

    @Charlie-XIAO
    Contributor

    Also I think having the OS first and then afterwards pip / conda makes more sense to me. There is the main question (OS) and then the more subtle variation (conda vs pip). I am guessing, the order was reversed compared to 1.4.2 in part because I because this is implemented as a nested table (but maybe I am wrong) and also because for conda this is the same thing for all the OSes.

    Yes it's nested tabs. I agree to put OSes at the first level. This would mean repeating the conda thing three times but I don't think it's big deal.

    I get the argument about pure rst which is more maintainable than js + HTML. Maybe one compromise would be some CSS magic to make tabs to appear more like individual buttons and remove the lines around the table. Sorry I know only how to do the latter so here is a screenshot if that helps:

    Should be doable without too much CSS, only at the risk of being broken when we update pydata theme again (but that's not big deal either). TBH I don't like this accessibility improvement either (and the one for the tables, especially in dark theme). But well for a web theme they have different considerations.

    Then there is the question whether rst + CSS magic is more maintainable than js + HTML, maybe not ... and I still prefer OS before conda/pip ...

    AFAIC RST + CSS is definitely more maintainable, at least for this case.

  7. Charlie-XIAO commented on Jun 2, 2024

    @Charlie-XIAO
    Contributor

    #29160, something like this:

    Light Dark
    image image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationLow Priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions