Skip to content

feat(tabs): add an icon prop, drawn by comark-icon from Iconify names or image URLs - #51

Merged
vitehub-bot[bot] merged 3 commits into
mainfrom
feat/tabs-icons
Oct 21, 2026
Merged

vitehub-bot[bot] merged 3 commits into
mainfrom
feat/tabs-icons

Conversation

@onmax

@onmax onmax commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #54 (comark-icon). Tabs and code-group tabs can show an icon: an Iconify name or an image URL. comark-icon resolves and draws it.

:::tabs-item{label="macOS" icon="lucide:apple"}

```sh [pnpm] icon=logos:pnpm
```
  • Shared with :icon. Tabs resolve icons with comark-icon's resolver and draw them with its iconHtml/iconStyles and Icon components. They look, size (--comark-icon-size), and handle forced colors the same as an :icon.
  • Options.
    • iconResolver takes the createIcons() the page's :icon uses, so tabs share its collections and fetch.
    • Without it, icons come from the Iconify API, as in :icon.
    • icons: { pnpm: "logos:pnpm" } gives every tab with that label an icon.
  • Issues. A tab whose icon can't be drawn gets an issue that names the block and tab, in comark-icon's words. The tab renders without the icon.
  • Renderers. HTML, Vue, React, and Svelte render the same markup. The frameworks test covers this.

This replaces the first version of this PR, which had its own resolver inside tabs. Its fixes carry over:

The docs move to the split tabs pages: an Icons example, the icon prop, and an Icons guide. The docs build fetches the example icons from the Iconify API.

Checks: 200 tests passed. vp check reports 0 errors (its 2 warnings are already in e2e/annotate.e2e.ts). Vite Doctor reports no warnings, and the docs build passes.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 1e055c3 2026-10-21T11:51:12.284Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ c14731f 2026-10-21T11:43:37.387Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 73e6bbf 2026-10-21T11:22:24.903Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ cdb5741 2026-10-21T09:06:50.258Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ f49afae 2026-10-21T08:25:53.446Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 51f473a 2026-10-21T08:14:43.334Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 89e83e3 2026-10-21T07:45:30.191Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 2117daa 2026-10-21T07:23:20.532Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 9238e8e 2026-10-21T06:58:21.854Z Visit the dashboard ↗

@pkg-pr-new

pkg-pr-new Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/comark-annotate@51

comark-carousel

pnpm add https://pkg.pr.new/comark-carousel@51

comark-charts

pnpm add https://pkg.pr.new/comark-charts@51

comark-code

pnpm add https://pkg.pr.new/comark-code@51

comark-embed

pnpm add https://pkg.pr.new/comark-embed@51

comark-github-callouts

pnpm add https://pkg.pr.new/comark-github-callouts@51

comark-icon

pnpm add https://pkg.pr.new/comark-icon@51

comark-include

pnpm add https://pkg.pr.new/comark-include@51

lint-comark

pnpm add https://pkg.pr.new/lint-comark@51

comark-tabs

pnpm add https://pkg.pr.new/comark-tabs@51

comark-zoom

pnpm add https://pkg.pr.new/comark-zoom@51

commit: 1e055c3

@pullfrog pullfrog 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.

Important

This PR has two concrete correctness issues in the new icon paths that should be addressed before merging.

Reviewed changes

Reviewed the parser, Iconify resolution and caching, HTML renderer, framework renderers, styles, documentation, and the new tabs tests.

  • Icon inputs — adds Iconify names, image URLs, label defaults, local icon sets, and API fetching.
  • Rendered output — adds inline CSS images to the HTML, React, Vue, and Svelte tab strips and captions.
  • Validation and coverage — reports icon resolution failures through meta.issues and adds parser, renderer parity, and framework compilation tests.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/tabs/src/react.ts Outdated
Comment thread packages/tabs/src/icons.ts Outdated
@vitehub-bot

vitehub-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

Session

Updated the branch with main because main changed pnpm-lock.yaml after its checks ran; waiting for checks on the new head.

@vitehub-bot

vitehub-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Fixed both P1 findings in 2117daa: framework renderers sanitize quote, backslash, and whitespace characters in public icon URLs, and local Iconify alias resolution preserves chained hFlip, vFlip, and rotate transformations.

@pullfrog pullfrog 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.

Important

The alias fix still does not match Iconify's transform contract, so valid local aliases can render the wrong geometry or be clipped.

Reviewed changes

