Skip to content

Opinions: Looks of the pytest docs? #6402

Description

@nicoddemus

Since awhile now I feel that the documentation could use a face lift.

It seems to me it is not a single thing, it might be a bunch of small things/tweeks from some one who knows about design.

I've built the docs with the RTD theme (which I like) to try to give examples of what I'm trying to convey:

image

This is not bad, of course, but I have the feeling that the RTD theme is better:

image (1)

Here is some things that I think are better in the second screenshot:

  1. The overall font and styles seem better to read somehow (I can't point my finger at what exactly makes it better).
  2. The function signature looks more like a header, as it should be I think.
  3. The keywords (re.search, re.escape) have a nice highlight; in the first screenshot they are easy to miss in the middle of the text.
  4. Nice use of colors to bring attention to some parts of the text (like the [source] link), without overusing colors.

Another example:

image (2)
image (3)

The first screenshot looks outdated, while the second one looks more modern to me somehow.

Of course those are all impressions of someone with zero talent for design, so take that as it is.

I'm not proposing here we should go and adopt the RTD theme, but I was wondering if anybody feels the same way? Perhaps someone with an eye on design (or even a professional) can critically look at our styles and provide suggestions of good improvements?

Activity

  1. added
    type: questiongeneral question, might be closed after 2 weeks of inactivity
    type: docsdocumentation improvement, missing or needing clarification
    on Jan 4, 2020
  2. The-Compiler commented on Jan 4, 2020

    @The-Compiler
    Member

    Perhaps someone with an eye on design (or even a professional) can critically look at our styles and provide suggestions of good improvements?

    I'd like to post this at https://opensourcedesign.net/jobs/

    Given that we have some $16k in our OpenCollective account, what about posting a paid offer for a redesign (and not just a review) there?

  3. JPTIZ commented on Jan 4, 2020

    @JPTIZ

    As a user (in the library's point of view), I agree: the first one looks like a bunch of text thrown everywhere, while the second has styles that enhances where sections begin, what things are important, and even the source link that I haven't noticed at first in the first screenshot but did almost instantly in the second one. It could be more friendly for newcomers too.

  4. nicoddemus commented on Jan 4, 2020

    @nicoddemus
    MemberAuthor

    Given that we have some $16k in our OpenCollective account, what about posting a paid offer for a redesign (and not just a review) there?

    Definitely, I was going for that if a number of people would agree with the idea of a redesign. 👍

  5. jugmac00 commented on Jan 5, 2020

    @jugmac00
    Contributor

    Many projects just use the RTD theme - and I think that's a great idea.

  6. AWhetter commented on Jan 5, 2020

    @AWhetter
    Contributor

    I agree with the sentiments of @JPTIZ. I've always found the current design difficult to read and I much prefer the RTD theme for readability. However I've never really been a fan of the RTD theme either. I think it's been looking a little dated for a while, and more importantly I don't think it's a clean looking as it could be.
    I would love to see the Python community come up with something better, so a complete redesign would be a welcome change in my book.

  7. nicoddemus commented on Jan 13, 2020

    @nicoddemus
    MemberAuthor

    OK so it seems the majority is in favor of a change.

    @The-Compiler since you mention you would like to post this over opensourcedesign.net, could you go ahead and do that? Thanks.

    Not sure how much is the rate for this job though, but we will use our Open Collective account then.

  8. The-Compiler commented on Jan 13, 2020

    @The-Compiler
    Member

    I started writing something:

    The pytest framework (for Python) makes it easy to write small automated tests, yet scales to support complex functional testing for applications and libraries.

    We recently identified some issues with the design of our documentation/website. We'd like someone to take a closer look at what seems problematic with the current design and [...]

    Then I looked at the repository and saw that we're using a six year old snapshot (with some finetuning) of the design Flask uses.

    It seems to live here nowadays: https://github.com/pallets/pallets-sphinx-themes

    Maybe we should first update our theme to the latest Flask/Pallets one, and then coordinate with them so (if they want to), they can benefit from the same improvements?

  9. nicoddemus commented on Jan 13, 2020

    @nicoddemus
    MemberAuthor

    Maybe we should first update our theme to the latest Flask/Pallets one, and then coordinate with them so (if they want to), they can benefit from the same improvements?

    Sure. Could you try to update the theme then? Perhaps it might be better already

  10. The-Compiler commented on Jan 13, 2020

    @The-Compiler
    Member

    No time at the moment to take this on, I'm afraid - lots of stuff on my plate currently 😉

  11. nicoddemus commented on Jan 14, 2020

    @nicoddemus
    MemberAuthor

    I changed it just to take a look how it looks:

    #6453

    https://docs.pytest.org/en/use-standard-flask-theme/

  12. blueyed commented on Jan 14, 2020

    @blueyed
    Contributor

    Why not try the "sphinx_rtd_theme" instead? (#6402 (comment))
    pytest-django also uses it, which looks nice: https://pytest-django.readthedocs.io/en/latest/
    (via pytest-dev/pytest-django@265a45f)

  13. AWhetter commented on Jan 14, 2020

    @AWhetter
    Contributor

    I don't like the pallets design as much as the current one. The font is less easy to read and there's a mix between serif and sans-serif fonts that doesn't look right to me. Sections and objects in the API reference are a bit more clearly defined and are easy to spot when scrolling through the page. The colour palette of code blocks is weird but they stand out and do the job. I much prefer the original code blocks.

  14. 7 remaining items

  15. nicoddemus commented on Jan 17, 2020

    @nicoddemus
    Author
  16. bluetech commented on Jan 17, 2020

    @bluetech
  17. nicoddemus commented on Jan 17, 2020

    @nicoddemus
    Author
  18. nicoddemus commented on Jan 20, 2020

    @nicoddemus
    Author
  19. nicoddemus commented on Jan 21, 2020

    @nicoddemus
    MemberAuthor

    stanford is out of the picture because it seems it is not maintained anymore (#6459).

    I will gladly accept suggestions of other themes btw.

  20. blueyed commented on Jan 26, 2020

    @blueyed
    Contributor

    Should we have a vote then? I will add comments that can be voted up/down below.

  21. blueyed commented on Jan 26, 2020

    @blueyed
    Contributor

    Please vote this comment up if you like the updated flask theme, and down if you are strongly opposed to it.
    Preview: https://docs.pytest.org/en/use-standard-flask-theme (PR #6453).

  22. blueyed commented on Jan 26, 2020

    @blueyed
    Contributor

    Please vote this comment up if you like the Sphinx ReadTheDocs theme, and down if you are strongly opposed to it.
    Preview: https://docs.pytest.org/en/use-rtd-theme (PR #6460).

  23. The-Compiler commented on Jan 27, 2020

    @The-Compiler
    Member

    I do like the RTD theme, but its sidebar seems quite messy compared to our current one - is this something we could port over to the RTD theme as well?

  24. nicoddemus commented on Jan 28, 2020

    @nicoddemus
    MemberAuthor

    I do like the RTD theme, but its sidebar seems quite messy compared to our current one - is this something we could port over to the RTD theme as well?

    https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html#how-the-table-of-contents-displays

    Not sure how to configure it properly though... 🤔

  25. blueyed commented on Feb 2, 2020

    @blueyed
    Contributor

    Let's move the RTD theme config related discussion to the theme's PR: #6460 (comment)

  26. nicoddemus commented on Jun 1, 2020

    @nicoddemus
    MemberAuthor

    So in the end we decided to ditch the customizations we had on the Flask theme and update it to the last official version (#6453).

    Thanks everyone!

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

    type: docsdocumentation improvement, missing or needing clarificationtype: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions