Remove table attributes in /help
What does this MR do and why?
For our new table style we are adding two Hugo class attributes that technical writers can choose to apply to individual tables: condensed which can limit the height of long tables, making them scrollable and expandable which adds a button that expands the table in a modal.
Technical writers use Hugo markdown attributes to add this properties to tables. For example:
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
{.expandable .condensed}
To prevent these Hugo attribute tags from appearing in /help, this MR adds a method to the hugo transformer to remove the tags.
References
Issue #580138
Screenshots or screen recordings
| before | after |
|---|---|
|
|
|
How to set up and validate locally
- Pull this branch
- Browsing the GDK locally, go to the internal /help
- Navigate to an .md page that contains a table (e.g., 127.0.0.1:3000/help/development/fe_guide/accessibility/_index.md)
- Add a "condensed" or "expandable" attribute directly under the table without skipping a line (e.g.
{.condensed}). - Confirm that the
{.condensed}tag is not visible on the page in the /help browser - Try the same thing with another variation, such as
{.expandable}or{class="condensed"}or{.expandable .condensed}or{class="expandable condensed"}
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #580138
Edited by Pearl Latteier