Repository navigation
feat(embed): set a tool player's height, and play a host's own links - #403
Conversation
`height` sets how tall a CodePen, StackBlitz, Figma, or host player is. The `player` option lets a host play its own links before the built-in providers, such as Drop's drops, which stay link cards wherever the plugin runs without it. A card ignores `height` without an issue, so a doc written for such a host lints clean elsewhere.
…self When a component isn't a typo of a known one, the CLI now ends with the exact `comark-lint.config.mjs` to write, or names the config it loaded, instead of a fix that didn't say where the components go.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
comark-annotate
comark-badge
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
Important
A failure in the new host-player callback currently aborts the whole document render instead of falling back for that embed.
Reviewed changes — Reviewed custom player resolution, per-block heights across all four renderers, preset integration, validation, documentation, and CLI hints; the workspace build, TypeScript check, and 406 focused tests passed.
- Host players: Adds the
playercallback before built-in provider resolution and forwards its options throughcomark-uipresets. - Player heights: Normalizes pixel heights for app players and writes the sizing variable in HTML, React, Vue, and Svelte, while retaining card fallback behavior.
- Validation and documentation: Adds height diagnostics, Doctor examples, public type exports, renderer tests, and usage references.
- Linter guidance: Prints concrete configuration guidance for unknown components that have no spelling suggestion, without changing JSON output.
gpt-6.1-sol(xhigh) | 𝕏
…built-in providers A `player` that threw, such as one calling `decodeURIComponent` on `https://clips.example.com/%`, rejected the whole render. It now adds `comark/embed/player-failed` and the block falls back to the built-in providers or a card.
Latest result Pull request merged. Final answersSession Pull request merged. Session Waiting for GitHub merge request 71326355-8dc4-48f0-b0c5-e5fd772a9fb6. Ready. Pullfrog’s historical P1 host-player exception failure is fixed in 0637528; current reviews report no findings, and all supplied checks pass. From packages/embed, `vp test test/embed.test.ts test/frameworks.test.ts` passed all 20 tests after building zoom. Focused `vp lint` exited 0 with unbuilt-workspace export warnings; `git diff --check` passed. No source changes or repair commit needed. Session Waiting for review checks before the next pass. |
…ed`'s `player` and `height`
There was a problem hiding this comment.
✅ No new issues found; no P0 or P1 findings remain.
Reviewed changes — Reviewed 0637528 since the previous review at dc8e796, focusing on callback-failure containment and fallback behavior.
- Caught host-player failures: Added an exception boundary that reports
comark/embed/player-failedand continues through built-in providers or a link card without aborting the document. - Covered the failure path: Added a public parse/render regression for malformed clip URLs and registered
COMARK0812with its Doctor page and documentation.
Validation passed: 381 focused tests, the TypeScript check, and public comark-ui/html probes covering card fallback, built-in seeking, continued rendering, and issue-rule mapping. The full workspace build returned [timed out after 120000ms]; the remaining UI and linter builds passed when run directly, including export checks.
gpt-6.1-sol(xhigh) | 𝕏
…knows (#173) * feat: show a drop in a doc with `::embed`, which comark-lint already knows `::embed{url="https://drop.vitehub.dev/d/<link>" height=420}` draws the same box `::drop` did, through comark-embed's `player` option. comark-lint and any other host read the same link as a card, so an agent's doc lints clean with no config. `::drop` still renders and publishes, since published docs never change. * chore: comark-ui from onmax/comark-ui#403's preview build, for `::embed`'s `player` and `height` * docs(skills): drop the comark-lint config line, which `::embed` makes unneeded * fix: refresh cached embeds and document HTTP fallback * chore: replace comark preview with 0.11.0 release --------- Co-authored-by: vite-hub[bot] <320448255+vite-hub[bot]@users.noreply.github.com>

comark-lintfails on every doc that shows a drop with Drop's::dropblock, because the CLI knows only the blocks of the comark-ui packages installed next to it. An agent writing a report for Drop getscomark/unknown-componentand has to work out alone that acomark-lint.config.mjsfixes it.The block shouldn't be Drop's own in the first place. A drop is a link that plays in a frame, which is what
::embedis for. This PR gives::embedthe two things Drop needs to draw drops with it:heightsets how tall a CodePen, StackBlitz, Figma, or host player is, in pixels, through--ce-app-heighton its figure. A video, Spotify, or X player sizes itself, soheightthere reportscomark/embed/height-unsupported. A link card ignoresheightwithout an issue, so a doc written for a host with more players lints clean elsewhere.playeroption (comarkUi({ embed: { player } })) gets each link before the built-in providers and returns a player for the links the host knows. Drop passes one for its/d/<link>pages, so::embed{url="https://drop.vitehub.dev/d/…" height=420}is a drop inside Drop and a link card in comark-lint, a local render, or any other host. Aplayerthat throws reportscomark/embed/player-failed, and the block falls back to the built-in providers.The second commit fixes the linter's own hint. When a component isn't a typo of a known one, the CLI now ends with the config to write:
A block without
heightrenders the same markup as before. The new tests inpackages/embed/test/and the CLI test fail onmainand pass here.vp check, the typecheck,lint:docs, and the embed, lint, and doctor tests pass.remark-to-comark's "refuses to migrate with no git repository" test timed out on my machine; this doesn't touch it.The Drop side is vite-hub/drop#173. Replaces #402.