feat: uniform layout and naming of hints, remarks, exceptions (#660)#860
feat: uniform layout and naming of hints, remarks, exceptions (#660)#860SmilyOrg wants to merge 4 commits into
Conversation
Implements uniform layout and naming for hints, remarks, exceptions, and other call-out elements across all 17 chapter files. Replaces the mix of *Note:*, *Hint:*, **Important:**, etc. inline labels with proper AsciiDoc admonition blocks. Changes: - Add extensions/custom-admonitions.rb implementing EXCEPTION and EXAMPLE as custom Asciidoctor admonition block types - Update Makefile html target to load the custom extension via -r flag - Add CSS for custom admonition icons (.icon-exception, .icon-example) to zalando.css - Convert ~128 inline labels across 17 chapter files: * *Note:*, **Note:**, *Remark:* → NOTE: * *Hint:*, **Hint:**, Hint: → TIP: * *Important:*, **Important:** → IMPORTANT: * *Exception:*, **Exception:** → [EXCEPTION] delimited blocks * Example:, Examples: → [EXAMPLE] delimited blocks (where standalone) - Inline labels inside list items and table cells kept as-is (Pattern C) - Multi-paragraph notes use delimited [NOTE]==== blocks - Mid-sentence labels split into separate admonition paragraphs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reduce label font size from 0.6em to 0.38em and add 4px top margin to improve visual balance of text labels beneath admonition icons. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I checked most instances and they look ok. I decided to add text under the icons to make it more obvious what each type means (especially exception & example are not very clear otherwise). The alternative I considered was having a legend on top in the "Conventions used in these guidelines" section, which we could use instead if this is considered too noisy. |
|
@SmilyOrg Thank you very much. This is a great progress and shows where we may going to. Still I would like us to improve on the design details. In my opinion, the icons are too big and the text capital letter description is obtrusive. In addition the icon/description is not well positioned with respect to the warning/info/... text provided. Last the symbols and their colors does not fit to our general design. @ALL Please state your opinions. |
Co-authored-by: Tronje Krop <18184975+tkrop@users.noreply.github.com>
@tkrop I agree that it's not a great design. Note that the core styles have already been there, I guess they were just unused until now. What this PR adds is Maybe we can gather example screenshots of what we think could look / work better and then give it another shot. |
|
@SmilyOrg thanks for picking this up again. Yes, I think starting with an Whet is also important is the relation between the text sizes used inside and outside the boxes and the spaces. The current box character size is to close to the normal text size. It either needs to match the text size or be significantly smaller. In addition, the spacing needs to change/be proportional to the text size. In the current version neither the text size nor the spacing of the box is using a sensible working relation. For me it is currently looking disturbing. |
tfrauenstein
left a comment
There was a problem hiding this comment.
Thank you for this big PR!
I proposed a longer list of changes (due to different reasons).
I think we should use EXAMPLE -- examples are already high-lighted by code-blocks and be have tons of examples that need to be changed consistently without readability value add.
| for details). | ||
|
|
||
| *Hint:* The formerly used remote references to the `Problem` API fragment | ||
| TIP: The formerly used remote references to the `Problem` API fragment |
There was a problem hiding this comment.
This NOTE should be moved to the end of this rule.
| transactional data copy or curated data products, for instance | ||
| https://curated-product-data.docs.zalando.net/[curated product data [internal link]] or | ||
| https://curated-sales-data.docs.zalando.net/[curated sales data [internal link]]. | ||
| ==== |
There was a problem hiding this comment.
| ==== |
| `query_hash`. | ||
|
|
||
| *Note:* The efficiency of cursor-based pagination depends on the efficiency | ||
| NOTE: The efficiency of cursor-based pagination depends on the efficiency |
There was a problem hiding this comment.
| NOTE: The efficiency of cursor-based pagination depends on the efficiency | |
| TIP: The efficiency of cursor-based pagination depends on the efficiency |
| |========================================= | ||
|
|
||
| *Remark:* In case of complex and long search requests, e.g. when | ||
| NOTE: In case of complex and long search requests, e.g. when |
There was a problem hiding this comment.
| NOTE: In case of complex and long search requests, e.g. when | |
| *Remark:* In case of complex and long search requests, e.g. when |
| Major changes are listed as "Rule Changes" below. | ||
|
|
||
| *Hint:* Most recent major changes might be missing in the list since we update it | ||
| TIP: Most recent major changes might be missing in the list since we update it |
There was a problem hiding this comment.
| TIP: Most recent major changes might be missing in the list since we update it | |
| NOTE: Most recent major changes might be missing in the list since we update it |
| @@ -0,0 +1,22 @@ | |||
| # Registers EXCEPTION and EXAMPLE as custom admonition block types. | |||
| # Reference: https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/9 | |||
There was a problem hiding this comment.
| # Reference: https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/9 | |
| # Reference: https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/9 | |
| # we use the following admonitions in the guidelines: TIP NOTE IMPORTANT WARNING EXCEPTION |
tfrauenstein
left a comment
There was a problem hiding this comment.
Thank you for this big PR!
I proposed a longer list of changes (due to different reasons).
I think we should use EXAMPLE -- examples are already high-lighted by code-blocks and be have tons of examples that need to be changed consistently without readability value add.
Co-authored-by: Thomas Frauenstein <thomas.frauenstein@zalando.de>
|
From the meeting: @tkrop doesn't like the style, feels that this is needed:
@tfrauenstein will change the font size, but will not touch the icons. That can be done later, if needed. |




Summary
*Note:*,*Hint:*,*Exception:*, etc.) across 17 chapter files to native AsciiDoc admonition blocks (NOTE:,TIP:,[IMPORTANT],[WARNING],[EXCEPTION],[EXAMPLE])extensions/custom-admonitions.rb) for two new custom admonition types:EXCEPTIONandEXAMPLEMakefileto load the extension during HTML buildCloses #660
Label mapping
Note,Hint,Remark,ReasoningNOTEImportantIMPORTANTWarningWARNINGExceptionEXCEPTION(new custom type)Example,ExamplesEXAMPLE(new custom type)Test plan
make html— builds without errorsoutput/index.htmland verify admonition blocks render with icons and labelsEXCEPTIONandEXAMPLEblocks render distinctly fromNOTE/IMPORTANT🤖 Generated with Claude Code