Skip to content

fix(carousel)!: scope controls to their carousel, follow RTL, report dropped content in meta.issues - #13

Merged
onmax merged 3 commits into
mainfrom
fix/carousel-review
Oct 20, 2026
Merged

onmax merged 3 commits into
mainfrom
fix/carousel-review

Conversation

@onmax

@onmax onmax commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Fixes from an audit of comark-carousel, plus the renames agreed for 0.2. Stacked on #12.

Breaking

  • data-columns and data-fits are now data-carousel-columns and data-carousel-fits, matching data-carousel-step and data-carousel-ready.
  • carouselHtml's gallery option is now zoom, the name Markdown uses. columns and title are typed.
  • The plugin reports problems in meta.issues, as annotate does: content outside every :::slide (which is dropped), an empty carousel, columns outside 1–3, and a :::slide outside a carousel. A stray slide renders as a plain <div> in every renderer, not as a zoomable "undefined of undefined".
  • The arrows use aria-disabled instead of disabled, so focus stays on Next at the last slide.
  • An image alone in its paragraph is lifted out of the <p>, so only whole-slide images are centered blocks and inline badges stay in their sentence.
  • The Vue components set inheritAttrs: false, so {#id .class} renders the same in all four renderers.

Fixes

  • Nested carousels: the outer counter and arrows never updated, because sync() found the nested carousel's controls first. A ::carousel of ::compare blocks hit this. Lookups are now scoped to the carousel's own controls.
  • Renderers agree: :zoom="false" and :columns="2" gave different output in HTML than in Vue and React. Everything now reads props with resolveAttributes.
  • Right-to-left pages: Previous was always disabled. Positions are now measured from the track's start edge, and the arrow keys and chevrons follow the reading direction.
  • Keys: the arrow keys left alone Alt+← (browser Back), keys with modifiers, form fields, video, tab lists, sliders, and anything in a slide that scrolls horizontally.
  • Columns: with columns=2 and 3 slides, the counter stopped at "2 / 3". It now shows the last slide at the end.
  • Without the script: the scrollbar is hidden only once the script runs, so mouse users can still reach slide 2.
  • HTML comments no longer become empty slides.
  • Zoomed text slides without a title take the carousel's title as their heading.
  • Focus ring: keyboard focus on a slide shows; the track used to clip the ring.
  • Paging: reduced motion jumps instead of scrolling, and quick repeated clicks no longer land on the same slide.

Six of the new e2e tests fail against the old client. pnpm ready passes, and so do all 20 e2e tests.

🤖 Generated with Claude Code

@pullfrog

pullfrog Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

This repo's model isn't fully set up yet.

OpenAI-compatible model selected but required configuration is missing: OPENAI_COMPATIBLE_API_KEY.

only the API key is sensitive — add it as a secret at https://github.com/onmax/comark-plugins/settings/secrets/actions. everything else is plain workflow env::

OPENAI_COMPATIBLE_BASE_URL: https://your-endpoint.example.com/v1
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
OPENAI_COMPATIBLE_MODEL:
OPENAI_COMPATIBLE_CONTEXT: "128000"
OPENAI_COMPATIBLE_MAX_OUTPUT: "16384"

set the last two to the real limits of the model your endpoint serves. Pullfrog can't
discover them — your endpoint owns the model catalog — and without them completions are
capped at 32000 tokens (rejected outright by models with a smaller cap) and
auto-compaction is disabled, so long runs grow until your endpoint refuses them.

for full setup instructions, see https://docs.pullfrog.com/openai-compatible

Configure model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol | 𝕏

@pullfrog

pullfrog Bot commented Oct 20, 2026

Copy link
Copy Markdown

This repo's model isn't fully set up yet.

OpenAI-compatible model selected but required configuration is missing: OPENAI_COMPATIBLE_API_KEY.

only the API key is sensitive — add it as a secret at https://github.com/onmax/comark-plugins/settings/secrets/actions. everything else is plain workflow env::

OPENAI_COMPATIBLE_BASE_URL: https://your-endpoint.example.com/v1
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
OPENAI_COMPATIBLE_MODEL:
OPENAI_COMPATIBLE_CONTEXT: "128000"
OPENAI_COMPATIBLE_MAX_OUTPUT: "16384"

set the last two to the real limits of the model your endpoint serves. Pullfrog can't
discover them — your endpoint owns the model catalog — and without them completions are
capped at 32000 tokens (rejected outright by models with a smaller cap) and
auto-compaction is disabled, so long runs grow until your endpoint refuses them.

for full setup instructions, see https://docs.pullfrog.com/openai-compatible

Configure model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-5.6-sol | 𝕏

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 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 ↗ 212fe25 2026-10-20T11:05:50.824Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 7002acb 2026-10-20T10:48:44.095Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ ca1c672 2026-10-20T10:30:22.287Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ dcd272d 2026-10-20T10:04:05.902Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 7bf4263 2026-10-20T08:31:43.530Z Visit the dashboard ↗

@vite-hub
vite-hub Bot changed the base branch from fix/annotate-review to main October 20, 2026 09:45
@vite-hub

vite-hub Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Starting Not started —
View session Cancelled 2026-10-20T10:57:22.963Z 7m 15s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Fixed annotate validation by checking raw attributes, preserving unsafe bound src/href diagnostics while ignoring host attributes. Focused tests were unavailable locally because Corepack could not fetch pnpm and workspace package links were missing; diff checks passed. Committed and pushed 7002acb, and resolved the review thread. Awaiting current-head checks.

Session

Fixed annotate validation by checking raw attributes, preserving unsafe bound src/href diagnostics while ignoring host attributes. Focused tests were unavailable locally because Corepack could not fetch pnpm and workspace package links were missing; diff checks passed. Committed and pushed 7002acb, and resolved the review thread. Awaiting current-head checks.

Session

Fixed annotate validation by checking raw attributes, preserving unsafe bound src/href diagnostics while ignoring host attributes. Focused tests were unavailable locally because Corepack could not fetch pnpm and workspace package links were missing; diff checks passed. Committed and pushed 7002acb, and resolved the review thread. Awaiting current-head checks.

Session

Fixed annotate validation by checking raw attributes, preserving unsafe bound src/href diagnostics while ignoring host attributes. Focused tests were unavailable locally because Corepack could not fetch pnpm and workspace package links were missing; diff checks passed. Committed and pushed 7002acb, and resolved the review thread. Awaiting current-head checks.

Session

Fixed annotate validation by checking raw attributes, preserving unsafe bound src/href diagnostics while ignoring host attributes. Focused tests were unavailable locally because Corepack could not fetch pnpm and workspace package links were missing; diff checks passed. Committed and pushed 7002acb, and resolved the review thread. Awaiting current-head checks.

Session

Fixed annotate validation by checking raw attributes, preserving unsafe bound src/href diagnostics while ignoring host attributes. Focused tests were unavailable locally because Corepack could not fetch pnpm and workspace package links were missing; diff checks passed. Committed and pushed 7002acb, and resolved the review thread. Awaiting current-head checks.

@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/comark-annotate@13
pnpm add https://pkg.pr.new/comark-carousel@13
pnpm add https://pkg.pr.new/comark-zoom@13

commit: 212fe25

@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

This incremental review covers the changes since the prior reviewed version, including build sequencing and zoom history cleanup.

  • Sequenced workspace builds — Updated package prepack commands so dependent workspace packages are built before packaging.
  • Pinned CI actions — Replaced moving workflow action references with immutable commits and version comments.
  • Restored scroll behavior after stop — Ensured a zoom dialog closed by stop() restores the page's previous history.scrollRestoration setting after history navigation.

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

onmax added 2 commits October 20, 2026 12:31
…dropped content in meta.issues

- Nested carousels: a carousel updates only its own counter and arrows, not those of a carousel in a slide.
- A zoomable slide's focus ring sits inside its edge, where the track doesn't clip it.
- Bound props (`:zoom`, `:columns`) resolve the same way in the parse plugin and every renderer, and Vue no longer
  passes `{#id .class}` to the root, which the other renderers drop.
- Right-to-left pages: the counter, arrows, and keys follow the reading direction, and the chevrons flip.
- At the end of a track with several columns, the counter shows the last slide.
- Without the script the scrollbar stays, so a mouse can reach every slide.
- Comments inside `::carousel` are no longer empty slides.
- Arrows use aria-disabled, so a focused arrow keeps focus at the end and the keys keep working.
- Arrow keys leave Alt/Ctrl/Meta/Shift, handled events, form fields, media, tab lists, sliders, and wide code blocks alone.
- Only an image that stands alone in a slide is a centered block; inline images stay in their text.
- Paging respects prefers-reduced-motion, and quick clicks add up instead of reading a position mid-scroll.
- A slide with no title or image takes the carousel's title in the zoomed view.

BREAKING CHANGES:
- `data-columns` and `data-fits` are now `data-carousel-columns` and `data-carousel-fits`.
- `carouselHtml`'s `gallery` option is now `zoom`; `columns` is `number | string` and `title` is `string`.
- The plugin appends problems to `meta.issues` (exported type `CarouselMeta`): content outside every `:::slide`,
  an empty carousel, `columns` outside 1 to 3, and a `:::slide` outside a carousel.
- A `:::slide` outside a carousel renders as a plain `<div>`.
- The arrows are disabled with `aria-disabled="true"` instead of the `disabled` attribute.
- An image alone in its paragraph inside a slide is lifted out of the paragraph, and a slide that is one sentence
  with an image keeps its `<p>`.
- The Vue components set `inheritAttrs: false`.
… and check bound props

- The script picks up carousels added after it runs, such as the ones after the HTML renderer's inline script, so
  they sync when they're shown.
- Without scrollend, quick clicks still add up; a short pause in scrolling clears the target.
- A link around nothing but an image is a standalone picture, centered like an image, and keeps its link.
- `columns` must be 1, 2, or 3 as a number or a numeric string, so `:columns="true"` is reported.
- The arrow keys also leave `summary`, combo boxes, spin buttons, menus, menu bars, and trees alone.
- A `:zoom` or `:title` that reads render-time data is reported, since the slides take it while parsing.

@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 annotate merge fix introduces a regression in prop validation and the focused annotate test suite currently fails; please address this before merging.

Reviewed changes

This incremental review covers the changes since the prior Pullfrog review, specifically the annotate merge-conflict resolution and its new regression coverage.

  • Reworked binding validation — Added a data-aware check intended to detect unsafe bound src and href values without being masked by neighboring plain attributes.
  • Restored annotate regression cases — Added coverage for host attributes, unsafe bound links, inherited object keys, and quoted issue names.

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

Comment thread packages/annotate/src/read.ts Resolved

@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 annotate validation fix now regresses URL validation and internal attribute handling; please address these before merging.

Reviewed changes

This incremental review covers the changes since the prior Pullfrog review, specifically the raw-attribute validation and isolated unsafe-binding diagnostics in packages/annotate/src/read.ts.

  • Validated raw attributes — Changed checkProps to inspect source attribute names so host attributes and unsafe bound src/href values remain diagnosable.
  • Simplified URL and issue formatting — Replaced URL parsing and quote handling with shorter regular-expression and interpolation implementations.

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

Comment thread packages/annotate/src/read.ts Outdated
}
// Quotes what an author wrote, so a quote inside it can't blur where the name ends.
const quote = (value: string) => JSON.stringify(value);
const isHttp = (url: string) => /^https?:\/\/\S/i.test(url);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

