Skip to content
New issue

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

Style AUTHORS, INPUT, OUTPUT, EXAMPLES, etc. #37614

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

kwankyu
Copy link
Collaborator

@kwankyu kwankyu commented Mar 15, 2024

To make them look better.

Sample pages:

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@kwankyu kwankyu changed the title transform Transform INPUT: OUTPUT: EXAMPLES: blocks Mar 15, 2024
@kwankyu kwankyu changed the title Transform INPUT: OUTPUT: EXAMPLES: blocks Stylize AUTHORS: INPUT: OUTPUT: EXAMPLES: Mar 15, 2024
@kwankyu kwankyu marked this pull request as ready for review March 15, 2024 16:31
@kwankyu kwankyu changed the title Stylize AUTHORS: INPUT: OUTPUT: EXAMPLES: Stylize AUTHORS, INPUT, OUTPUT, EXAMPLES sections Mar 16, 2024
@kwankyu kwankyu changed the title Stylize AUTHORS, INPUT, OUTPUT, EXAMPLES sections Style AUTHORS, INPUT, OUTPUT, EXAMPLES sections Mar 16, 2024
@kwankyu kwankyu force-pushed the p/style-blocks branch 2 times, most recently from 7efe570 to dba57f5 Compare March 16, 2024 01:24
@kwankyu kwankyu changed the title Style AUTHORS, INPUT, OUTPUT, EXAMPLES sections Style AUTHORS, INPUT, OUTPUT, EXAMPLES, etc. Mar 16, 2024
@kwankyu kwankyu force-pushed the p/style-blocks branch 2 times, most recently from 52e4c10 to 497d943 Compare March 16, 2024 13:14
@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 16, 2024

Why remove the colons?

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 16, 2024

The section titles are now in bold face, that I thought makes the colon dispensable.

Which do you like?

  1. INPUT: (original style)
  2. INPUT
  3. INPUT:
  4. INPUT

We may also style "EXAMPLES:" differently from "INPUT" and "OUTPUT". What do you think?

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 16, 2024

Or we may add when needed:

OUTPUT: a list of integers

OUTPUT

  • A list ot integers
  • A list of strings

This is choice (5).

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 18, 2024

I chose to go with (3) with colon. To balance, I reduced the boldness (the weight).

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 18, 2024

Experimenting with (5). Let's see.

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 23, 2024

Which do you like? Vote on your preference

  1. (original style)

INPUT:

  • A list ot integers
  • A list of strings
  1. (boldface without colon)

INPUT

  • A list ot integers
  • A list of strings
  1. (boldface with colon)

INPUT:

  • A list ot integers
  • A list of strings
  1. (italic)

INPUT

  • A list ot integers
  • A list of strings
  1. (italic with colon)

INPUT:

  • A list ot integers
  • A list of strings
  1. (boldface and colon only if there is a text in the same line with the section title)

OUTPUT: a list of integers

OUTPUT

  • A list ot integers
  • A list of strings

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 23, 2024

+1 for (6)

@roed314
Copy link
Contributor

roed314 commented Mar 23, 2024

In 6, doesn't Input always have following text?

@videlec
Copy link
Contributor

videlec commented Mar 23, 2024

If this has to be fixed in sage, I would rather stick to something standard and existent in the Python world, namely either

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 23, 2024

In 6, doesn't Input always have following text?

Sorry for being obscure. I modified the description.

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 23, 2024

If this has to be fixed in sage, I would rather stick to something standard and existent in the Python world, namely either

Note that this PR is about the cosmetic change in the rendered docstring by Sphinx. The format of the source docstring doesn't change. Your suggestion is about the source format. It should be a separate PR if you are interested in it. (There is already one if you look for it.) This PR is not about that. On the other hand, I like the current format, simple and clear :-)

@tscrim
Copy link
Collaborator

tscrim commented Mar 24, 2024

1

Best to just keep it simple.

@egourgoulhon
Copy link
Member

egourgoulhon commented Mar 24, 2024

1

... for the same reason as @tscrim + the sample pages in the PR description look bad to me: the colons are gone and the section titles do appear bold in my browser (Firefox).

@kwankyu kwankyu force-pushed the p/style-blocks branch 3 times, most recently from 0d47ec3 to af80da4 Compare March 31, 2024 01:49
Copy link

github-actions bot commented Mar 31, 2024

Documentation preview for this PR (built with commit 00cd01e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@kwankyu
Copy link
Collaborator Author

kwankyu commented Mar 31, 2024

Ready for review again.

The styling to AUTHORs section is the main thing of this PR.

The stylings to INPUT, OUTOUT, etc. was dropped respecting the voting result (1). However I keep the (non-running) code for possible change in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants