Skip to content

fix(cool-mode): replace innerHTML particle rendering with safe DOM creation#930

Merged
Yeom-JinHo merged 2 commits intomagicuidesign:mainfrom
Yeom-JinHo:refactor/cool-mode
Mar 20, 2026
Merged

fix(cool-mode): replace innerHTML particle rendering with safe DOM creation#930
Yeom-JinHo merged 2 commits intomagicuidesign:mainfrom
Yeom-JinHo:refactor/cool-mode

Conversation

@Yeom-JinHo
Copy link
Copy Markdown
Member

Description

This PR removes innerHTML usage from CoolMode particle rendering and replaces it with safe DOM construction for the documented particle types.

The existing documented behavior is preserved:

  • default circle particles still render as SVG circles
  • image URL particles still render as images
  • emoji/text particles still render as text content

Changes

  • Replaced innerHTML-based circle rendering with explicit SVG element creation
  • Replaced innerHTML-based image rendering with an img element and src assignment
  • Replaced innerHTML-based text rendering with a DOM node using textContent
  • Kept the current public API and documented usage intact
  • Regenerated registry artifacts for cool-mode

Motivation

CoolMode previously interpolated the particle option into innerHTML, which meant arbitrary strings could be parsed as HTML.

This change keeps the component behavior the same for documented usage while making the implementation safer, more predictable, and easier to maintain.

Breaking Changes

None.

@Yeom-JinHo Yeom-JinHo self-assigned this Mar 20, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

@Yeom-JinHo is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@Yeom-JinHo Yeom-JinHo merged commit db54166 into magicuidesign:main Mar 20, 2026
5 of 6 checks passed
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