Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MathML support + test. #3121

Merged
merged 1 commit into from Mar 18, 2023
Merged

Conversation

jonas-scholz123
Copy link
Contributor

Description

MathML tags now are assigned the correct namespace, so that the browser can correctly render them. We follow the same procedure already used for SVGs that require a non-default namespace also.

  • Added a unit test to ensure the namespace is correctly applied to child tags.
  • Tested locally (firefox, safari, chrome) that MathML is now correctly rendered.

Fixes #3120

Checklist

  • I have reviewed my own code
  • I have added tests

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 18d34fb):

https://yew-rs-api--pr3121-feature-mathml-0kgifs6v.web.app

(expires Fri, 17 Feb 2023 18:04:53 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 108.033 108.301 +0.268 +0.248%
boids 170.914 171.173 +0.259 +0.151%
communication_child_to_parent 90.991 91.246 +0.255 +0.280%
communication_grandchild_with_grandparent 105.319 105.574 +0.255 +0.242%
communication_grandparent_to_grandchild 101.161 101.416 +0.255 +0.252%
communication_parent_to_child 88.083 88.338 +0.255 +0.289%
contexts 107.861 108.116 +0.255 +0.236%
counter 85.889 86.156 +0.268 +0.312%
counter_functional 86.199 86.467 +0.268 +0.310%
dyn_create_destroy_apps 88.695 88.963 +0.268 +0.302%
file_upload 100.412 100.680 +0.268 +0.266%
function_memory_game 165.034 165.293 +0.259 +0.157%
function_router 349.671 349.927 +0.256 +0.073%
function_todomvc 160.019 160.277 +0.259 +0.162%
futures 224.653 224.921 +0.268 +0.119%
game_of_life 106.642 106.909 +0.268 +0.251%
immutable 182.111 182.535 +0.424 +0.233%
inner_html 82.281 82.549 +0.268 +0.325%
js_callback 112.161 112.416 +0.255 +0.227%
keyed_list 196.353 196.607 +0.255 +0.130%
mount_point 85.517 85.784 +0.268 +0.313%
nested_list 113.545 113.800 +0.255 +0.224%
node_refs 93.531 93.786 +0.255 +0.273%
password_strength 1548.865 1549.112 +0.247 +0.016%
portals 96.720 96.975 +0.255 +0.264%
router 319.878 320.133 +0.255 +0.080%
simple_ssr 151.188 151.447 +0.259 +0.171%
ssr_router 394.967 395.226 +0.259 +0.066%
suspense 109.284 109.539 +0.255 +0.233%
timer 88.767 89.034 +0.268 +0.301%
todomvc 141.249 141.508 +0.259 +0.183%
two_apps 86.509 86.776 +0.268 +0.309%
web_worker_fib 152.060 152.327 +0.268 +0.176%
webgl 85.071 85.339 +0.268 +0.315%

✅ None of the examples has changed their size significantly.

@github-actions
Copy link

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 371.912 372.501 372.050 0.183
Hello World 10 696.468 704.116 699.221 1.951
Function Router 10 2299.803 2333.117 2312.766 9.120
Concurrent Task 10 1007.960 1008.822 1008.318 0.272

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 376.717 377.084 376.846 0.125
Hello World 10 697.086 708.182 701.585 3.170
Function Router 10 2340.142 2362.984 2349.594 9.351
Concurrent Task 10 1007.709 1008.916 1008.409 0.328

Copy link
Member

@futursolo futursolo left a comment

Choose a reason for hiding this comment

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

Thank you for the pull request!

Copy link
Contributor

@Jaffa-Cakes Jaffa-Cakes left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Member

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@hamza1311 hamza1311 merged commit b85313b into yewstack:master Mar 18, 2023
@jonas-scholz123 jonas-scholz123 deleted the feature/mathml branch June 22, 2023 10:15
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.

MathML Tags are created in the incorrect namespace.
4 participants