Skip to content

chore(kno-11556): Update Step component to add h4 support and heading size alignment#1307

Open
rachael-t wants to merge 5 commits into
mainfrom
rt-kno-11556-fix-step-titlesize
Open

chore(kno-11556): Update Step component to add h4 support and heading size alignment#1307
rachael-t wants to merge 5 commits into
mainfrom
rt-kno-11556-fix-step-titlesize

Conversation

@rachael-t

@rachael-t rachael-t commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Description

I noticed that step headings weren't appearing in this section of the docs, and after digging in realized that this was because the titleSize was set to h4 and the Step component was returning null in this case. To have better support moving forward, I've added the following changes:

  1. Explicitly added support for titleSize="h4" (previously there was only support for "p", "h2" and "h3"
  2. Added a TitleSize union type ("p" | "h2" | "h3" | "h4") and typed all component props accordingly so that passing an invalid titleSize is now a compile-time error rather than a silent runtime failure
  3. I kept default: null (which is reverted from the previous version of this PR) as it looks like this was intentional original behavior since Steps defaults titleSize to "p" at the prop level, meaning default was never meant to be reached. With the TitleSize type now enforced, it genuinely can't be reached, and a comment has been added to reflect that
  4. Updated the heading sizes to align with the markdown headings. Step titles now use the same Telegraph Heading size as SectionHeading (used for ##, ###, #### in MDX via mdxComponents) to help keep the step headings consistent with the rest of the docs.
  5. I also removed backticks from the access_token step title in sending-a-direct-message.mdx as currently backticks don't render as inline code in the title prop and were displaying as literal characters. Worth us considering adding inline code parsing to the component, but this was the only use of backticks in a title in the docs, so I opted to just remove it from this one use case for now.

Tasks

KNO-11556

Screenshots

Before:
Screenshot 2026-02-04 at 4 58 01 PM

After:
Can be seen under this section after the "We'll break this function down step-by-step:"
Screenshot 2026-02-04 at 5 04 12 PM

Cursor Bugbot found 1 potential issue for commit 48a6f48

@linear

linear Bot commented Feb 5, 2026

Copy link
Copy Markdown

@vercel

vercel Bot commented Feb 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 9, 2026 9:22pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread components/ui/Step.tsx Outdated

<Steps titleSize="h4">
<Step title="Get the `access_token` stored in Knock for the user's tenant">
<Step title="Get the access_token stored in Knock for the user's tenant">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Didn't see this in the PR description so just making sure you intend to include this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry I didn't add this! I just updated the description to clarify that this was intentionally removed.

@cellomatt cellomatt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One tiny thing but this lgtm

Comment thread content/integrations/chat/slack/sending-a-direct-message.mdx Outdated
Co-authored-by: Matt Kufchak <matt@knock.app>
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