Skip to content

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Nov 11, 2024

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Nov 11, 2024
Copy link
Contributor

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really great, thank you!

@erlend-aasland
Copy link
Contributor Author

Looks really great, thank you!

Thanks, Andrew, but I'm not sure we should do this; even though it looks pretty neat on desktop, the result is unfortunately not very pretty on mobile. I tried separating out the .. versionadded directives and using footnotes for the exception references, but I'm not sure if those changes makes for a better reference page.

@erlend-aasland
Copy link
Contributor Author

We briefly discussed this on the Python Docs Discord:

  • ✅ the compact layout is nice
  • ✅ it's ok to group version-added directives
  • ❌ putting important info into footnotes does not make for a better reference

@erlend-aasland
Copy link
Contributor Author

BTW, the reason for removing .. availability in fd204d5, is because the errno table description already covers this:

[...] symbols that are not used on the current platform are not defined by the module.

@erlend-aasland erlend-aasland marked this pull request as ready for review December 3, 2024 20:47
@erlend-aasland erlend-aasland added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Dec 3, 2024
@erlend-aasland
Copy link
Contributor Author

putting important info into footnotes does not make for a better reference

I'm not sure how important the footnotes are in this case. Looking at this PR again three weeks later, I now think this is a net win. The preview looks nice.

@erlend-aasland erlend-aasland requested a review from hugovk January 4, 2025 18:13
@hugovk
Copy link
Member

hugovk commented Jan 7, 2025

The first column is quite wide on mobile:

image

Is it possible to omit the errno. bit and just show EPERM, ENOENT, etc?

@erlend-aasland
Copy link
Contributor Author

Is it possible to omit the errno. bit and just show EPERM, ENOENT, etc?

I'm not sure. Perhaps @AA-Turner (or another Sphinx wizard) knows? These are generated from .. data:: EPERM (and similar) directives:

.. list-table::
   :header-rows: 1

   * - Name
     - Description

   * - .. data:: EPERM
     - Operation not permitted

Comment on lines +28 to +29
.. list-table::
:header-rows: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See :widths:

This is relative column widths, so 1 1 would have the same effect. If you want the LHS column to be narrower then tweak the values

Suggested change
.. list-table::
:header-rows: 1
.. list-table::
:header-rows: 1
:widths: 50 50

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it seems the problem is actually that the names in the middle and end of the table are quite long and don't wrap -- e.g. scroll to errno.EPROTONOSUPPORT / ESOCKTNOSUPPORT / ENOTRECOVERABLE. Setting widths doesn't seem to help...

@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip issue skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants