10000 Enum HOWTO doesn't render well on mobile · Issue #111895 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Enum HOWTO doesn't render well on mobile #111895

New issue

Have a question about this project? Sign up for a free GitHub acc 8000 ount 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

Closed
fipachu opened this issue Nov 9, 2023 · 6 comments
Closed

Enum HOWTO doesn't render well on mobile #111895

fipachu opened this issue Nov 9, 2023 · 6 comments
Labels
docs Documentation in the Doc dir

Comments

@fipachu
Copy link
Contributor
fipachu commented Nov 9, 2023

Specifically the purple sidebar on in section Functional API.

  • The bar itself is hard to read.
  • Text is way wider than the rest of the site.
  • Text renders in a different font size.

In Chrome devtools device mode the font size seems consistent, but the other problems still appear.

Tested in Safari on iPhone 12 mini, with docs for Python 3.12 and 3.13.

Screenshot

zoomed_out

Linked PRs

@fipachu fipachu added the docs Documentation in the Doc dir label Nov 9, 2023
@hugovk
Copy link
Member
hugovk commented Nov 9, 2023

It's reproducible on Chrome 119/Android 13/Samsung S22:

Mobile screenshot

image

It doesn't look great on desktop either (Chrome 119/macOS Ventura 13.6):

Desktop screenshot

image

Here's the source, it's a "definition list":

cpython/Doc/howto/enum.rst

Lines 610 to 635 in 6f09f69

:value: What the new enum class will record as its name.
:names: The enum members. This can be a whitespace- or comma-separated string
(values will start at 1 unless otherwise specified)::
'RED GREEN BLUE' | 'RED,GREEN,BLUE' | 'RED, GREEN, BLUE'
or an iterator of names::
['RED', 'GREEN', 'BLUE']
or an iterator of (name, value) pairs::
[('CYAN', 4), ('MAGENTA', 5), ('YELLOW', 6)]
or a mapping::
{'CHARTREUSE': 7, 'SEA_GREEN': 11, 'ROSEMARY': 42}
:module: name of module where new enum class can be found.
:qualname: where in module new enum class can be found.
:type: type to mix in to new enum class.
:start: number to start counting at if only names are passed in.

Any suggestions on what to replace it with?

Perhaps a simple bulleted list?

Mobile screenshot

image

Desktop screenshot

image

@hugovk
Copy link
Member
hugovk commented Nov 9, 2023

Please see PR #111898.

@fipachu
Copy link
Contributor Author
fipachu commented Nov 9, 2023

Thank you for picking it up @hugovk! And thanks for exposing me to:

this

and this:

==========
Enum HOWTO
==========

I have no idea what to use instead of definition list though. I'm not familiar with Sphinx nor Python documentation guidelines.

@hugovk
Copy link
Member
hugovk commented Nov 9, 2023

Let's go with #111898 then, thank you for reporting this!

hugovk added a commit that referenced this issue Nov 9, 2023
…mobile (#111898)

Convert definition list to bullet list for readability on mobile
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 9, 2023
…ty on mobile (pythonGH-111898)

Convert definition list to bullet list for readability on mobile
(cherry picked from commit 7d21e3d)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 9, 2023
…ty on mobile (pythonGH-111898)

Convert definition list to bullet list for readability on mobile
(cherry picked from commit 7d21e3d)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this issue Nov 9, 2023
…ity on mobile (GH-111898) (#111908)

gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898)

Convert definition list to bullet list for readability on mobile
(cherry picked from commit 7d21e3d)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
hugovk added a commit that referenced this issue Nov 9, 2023
…ity on mobile (GH-111898) (#111909)

gh-111895: Convert definition list to bullet list for readability on mobile (GH-111898)

Convert definition list to bullet list for readability on mobile
(cherry picked from commit 7d21e3d)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@hugovk hugovk closed this as completed Nov 9, 2023
@serhiy-storchaka
Copy link
Member

Can we change the style of definition lists?

@hugovk
9740
Copy link
Member
hugovk commented Nov 9, 2023

Possibly in https://github.com/python/python-docs-theme or Sphinx?

In this case, I think part of the problem was the code block taking up a lot of extra (fixed) width, squashing the left part into a tiny space.

So I think the styling might be fine for normal definition lists? Let's revisit if we find a problem with "normal" ones.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…ty on mobile (python#111898)

Convert definition list to bullet list for readability on mobile
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…ty on mobile (python#111898)

Convert definition list to bullet list for readability on mobile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

3 participants
0