Skip to content

feat(preview): Add interactive TreePreview component#674

Open
Copilot wants to merge 1 commit intomainfrom
copilot/tree-configure-items-breadcrumb-preview
Open

feat(preview): Add interactive TreePreview component#674
Copilot wants to merge 1 commit intomainfrom
copilot/tree-configure-items-breadcrumb-preview

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Adds an interactive preview component for KolTree, following the same item-configuration pattern established by BreadcrumbPreview/LinksProperty.

New components

  • TreeItemsProperty — property editor for tree items, modeled after LinksProperty: number input controls how many items (1–6) are shown, an "Edit Items" drawer allows editing each item's label, href, and active state. Predefined pool of 6 items.
  • TreePreview — preview wrapper using PreviewLayout.DEFAULT with a custom sourceFormatter that generates proper nested <KolTree> + <KolTreeItem> JSX (since items are rendered as children, not a single prop).
<TreePreview codeCollapsable codeCollapsed />

Translation keys added (de + en)

  • preview.component.tree.label
  • preview.component.tree.items.edit
  • preview.component.tree.items.closeedit

Docs migration

Replaced static ### Code / ### Beispiel blocks in both docs/30-components/tree.mdx and its English counterpart with the interactive <TreePreview> component.

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update tree component configuration based on breadcrumb preview feat(preview): Add interactive TreePreview component Apr 10, 2026
Copilot AI requested a review from laske185 April 10, 2026 08:07
@laske185 laske185 force-pushed the copilot/tree-configure-items-breadcrumb-preview branch from dbb3879 to 2f6787f Compare April 10, 2026 09:09
@laske185 laske185 marked this pull request as ready for review April 10, 2026 09:09
@github-actions
Copy link
Copy Markdown

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.

Tree-Preview

2 participants