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

Allow setting JsValue as properties #3458

Merged
merged 7 commits into from
Oct 28, 2023
Merged

Conversation

ranile
Copy link
Member

@ranile ranile commented Oct 9, 2023

Description

Add support for setting JsValue as properties on elements

Fixes #3455

Checklist

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

@ranile ranile added breaking change A-yew Area: The main yew crate labels Oct 9, 2023
@ranile ranile requested a review from futursolo October 9, 2023 13:40
github-actions[bot]
github-actions bot previously approved these changes Oct 9, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Visit the preview URL for this PR (updated for commit 1cdc5b9):

https://yew-rs-api--pr3458-js-value-properties-hdhsuf6p.web.app

(expires Sat, 04 Nov 2023 15:33:56 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 103.360 103.249 -0.111 -0.108%
boids 176.817 176.613 -0.204 -0.115%
communication_child_to_parent 95.831 95.647 -0.184 -0.192%
communication_grandchild_with_grandparent 109.030 108.764 -0.267 -0.245%
communication_grandparent_to_grandchild 105.435 105.168 -0.267 -0.253%
communication_parent_to_child 93.314 93.131 -0.184 -0.197%
contexts 112.714 112.451 -0.263 -0.233%
counter 90.002 89.818 -0.184 -0.204%
counter_functional 90.663 90.479 -0.184 -0.203%
dyn_create_destroy_apps 93.225 93.041 -0.184 -0.197%
file_upload 104.261 104.079 -0.182 -0.174%
function_memory_game 175.886 175.535 -0.351 -0.199%
function_router 353.806 352.848 -0.958 -0.271%
function_todomvc 164.230 164.043 -0.188 -0.114%
futures 232.174 232.036 -0.138 -0.059%
game_of_life 113.148 112.902 -0.246 -0.217%
immutable 190.273 190.158 -0.115 -0.061%
inner_html 86.320 86.137 -0.184 -0.213%
js_callback 113.781 113.514 -0.268 -0.235%
keyed_list 202.673 202.470 -0.203 -0.100%
mount_point 89.213 89.029 -0.184 -0.206%
nested_list 117.399 117.083 -0.316 -0.270%
node_refs 96.923 96.719 -0.204 -0.211%
password_strength 1753.925 1753.723 -0.202 -0.012%
portals 98.070 97.804 -0.267 -0.272%
router 322.340 321.976 -0.364 -0.113%
simple_ssr 144.692 143.748 -0.944 -0.653%
ssr_router 391.806 390.752 -1.054 -0.269%
suspense 120.140 119.874 -0.266 -0.221%
timer 92.549 92.345 -0.204 -0.221%
timer_functional 101.335 101.130 -0.205 -0.202%
todomvc 144.317 144.130 -0.188 -0.130%
two_apps 90.062 89.879 -0.184 -0.204%
web_worker_fib 138.945 138.094 -0.852 -0.613%
web_worker_prime 189.679 188.827 -0.852 -0.449%
webgl 88.930 88.744 -0.186 -0.209%

✅ None of the examples has changed their size significantly.

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 384.194 384.315 384.248 0.039
Hello World 10 672.593 679.856 674.827 1.920
Function Router 10 2130.547 2169.058 2156.926 10.468
Concurrent Task 10 1006.848 1008.207 1007.447 0.381
Many Providers 10 1529.095 1585.352 1544.604 15.888

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 384.036 386.399 384.381 0.712
Hello World 10 658.575 675.514 664.570 5.093
Function Router 10 2181.879 2218.939 2198.061 9.896
Concurrent Task 10 1006.284 1008.600 1007.424 0.738
Many Providers 10 1533.658 1587.042 1547.120 19.570

github-actions[bot]
github-actions bot previously approved these changes Oct 9, 2023
# Conflicts:
#	packages/yew/src/virtual_dom/mod.rs
#	packages/yew/src/virtual_dom/vtag.rs
github-actions[bot]
github-actions bot previously approved these changes Oct 28, 2023
github-actions[bot]
github-actions bot previously approved these changes Oct 28, 2023
@github-actions
Copy link

github-actions bot commented Oct 28, 2023

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  6.727 ns      │ 9.119 ns      │ 7.168 ns      │ 7.333 ns      │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  4.262 ns      │ 6.347 ns      │ 4.454 ns      │ 4.561 ns      │ 100     │ 1000000000

github-actions[bot]
github-actions bot previously approved these changes Oct 28, 2023
github-actions[bot]
github-actions bot previously approved these changes Oct 28, 2023
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.

LGTM.

@ranile ranile merged commit d790e1b into yewstack:master Oct 28, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants