flow icon indicating copy to clipboard operation
flow copied to clipboard

Implicit support for proper namespaces for svg and mathml elements

Open mstahv opened this issue 6 months ago • 3 comments

Description

Html5 doesn't require namespace declarations for svg and math elements, but as elements are created with JS in Flow, they are incorrectly handled with Flow, in case one tries to create those elements with Element API. This change adds a tiny bit of intelligence to the front end so that svg and math elements implicitly get the right namespace and other elements default to inheriting it from the parent.

Fixes #2842 to some extent. Some trivial cases work, but for proper support we should also somehow get rid of lowercasing property names.

SvgElement and usage drafted in https://github.com/viritin/flow-viritin/commit/f360f556c61ef4c66eff8f73ff6ec2a459bc326e (needs a Flow version with these changes).

Type of change

  • [ ] Bugfix
  • [x] Feature

Checklist

  • [ ] I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • [ ] I have added a description following the guideline.
  • [ ] The issue is created in the corresponding repository and I have referenced it.
  • [ ] I have added tests to ensure my change is effective and works as intended.
  • [ ] New and existing tests are passing locally with my change.
  • [ ] I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • [ ] Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

mstahv avatar Jun 19 '25 08:06 mstahv

Test Results

1 236 files  + 1  1 236 suites  +1   1h 12m 41s ⏱️ - 2m 12s 8 548 tests + 1  8 492 ✅ + 1  56 💤 ±0  0 ❌ ±0  8 889 runs   - 64  8 825 ✅  - 63  64 💤  - 1  0 ❌ ±0 

Results for commit b714edd4. ± Comparison against base commit dadcdb5a.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Jun 19 '25 08:06 github-actions[bot]

Added IT, ready from my side. I wonder what logic gave this +1.0.0 tag? I think it ought to be fine for next minor as well 🤷‍♂️

mstahv avatar Jun 19 '25 14:06 mstahv

Namespaces added with #21805

caalador avatar Jul 07 '25 08:07 caalador

Is this change planned to be released in 24.9? Didn't find this from 24.9.0-alpha3.

mstahv avatar Jul 29 '25 17:07 mstahv

According to the PR label 1.0.0 it should not, but at a first look I don't see any blocker to pick it into 24.9. I'll double-check with the team.

mcollovati avatar Jul 30 '25 06:07 mcollovati