Skip to content

docs(other): demo tag for Redocly's markdoc tags - #398

Open
ohorbachevskyi wants to merge 2 commits into
mainfrom
rem/git/rem_01jwbtfqhbbam07z9j9m0etng6-docs/card-styling-updates
Open

docs(other): demo tag for Redocly's markdoc tags#398
ohorbachevskyi wants to merge 2 commits into
mainfrom
rem/git/rem_01jwbtfqhbbam07z9j9m0etng6-docs/card-styling-updates

Conversation

@ohorbachevskyi

Copy link
Copy Markdown
Contributor

What/Why/How?

This PR introduces demo custom markdoc tag for our docs.
The purpose of that tag is to demo and live customization of Redocly's markdoc tags directly on their docs page.

Reference

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

remoteId: rem_01jwbtfqhbbam07z9j9m0etng6
remoteUpdateId: grupd_01m0yp3c953wmfnjz50ch4g9xt
branchName: docs/card-styling-updates
commitSha: 58efaf006b98b474ec66132dc20c14b1543da59e
commitUrl: Redocly/redocly@58efaf0
prId: 26402

@redocly redocly Bot left a comment

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.

marketing-site AI Review: 🟢 Completed

Redocly Agent has reviewed your changes and found 4 potential issue(s).

Note

Low Risk

The changes are isolated to documentation and internal Markdoc tooling. The new demo tag is used strictly for documentation rendering, and the blast radius is limited to documentation pages that utilize this tag.

Overview

Introduces a custom demo Markdoc tag that enables interactive live previews and customizations of Markdoc tags within the documentation.

  • Adds new React components to @theme/markdoc (such as Demo, AttributeControl, ColorControl, and RadioGroup) to power the interactive demo UI.
  • Registers the demo tag in the Markdoc schema (@theme/markdoc/schema.ts).
  • Bumps @redocly/realm and @redocly/theme dependencies to their latest next versions.
  • Demonstrates the new tag's configuration and usage in docs/realm/content/markdoc-tags/cards.md.

@redocly redocly Bot left a comment

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.

Caution

Remote content override — this pull request changes files that are managed by remote content. If it is merged, these changes may be overwritten on the next remote content update. Edit the content in its source instead.

  • docs/realm/content/markdoc-tags/cards.md — managed by the remote content mount /docs/realm/

@redocly
redocly Bot requested a review from a team as a code owner August 26, 2026 10:21
# required: false
# location: end
# separators:
# - location: align

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.

Severity: Low

The frontmatter contains numerous commented-out lines (e.g., # content:, # location: end, # separators:) across multiple property definitions like variantProperties and badgeProperties. Remove them to clean up the configuration.

properties: {
type: Object,
description:
'Attribute descriptors of the demonstrated tag, either as a flat map or as "groups", "content", and "attributes". Each descriptor holds a "type", and optionally "default", "required", "description", "enum", and "group".',

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.

Severity: Low

The description for properties lists "groups", "content", and "attributes", but omits "separators", which is supported and used in cards.md. The attribute descriptor list also omits supported fields like hidden and matches.

return Object.fromEntries(
Object.entries(source).filter(([, descriptor]) => isPlainObject(descriptor)),
) as AttributeDescriptors;
}

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.

Severity: Medium

The toDescriptors function intends to exclude the "children" property, as the comment indicates, but its filter only checks isPlainObject(descriptor). Update the condition to explicitly filter it out by key name.

# content:
# required: false
# location: end
attributes:

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.

Severity: Medium

The new demo tag and its $frontmatter property schema (e.g., groups, attributes, separators) are completely undocumented. Without an explanation or reference page, other doc authors cannot intuitively know how to structure properties to use the demo tag.

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