Skip to content

Conversation

aneta-petrova
Copy link
Member

@aneta-petrova aneta-petrova commented Sep 30, 2025

What changes are you introducing?

Adding a CSS style definition for paragraphs annotated with [role=_abstract].

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

In order to address the requirements for Red Hat's downstream DITA pre-migration checks (https://github.com/jhradilek/asciidoctor-dita-vale/), we are now required to add abstract metadata to introductory paragraphs (http://github.com/theforeman/foreman-documentation/pull/4221). I thought it might be nice to use this metadata to visually separate abstract paragraphs on the Foreman side.

Screenshot From 2025-09-30 20-13-19

EDIT: The comments below show several other alternatives that are being discussed.

IMO this sort of visual separation improves readability (users will immediately know which part of a module is an abstract and where the actual fun begins). But also, seeing the abstract highlighted like this in preview might help us all write abstract as summaries (authors and reviewers will immediately see that an abstract is something else than the rest of the introduction).

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

For transparency: The CSS definition was generated by Gemini and I only made minor tweaks to it. (The prompt I used was to make the abstracts look similar to standard AsciiDoc [INFO] blocks.) Feel free to suggest different CSS attributes if you'd prefer something else.

EDIT: And what is actually an "abstract"? It's a single paragraph that explains the purpose or theme of the module. It serves as a confirmation that users are in the right place. https://github.com/jhradilek/asciidoctor-dita-vale/ will eventually include some additional rules for abstracts, such as that the required number of characters or allowed syntax.

Contributor checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.16/Katello 4.18 (Satellite 6.18)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4)
  • Foreman 3.13/Katello 4.15 (EL9 only)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
  • Foreman 3.11/Katello 4.13 (orcharhino 6.11 on EL8 only; orcharhino 7.0 on EL8+EL9; orcharhino 7.1 with Leapp)
  • Foreman 3.10/Katello 4.12
  • Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9/6.10)
  • We do not accept PRs for Foreman older than 3.9.

@github-actions github-actions bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective labels Sep 30, 2025
@aneta-petrova aneta-petrova removed the Needs tech review Requires a review from the technical perspective label Sep 30, 2025
@aneta-petrova aneta-petrova marked this pull request as ready for review September 30, 2025 18:26
Copy link

github-actions bot commented Oct 1, 2025

The PR preview for 0e6f2dd is available at theforeman-foreman-documentation-preview-pr-4315.surge.sh

The following output files are affected by this PR:

show diff

show diff as HTML

@aneta-petrova
Copy link
Member Author

Right now, the abstracts are shown only in these guides (all flavors):

https://theforeman-foreman-documentation-preview-pr-4315.surge.sh/nightly/Managing_Configurations_Puppet/index-katello.html
https://theforeman-foreman-documentation-preview-pr-4315.surge.sh/nightly/Configuring_User_Authentication/index-katello.html
https://theforeman-foreman-documentation-preview-pr-4315.surge.sh/nightly/Configuring_Load_Balancer/index-katello.html

Because that's where the [role="_abstract"] attribute has been added. There is a plan to add it to all our introductions in all guides, through future PRs like #4314.

@Lennonka
Copy link
Contributor

Lennonka commented Oct 1, 2025

That's a nice thought! However, I think that the suggested style is a bit too much.

  • Do we want to draw readers' attention to the abstract or to the "actual fun part"?
    If it's the latter, then we should perhaps decrease the significance of abstracts instead of increasing it visually.
  • Increased padding in comparison to normal paragraphs looks bad typographically.

Let me know what you think. I'm trying to figure out an alternative style, but let's think it through first.

@aneta-petrova
Copy link
Member Author

* Do we want to draw readers' attention to the abstract or to the "actual fun part"?
  If it's the latter, then we should perhaps decrease the significance of abstracts instead of increasing it visually.

Good point!

* Increased padding in comparison to normal paragraphs looks bad typographically.

True.

Let me know what you think. I'm trying to figure out an alternative style, but let's think it through first.

Thanks for the review! I'm open to suggestions on alternative styles, this one was just a very quickly draft for an early proof-of-concept preview.