Reviewed the changes since the prior Pullfrog review: shared CSS URL sanitization across framework renderers and local Iconify alias transform handling.

  • Sanitized framework icon URLs — applied the parser's CSS url() escaping to React, Vue, and Svelte output.
  • Rendered alias transforms — added hFlip, vFlip, and rotate data to local aliases and wrapped transformed SVG bodies.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

Comment thread packages/tabs/src/icons.ts Outdated
@onmax onmax changed the title feat(tabs): add an icon prop for Iconify icons or image URLs feat(tabs): add an icon prop, drawn by comark-icon from Iconify names or image URLs Oct 21, 2026
@onmax
onmax changed the base branch from main to feat/icon October 21, 2026 07:44

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the changes since the prior Pullfrog review: the tabs package now uses comark-icon as its shared resolver and rendering implementation across HTML, React, Vue, and Svelte.

  • Delegated icon resolution — replaced the tabs-local resolver with createIcons(), shared collections and fetch configuration, and describeIconProblem().
  • Reused icon rendering — switched tab strips and captions to iconHtml()/iconStyles() and the framework Icon components.
  • Updated tab parsing and documentation — preserved code-group metadata, label-based defaults, public types, examples, and renderer parity tests.

The new delta is behaviorally substantive but I found no additional actionable issues. The focused test command could not complete in this environment because pnpm's prepare step cannot lock .git/config on the read-only filesystem.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@onmax
onmax added this pull request to stack #56 October 21, 2026 08:14

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the current PR after the prior Pullfrog review, including the delegated comark-icon integration across the tabs parser and HTML, React, Vue, and Svelte renderers.

  • Delegated icon resolution — replaced the tabs-local resolver with the shared createIcons() resolver and shared icon problem descriptions.
  • Reused icon rendering — rendered tab strip and caption icons through comark-icon's HTML and framework components, including shared URL sanitization and styles.
  • Preserved tab inputs — parsed code-block icon= metadata, label-based defaults, public options, and renderer parity coverage.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the current synchronized tabs icon implementation and its shared comark-icon integration across parsing, HTML, React, Vue, and Svelte rendering.

  • Shared icon resolution — routes Iconify names and image URLs through createIcons(), including shared collections, API fetching, alias handling, and diagnostic messages.
  • Cross-renderer output — draws resolved icons in tab strips and captions with the shared HTML and framework components, while preserving style injection and CSS URL sanitization.
  • Parser and coverage updates — extracts code-group icon metadata, applies label defaults, preserves existing metadata, documents the public options, and adds parser and renderer parity tests.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the synchronized head 73e6bbf against the prior Pullfrog review. The branch now presents the same tabs and comark-icon integration previously reviewed, with no new behavioral changes to reassess.

  • Rebased reviewed implementation — retained Iconify resolution, shared renderer output, label defaults, code-group metadata parsing, and issue reporting from the previously reviewed feature.
  • Preserved renderer parity — retained the HTML, Vue, React, and Svelte icon paths and their existing test coverage.

The focused comark-tabs test command remains environment-blocked because pnpm's prepare step cannot lock .git/config on the read-only filesystem.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the synchronized head c14731f against the prior Pullfrog review at 73e6bbf, including the merge from main and its README metadata updates.

  • Merged repository documentation updates — incorporated the ten README badge changes from main without altering tabs runtime behavior.
  • Retained reviewed icon integration — preserved the comark-icon resolver, shared rendering, parser metadata, and HTML, Vue, React, and Svelte parity paths.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the synchronization delta since the prior Pullfrog review: the merge of main, including the repository-wide comark-lint to lint-comark rename and README badge updates. The package, CLI, workspace dependency, lockfile, build filter, Doctor import, exports, tests, and documentation are internally consistent; no tabs or icon runtime behavior changed.

  • Renamed the lint package contract — changed the published package name, executable, workspace dependency, lockfile entry, prepack filter, and generated CLI name together.
  • Updated repository references — changed documentation, Doctor configuration, source diagnostics, tests, and package skill examples without leaving stale comark-lint references.
  • Preserved the reviewed tabs implementation — retained the shared comark-icon resolver and HTML, Vue, React, and Svelte rendering paths from the prior review.

The focused build could not run because pnpm's prepare step cannot lock .git/config on this read-only filesystem.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vitehub-bot
vitehub-bot Bot merged commit 4846983 into main Oct 21, 2026
8 of 9 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
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