isHttp now accepts any non-whitespace suffix after http(s)://, so a value such as https://?x passes validation even though it has no host and cannot identify a page. This regresses the host check removed in this delta and allows the renderer to retain the malformed href; preserve the protocol check together with URL parsing and a non-empty hostname.

Technical details
# Preserve the host requirement for screenshot links

## Affected sites
- `packages/annotate/src/read.ts:63` — the new regular expression accepts `https://?x` and other hostless URLs.
- `packages/annotate/src/read.ts:207` — `readScreenshot` trusts `isHttp` for both the issue check and returned `href`.

## Required outcome
- Accept only `http` or `https` URLs with a non-empty host, matching the previous behavior.
- Reject malformed or hostless URLs and omit them from rendered links.

Comment thread packages/annotate/src/read.ts Outdated
// Validate the source attributes, rather than the resolved map: resolution intentionally
// drops unsafe bindings and host attributes. Keep those bindings visible for diagnostics,
// while treating Comark's own attributes as renderer concerns.
for (const rawKey of Object.keys(node[1])) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new raw-key loop no longer removes the parser's internal $ attribute before prop validation. Any annotate block carrying that attribute will now emit a spurious unknown-prop issue, whereas the previous implementation explicitly deleted $; retain that exclusion while iterating raw keys.

Technical details
# Keep parser metadata out of prop diagnostics

## Affected sites
- `packages/annotate/src/read.ts:143` — `Object.keys(node[1])` is now validated directly without excluding `$`.
- `packages/annotate/src/read.ts:154` — the key is sent through unknown-prop validation, producing a false issue for parser metadata.

## Required outcome
- Validate raw author attributes while continuing to ignore the internal `$` attribute.
- Preserve the new host-attribute exclusions and isolated unsafe-binding checks.

@onmax
onmax force-pushed the fix/carousel-review branch from 163951f to 212fe25 Compare October 20, 2026 11:04
@onmax
onmax merged commit 51e694a into main Oct 20, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
@onmax
onmax deleted the fix/carousel-review branch November 1, 2026 11:04
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