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

Enforce consistent vertical spacing between paragraphs in endpoint definitions #1969

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Oct 12, 2024

Use p elements to separate paragraphs instead of br and enforce single paragraphs to be wrapped in p for consistency. Finally, remove the bottom margin of the last paragraph in a table cell.

Examples of previously affected areas:

  • GET /_matrix/client/versions:

    Unnecessary space above "Changed in"

    Before:

    Capture d’écran du 2024-10-12 18-12-49

    After:

    image

  • GET /_matrix/client/v3/rooms/{roomId}/messages's query parameters:

    Inconsistent space above "Changed in": when the description is made of a single paragraph, the "Changed in" looks like a second paragraph with a regular spacing, but in this case, when the description is made of several paragraphs, the spacing is twice as big.

    Before:

    Capture d’écran du 2024-10-12 18-19-01

    After:

    image

  • GET /_matrix/client/v3/rooms/{roomId}/messages's 200 response:

    "Required:" is not inline: when the description is made of a single paragraph, "Required:" looks like it is part of the paragraph, but in this case, when the description is made of several paragraphs, it is in its own paragraph.

    Before:

    Capture d’écran du 2024-10-12 18-24-47

    After:

    image

  • GET /_matrix/client/v3/rooms/{roomId}/messages's 200 response:

    Inconsistent spacing at the bottom of the table cells. When the description is made of a single paragraph, the padding looks the same at the bottom as at the top, but in this case, when the description is made of several paragraphs, the padding at the bottom is twice as big. This also affects cells with "Added in" or "Changed in" paragraphs.

    Before:

    Capture d’écran du 2024-10-12 18-30-30

    After:

    image

Pull Request Checklist

Preview: https://pr1969--matrix-spec-previews.netlify.app

…finitions

Use `p` elements to separate paragraphs instead of `br` and enforce single paragraphs to be wrapped in `p` for consistency.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh zecakeh requested a review from a team as a code owner October 12, 2024 16:10
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@richvdh
Copy link
Member

richvdh commented Oct 29, 2024

Thank you!

@richvdh richvdh enabled auto-merge (squash) October 29, 2024 15:21
@richvdh richvdh merged commit 1f5f2c4 into matrix-org:main Oct 29, 2024
12 checks passed
@zecakeh zecakeh deleted the api-paragraphs branch October 29, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants