Skip to content

Conversation

@bmunkholm
Copy link
Contributor

@bmunkholm bmunkholm commented Jan 21, 2026

About

This changes the implementation of the stepper directive to define steps indirectly by headers instead of specific step directives.

Details

This makes it easier to use, and gives both header structure and anchors in html for better parsing my machines.

See stepper.md for usage instructions.

It's not backwards compatible, as previous stepper implementation hasn't been used yet.
It also doesn't support .rst to not complicate the implementation too much. rst pages should be migrated to .md anyway.

Preview

References

@coderabbitai

This comment was marked as spam.

Copy link
Member

@amotl amotl left a comment

Choose a reason for hiding this comment

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

Excellent. 💯

NB: Maybe add a change log item?

Comment on lines +35 to +41
### Step three (a h3 header)

Steps can contain nested headings. You just have to make them one level smaller.

#### h4 header becomes a header, not a step

Content
Copy link
Member

@amotl amotl Jan 21, 2026

Choose a reason for hiding this comment

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

Taming headline sizes is a total different (and difficult) topic, right?

image

-- https://crate-docs-theme--691.org.readthedocs.build/en/691/myst/stepper.html#step-three-a-h3-header

=> Maybe transfer to a refinement issue to tackle later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, sizing is kind of problematic.
We can make the step title size entirely reflect the header, but a h3 just looks gross big for steps. So normally I think it looks much better when it's smaller. Usually we would likely have a h2 before the steps, and then the steps with a h3. And that's just big (with current styling). And you can't really just adjust it by using a smaller header as you get warnings if you skip some levels. ( WARNING: Non-consecutive header level increase; H1 to H4 [myst.header])

So somehow we need to make steps smaller I think. Right now it's just hardcoded. If we eventually see it causes issues we could perhaps add a parameter to the stepper.

Copy link
Contributor Author

@bmunkholm bmunkholm Jan 22, 2026

Choose a reason for hiding this comment

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

@coderabbitai create a followup issue for the above feedback and include the answer.

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Create a follow-up issue for the stepper headline sizing feedback

gh issue create \
  --title "Improve headline sizing flexibility in stepper component" \
  --body "## Context

This issue tracks feedback from PR `#691` regarding headline sizing in the stepper component.

### Problem

The current stepper component has hardcoded sizing for step titles, which can look problematic in certain scenarios:

- H3 headers used for steps appear too large
- Typically, content would have an H2 before the stepper, with H3 headers defining the steps
- Using smaller headers (e.g., H4) to reduce size results in MyST warnings: \`WARNING: Non-consecutive header level increase; H1 to H4 [myst.header]\`

### Potential Solution

Consider making step title sizes configurable, potentially by adding a parameter to the stepper directive to allow users to control the visual size independently of the actual heading level.

### References

- Original discussion: https://github.com/crate/crate-docs-theme/pull/691#discussion_r2714674886
- PR `#691`: https://github.com/crate/crate-docs-theme/pull/691
- Reported by: `@amotl`
- Discussed by: `@bmunkholm`

cc: `@bmunkholm`" \
  --assignee bmunkholm

Length of output: 52


@bmunkholm I've created a follow-up issue to track the headline sizing feedback: #693

The issue captures the problem with hardcoded step title sizes and the suggestion to potentially add a parameter for controlling the visual size independently of the heading level.

@bmunkholm bmunkholm merged commit f0945f0 into main Jan 22, 2026
9 checks passed
@bmunkholm bmunkholm deleted the bm/improved-stepper branch January 22, 2026 14:02
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.

3 participants