Skip to content

fix: render SVG shapes and text inside the repeat directive#7640

Open
AKnassa wants to merge 1 commit into
microsoft:mainfrom
AKnassa:fix/6599-svg-repeat-namespace
Open

fix: render SVG shapes and text inside the repeat directive#7640
AKnassa wants to merge 1 commit into
microsoft:mainfrom
AKnassa:fix/6599-svg-repeat-namespace

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 12, 2026

Copy link
Copy Markdown

What this does

Adds an svg template helper so SVG content written inside a repeat directive actually renders in the browser.

Why

SVG elements such as <text> and <circle> placed inside a repeat came out invisible. The browser silently ignored them because they were created in the wrong XML namespace.

What changed

  • Added an svg tagged template helper alongside the existing html one
  • Nested directives inside svg now create elements in the SVG namespace
  • Regular html templates are unchanged

How to see it

Run the fast-element Playwright suite. 49 tests cover this file, including 5 new ones for the svg helper.

Closes #6599

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@AKnassa AKnassa marked this pull request as ready for review July 12, 2026 17:04
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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.

fix: SVG elements (text and shapes) in the repeat directive are not rendered by the browser

1 participant