8000 Tweak reference documents by javiereguiluz · Pull Request #20712 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Tweak reference documents #20712

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

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Conversation

javiereguiluz
Copy link
Member

As reported by @stof, there's a problem with some Configuration Reference documents.

Problem

h4 and h5 headings are styled the same on symfony.com

This makes hard to understand options like this: https://symfony.com/doc/current/reference/configuration/framework.html#not-compromised-password

enabled and endpoint are sub-keys of not_compromised_password while static_method is a sibling. Very confusing.

Solution

I don't want to make h5 even smaller or different in any way. I think that needing to use h5 reveals a complexity problem in your page.

So, let's fix this differently. And I think there could be a very simple solution.

Look at the page TOC:

imagen

The "useless" Configuration title adds a heading level in the entire page, pushing some elements to h5 level. If we remove it, all the sub-headings go up one level automatically. This will probably be enough.

Note that the perfect solution would be to remove Configuration heading and update ALL the other headings to use the same heading markers (---, ~~~, etc.) as the rest of Symfony Docs.

Doing this would be a merge conflict nightmare. Luckily, reStructuredText format doesn't care about the specific markers used. The first one it finds is h2, the second one is h3 and so on. So, I think it's fine to use different markers just on these reference pages.

what do you think?

@carsonbot carsonbot added this to the 6.4 milestone Mar 3, 2025
@xabbuh
Copy link
Member
xabbuh commented Mar 3, 2025

Don't we now have to replace ~~~~~ underlines with ----- underlines?

@javiereguiluz
Copy link
Member Author

@xabbuh no ... because reStructuredText allows many different markers for section titles and doesn't impose any specific order. The first marker found is considered h1, the second different marker found in the document is considered h2, etc. See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#sections

For consistency, we could update this ... but it's going to be a nightmare to merge into upper branches 😓

I built the docs locally to double check that our tooling supports this, and it looks like it does:

Copy link
Member
@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation Javier. Works for me then. 👍

@javiereguiluz javiereguiluz merged commit 3e2d36b into symfony:6.4 Mar 3, 2025
3 checks passed
@alexandre-daubois
Copy link
Member

The new TOC makes so much sense and makes this page way clearer. It was always hard to find elements on it. Thank you, this is a HUGE improvement!

javiereguiluz added a commit that referenced this pull request Mar 4, 2025
…iluz)

This PR was merged into the 7.2 branch.

Discussion
----------

[Reference] Sort debug options alphabetically

Sorting the options of Configuration Reference was always important ... but after #20712 this is even more important.

There are only two documents to sort: `debug` and `framework`. This PR updates the first one, which is trivial. But fixing `framework` will take a lot of effort (and would be a merge conflict nightmare). That's why I propose to do this only in 7.2 branch and up.

Commits
-------

569f548 [Reference] Sort debug options alphabetically
@javiereguiluz javiereguiluz deleted the tweak_reference branch March 4, 2025 10:14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0