Skip to content

fix(options): keep OPTION-block figures nested in the list item (#2820) - #2842

Merged
jung-thomas merged 7 commits into
DEVfrom
worktree-fix-figure-list-escape-2820
Oct 19, 2026
Merged

jung-thomas merged 7 commits into
DEVfrom
worktree-fix-figure-list-escape-2820

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

What & why

Figures inside an [OPTION] block — or trailing an OPTION group in the same numbered substep — rendered as a top-level <figure> sibling of the list instead of nested in the <li>, so they lost their indentation under the substep. This is the "centered vs left-aligned image" report in #2820 (surfaced on the QA channel where an author is trialing the OS-OPTION feature on hana-clients-install).

Root cause: convertOptionBlocks spliced the OPTION shortcode flush-left, which closes the surrounding markdown list. Anything landing in the column-0 gap (or in the separately markdownify'd os-panel body) then rendered outside the <li>.

#2822 only changed figure text-align (CSS) — that cannot move a DOM sibling back inside the <li>, which is why the figures looked "fixed" but stayed un-indented.

Fix (approach A)

Indent the shortcode wrapper lines to the substep so the block stays inside the <li> (the list never closes), while the panel body stays at column 0 so os-panel.html's {{ .Inner | markdownify }} still parses code fences/images as markdown (preserves #2703). The old flush-left tail-dedent is removed — with the list open, trailing substep content keeps its authored indent instead of being ejected.

Verification

Not covered by this PR

End-to-end live QA result requires deploying this to the QA env + a QA rebuild from --ref DEV (rebuild-content.yml runs the parser from the dispatch ref). Only then will /tutorials-qa/hana-clients-install change.

Fixes #2820

jung-thomas and others added 7 commits October 17, 2026 16:09
Rollout script's 404-detection bug created this file on a repo that
should not have it (wrong type, or a non-tutorial/template/platform repo).
Reverting to restore the intended per-repo notify-workflow layout.
Rollout script's 404-detection bug created this file on a repo that
should not have it (wrong type, or a non-tutorial/template/platform repo).
Reverting to restore the intended per-repo notify-workflow layout.
Bump deploy versions for the DEV->main promotion:
- .deploy/mta.yaml  1.40.0 -> 1.40.1 (main tutorials-ims MTA)
- mta-mcp.yaml      1.0.0  -> 1.0.1  (tutorials-mcp MTA)

Patch release — 6 fixes/docs merged to DEV since 1.40.0 (#2820/#2826,
#2827/#2830, #2828/#2831, #2800/#2832, docs #2829). Refresh the What's New
digest (hugo/data/whats_new.json) with the 7 PRs since the last release.

No user-facing features in this window; all changes are fixes, reliability
hardening, and author docs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
release: v1.40.1 (DEV→main promotion)
convertOptionBlocks spliced OPTION shortcodes flush-left, which closed the
surrounding numbered list. Figures inside an os-panel — or trailing an OPTION
group in the same substep — then rendered as a top-level <figure> sibling of
the list, losing their indentation under the substep (the 'centered vs
left-aligned image' QA report).

PR #2822 only adjusted figure text-align (CSS), which cannot re-nest a DOM
sibling, so the figures stayed un-indented.

Approach A: indent the shortcode WRAPPER lines to the substep so the block
stays inside the <li> (list never closes), while the panel BODY stays at
column 0 so os-panel.html's markdownify pass parses code fences/images as
markdown (preserves the #2703 behaviour). The old flush-left tail-dedent is
removed — with the list open, trailing content keeps its substep indent.

Verified through real Hugo renders (incl. the live Tutorials-Contribution
hana-clients-install source): figures nest as li > ol > figure; #2703 code
fences unaffected. New render-level regression test added.
@jung-thomas
jung-thomas merged commit bb4cb56 into DEV Oct 19, 2026
5 checks passed
@jung-thomas
jung-thomas deleted the worktree-fix-figure-list-escape-2820 branch October 19, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant