Skip to content

fix: marker, hr and img streaming animation#540

Open
shadcn wants to merge 1 commit into
mainfrom
shadcn/fix-void-el-animation
Open

fix: marker, hr and img streaming animation#540
shadcn wants to merge 1 commit into
mainfrom
shadcn/fix-void-el-animation

Conversation

@shadcn

@shadcn shadcn commented Jun 22, 2026

Copy link
Copy Markdown

Description

fix issue with list markers, task-list checkboxes, images, and hr animations

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)

Changes Made

  • Fade list markers in via ::marker color, synced to the item's first word.
  • Animate task-list checkboxes and <img>/<hr> via the standard data-sd-animate rule.

Testing

  • All existing tests pass
  • Added new tests for the changes
  • Manually tested the changes

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have created a changeset (pnpm changeset)

Changeset

  • I have created a changeset for these changes

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
streamdown Ready Ready Preview, Comment, Open in v0 Jun 22, 2026 4:11pm

charCounter: { count: number; newIndex: number }
): void => {
if (hasSkipAncestor(ancestors)) {
return;

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.

Trailing void elements (img/hr) re-animate one extra time during streaming because they never advance charCounter.count, causing a boundary collision at count === prevContentLength.

Fix on Vercel

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