restful-api-guidelines icon indicating copy to clipboard operation
restful-api-guidelines copied to clipboard

Editorial: Uniform Layout and Naming of Hints, Remarks, Exceptions etc.

Open tfrauenstein opened this issue 4 years ago • 11 comments

We use different layout formats for standard guideline elements like 'Exception:', 'Hint:', 'Note:', 'Remark:', 'Example:', 'Tip', 'Reasoning:', 'Warning:', 'Important:', 'Caution:'. Additionally, the elements are partially redundant with unclear 'didactic purpose'. Let us reduce the elements to a minimal set with clear purpose and uniform layout. It will contribute to readability and efficient consumption by API builders. Examples:

  • Hint: https://opensource.zalando.com/restful-api-guidelines/#101
  • Example: https://opensource.zalando.com/restful-api-guidelines/#116 https://opensource.zalando.com/restful-api-guidelines/#104 https://opensource.zalando.com/restful-api-guidelines/#114
  • Note + Tip: https://opensource.zalando.com/restful-api-guidelines/#114
  • Reasoning: https://opensource.zalando.com/restful-api-guidelines/#114

tfrauenstein avatar May 18 '21 14:05 tfrauenstein

I propose to use several features provided by Asciidoc for formatting:

  1. Admonitions for hints, exceptions and etc.
  2. Sidebars to highlight a block of text.

vadeg avatar May 19 '21 21:05 vadeg

From the meeting:

  • We agree that unifying this is useful
  • @vadeg will add a proposal on how to do this (like 3-4 different things)

ePaul avatar Jun 01 '21 13:06 ePaul

I have collected a number of occurrences of different elements and mapped them to possible replacements from AsciiDoctor

Current element Occurrences AsciiDoctor Admonition element
Hint 32 TIP or NOTE
Example 10 Implement new EXAMPLE admonition ( An example how to do this. Or keep it as of now )
Note 47 NOTE
TIP 1 TIP
Reasoning 1 NOTE
Exception 7 IMPORTANT
Warning 1 WARNING

vadeg avatar Jul 01 '21 22:07 vadeg

Thx for the progress here -- looks good. Remarks: a) Let us provide a short definition of when to use TIP vs. NOTE when mapped from Hint b) The only 1 Warning is more a Note c) Let us stick to use Exception (create new new admonition) -- it is important for a guideline rule framework.

tfrauenstein avatar Jul 02 '21 08:07 tfrauenstein

@tfrauenstein and @vadeg : please coordinate whether to do this or #674 first, as there will be a lot of conflicts.

ePaul avatar Aug 24 '21 12:08 ePaul

It may also make sense to realign on how to emphasize keywords like MUST, SHOULD, RECOMMENDED, etc. In text we currently use must, should, ... - also often forgetting the bold, while we use MUST, SHOULD, ... in the rule titles. I think we should strive for consistency here too - especially since we refer to RFC2119 in the Conventions Section. See also #693.

tkrop avatar Dec 07 '21 15:12 tkrop

@vadeg do you expect you can get to this in the near future?

ePaul avatar Mar 22 '22 13:03 ePaul

@ePaul yes. I am testing the UI for asciidoc. Current schema doesn't support properly some formatting components.

vadeg avatar Mar 27 '22 10:03 vadeg

@tfrauenstein

a) Let us provide a short definition of when to use TIP vs. NOTE when mapped from Hint

Do you suggest to provide it somewhere in the document? If you have any guidance what should be the note and what should be the tip I would like to have it before making changes.

vadeg avatar May 27 '22 13:05 vadeg

@vadeg I do not yet have a specific guidance, and propose that we should proceed only with 'note'. If it turns out that some hints are better handled as 'note', then we can use it and define the criteria. I would not overload the doc with a definition -- it should be clear from context.

tfrauenstein avatar May 27 '22 15:05 tfrauenstein

We agreed that this is still worth doing, but currently nobody has time. Approach:

  1. consistently use the existing annotations where they fit.
  2. use the examples from https://github.com/asciidoctor/asciidoctor-extensions-lab/issues/9 to implement new annotations for exception + example, then use them.

Volunteers are welcome!

ePaul avatar Mar 21 '23 14:03 ePaul