@aneta-petrova
Copy link
Member Author

I removed the extra space below the abstract paragraph because that was indeed jarring.

First suggestion with light grey background (current preview):

Screenshot From 2025-10-01 17-03-42

Second suggestion without the background:

Screenshot From 2025-10-01 17-03-14

I actually prefer the first one with the background because I think the clearer visual separation actually helps users focus on the "fun" part of the module content. At the risk of overthinking this, just like the well-known Ebbinghaus illusion shows that human perception tends to focus on a smaller object, when looking at the preview, my brain at least tends to focus on the non-highlighted ("smaller") part of a give section.

@Lennonka
Copy link
Contributor

Lennonka commented Oct 1, 2025

I actually prefer the first one with the background because I think the clearer visual separation actually helps users focus on the "fun" part of the module content. At the risk of overthinking this, just like the well-known Ebbinghaus illusion shows that human perception tends to focus on a smaller object, when looking at the preview, my brain at least tends to focus on the non-highlighted ("smaller") part of a give section.

My brain focuses on the bar on the left of the abstract paragraph...

The left border is too much. Makes it look like an admonition.

@aneta-petrova
Copy link
Member Author

This is without the border, just background:

Screenshot From 2025-10-01 17-30-49

IMO too similar to a code block, not enough visual separation. That separation is needed because the point of an abstract is to be separated from the main text; you should be clear on where one ends and the other begins.

For completeness, the other alternatives I tried were no background + borders on the left and right sides (that looked uneven because there was always more space on the right than on the left), no background + border on the bottom side (that was too distracting), and no background + borders all around (too much).

My preference is still for the current version in the preview: border on one side, light background, not too much padding around.

@Lennonka Lennonka mentioned this pull request Oct 1, 2025
10 tasks
@aneta-petrova
Copy link
Member Author

aneta-petrova commented Oct 1, 2025

I looked for existing examples elsewhere and found something I liked on GH docs: https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github?platform=linux This uses larger font and a visually distinct color.

I'm not sure about the larger font for our use case but I liked the more visually distinct color:

Screenshot From 2025-10-01 17-44-33

For me, this meets the requirement for clear separation but there is no border. Would that work @Lennonka?

@aneta-petrova
Copy link
Member Author

aneta-petrova commented Oct 1, 2025

About #4318: I tried a border on the bottom myself at one point (#4315 (comment)). To me, that's something that basically splits the section into two and personally I'm not a fan.

EDIT: For completeness, I'm adding a screenshot too:

Screenshot From 2025-10-01 17-54-55

@Lennonka
Copy link
Contributor

Lennonka commented Oct 1, 2025

I'm not sure about the larger font for our use case but I liked the more visually distinct color

Not bad. Is it the same color as headings?

@aneta-petrova
Copy link
Member Author

Not bad. Is it the same color as headings?

Not the main section headings but the lower-level headings like discrete headings (.Procedure) or example and figure headings:

@Lennonka
Copy link
Contributor

Lennonka commented Oct 1, 2025

I'd try the color of the main section headings. The abstract would visually blend with the heading, slightly shifting the focus.

@aneta-petrova
Copy link
Member Author

I'd try the color of the main section headings. The abstract would visually blend with the heading, slightly shifting the focus.

Sections with just the main heading look alright:

Screenshot From 2025-10-01 18-02-57

However, when I look at sections that contain a discrete heading, I think the contrast is too much:

Screenshot From 2025-10-01 18-03-07

@Lennonka
Copy link
Contributor

Lennonka commented Oct 1, 2025

You're right, it's too bright.

Fair enough. Let's go with the color of discrete headings. That works well 👍

@aneta-petrova
Copy link
Member Author

Thanks @Lennonka! This was a great brainstorming session! 🚀

Let's keep this open for additional reviews. I think that if there is at least one more ack, that should be good enough. If on the other hand there are further concerns or suggestions, we can keep working on this.

Copy link
Contributor

@Lennonka Lennonka left a comment

Choose a reason for hiding this comment

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

I'm happy with this solution.

One more ack is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs style review Requires a review from docs style/grammar perspective
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants