Skip to content

[Docs]: Fix nested list indentation in docs#1368

Open
yuhang-dong wants to merge 7 commits into
google:mainfrom
yuhang-dong:codex-fix-doc-list-indentation
Open

[Docs]: Fix nested list indentation in docs#1368
yuhang-dong wants to merge 7 commits into
google:mainfrom
yuhang-dong:codex-fix-doc-list-indentation

Conversation

@yuhang-dong
Copy link
Copy Markdown

@yuhang-dong yuhang-dong commented May 8, 2026

Description

Fix nested Markdown list indentation so Python-Markdown/MkDocs renders intended child lists instead of flattening them into the parent list.

This updates the affected docs sections to use 4-space indentation for nested list items, including the Web tab block in defining-your-own-catalog.md so list items stay inside the tab content.

Affected areas:

  • docs/concepts/catalogs.md: Versioning Guidelines and Graceful Degradation examples
  • docs/guides/renderer-development.md: Message Processing, Rendering Logic, and Client-to-Server Communication lists
  • docs/guides/mcp-apps-in-a2ui.md: MCP App Standalone Sample subitems
  • docs/ecosystem/a2ui-in-the-world.md: Open Source Examples descriptions
  • docs/reference/agents.md: Sample Agents descriptions
  • docs/guides/defining-your-own-catalog.md: Web tab list structure

Screenshots

Catalogs: Versioning Guidelines

Before, current live site:

a2ui-before-catalogs-versioning-live-clean

After, local MkDocs build:

a2ui-proof-catalogs-versioning-clean

Defining Your Own Catalog: Web tab

Before, current live site:

a2ui-before-defining-catalog-live

After, local MkDocs build:

a2ui-proof-defining-catalog-web-tab-clean

Verification

  • Ran git diff --check
  • Ran mkdocs build -f mkdocs.yaml
  • Verified affected pages in Chrome using local mkdocs serve

Chrome DOM checks:

  • Live https://a2ui.org/concepts/catalogs/#versioning-guidelines currently has Breaking Changes nested items = 0 and flat child items = 2.
  • Local /concepts/catalogs/ has nested items under Breaking Changes, Non-Breaking Changes, and both Graceful Degradation examples.
  • Local /guides/defining-your-own-catalog/ has the Web tab content inside the tab block, with 2 top-level list items and 1 nested item.
  • Local checks also passed for /guides/renderer-development/, /guides/mcp-apps-in-a2ui/, /ecosystem/a2ui-in-the-world/, and /reference/agents/.

Note: mkdocs build --strict -f mkdocs.yaml still reports existing unrelated warnings for glossary.md nav inclusion, guides/authoring-components.md macro rendering, and two existing links in specification/v0.9-a2ui.md.

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 8, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request standardizes indentation and formatting across several documentation files, including catalogs, ecosystem guides, and renderer development references. The review feedback suggests improving consistency in the 'Defining Your Own Catalog' guide by adding a missing step to the Flutter section to match the Web section and standardizing the markdown syntax used for italicized notes.

Comment thread docs/guides/defining-your-own-catalog.md
Comment thread docs/guides/defining-your-own-catalog.md
@yuhang-dong yuhang-dong changed the title Fix nested list indentation in docs [Docs]: Fix nested list indentation in docs May 13, 2026
@ditman
Copy link
Copy Markdown
Collaborator

ditman commented May 15, 2026

Thanks for fixing these, the rendered output now clearly reflects the original intent of the markdown! Good fix! /cc @zeroasterisk

@ditman
Copy link
Copy Markdown
Collaborator

ditman commented May 15, 2026

@yuhang-dong we introduced slightly more strict formatting checks; could you run ./scripts/fix_format.sh to ensure everything in this PR is correctly formatted?

Thanks!

@yuhang-dong
Copy link
Copy Markdown
Author

@ditman , Thanks! I ran ./scripts/fix_format.sh and ./scripts/fix_format.sh --check.

There is one small temporary tradeoff in this PR. Prettier currently normalizes these Markdown nested lists back to 2-space indentation, but MkDocs/Python-Markdown requires 4-space indentation for nested lists to render correctly.

I looked into a few broader fixes before choosing this local approach, including changing the Markdown formatter settings and adjusting the MkDocs/Python-Markdown parsing behavior. Those alternatives had much larger generated HTML diffs than this PR should introduce. For example, changing Markdown formatting globally also changed unrelated fenced code block output, and changing parser behavior affected structural HTML metrics such as list/pre/code counts on unrelated pages.

Given that this is a narrow docs rendering fix in an already established documentation site, I kept the change local by adding prettier-ignore only around the affected list blocks, with an inline comment explaining why.

Tradeoff: those specific list blocks will not be reformatted by Prettier until the docs formatting/rendering setup is addressed more generally. The comments are not visible in the rendered page, only in the HTML source.

Verified:

  • ./scripts/fix_format.sh
  • ./scripts/fix_format.sh --check
  • mkdocs build -f mkdocs.yaml

I pushed one small follow-up commit for the formatter-ignore comments, so the workflows are waiting for maintainer approval again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants