yew
yew copied to clipboard
Allow import of layout_test into 3rd party crates
Description
This allows you to import layout_test into your crates as described in the docs. As you can't import things behind #[cfg(test)]
.
https://yew.rs/docs/more/testing
I think this was the intent of this PR
https://github.com/yewstack/yew/pull/2310
Should have no impact on the behaviour of existing builds as you have to add yew/test
to your build.
Fixes
- https://github.com/yewstack/yew/issues/3329
Checklist
- [ ] I have reviewed my own code
- [ ] I have added tests
Size Comparison
examples | master (KB) | pull request (KB) | diff (KB) | diff (%) |
---|---|---|---|---|
async_clock | 102.800 | 102.800 | 0 | 0.000% |
boids | 175.729 | 175.729 | 0 | 0.000% |
communication_child_to_parent | 95.273 | 95.273 | 0 | 0.000% |
communication_grandchild_with_grandparent | 109.013 | 109.013 | 0 | 0.000% |
communication_grandparent_to_grandchild | 105.675 | 105.675 | 0 | 0.000% |
communication_parent_to_child | 92.751 | 92.751 | 0 | 0.000% |
contexts | 113.392 | 113.392 | 0 | 0.000% |
counter | 89.155 | 89.155 | 0 | 0.000% |
counter_functional | 89.892 | 89.892 | 0 | 0.000% |
dyn_create_destroy_apps | 92.327 | 92.327 | 0 | 0.000% |
file_upload | 103.484 | 103.484 | 0 | 0.000% |
function_memory_game | 174.717 | 174.717 | 0 | 0.000% |
function_router | 352.578 | 352.578 | 0 | 0.000% |
function_todomvc | 163.478 | 163.478 | 0 | 0.000% |
futures | 227.812 | 227.812 | 0 | 0.000% |
game_of_life | 112.235 | 112.235 | 0 | 0.000% |
immutable | 188.923 | 188.923 | 0 | 0.000% |
inner_html | 85.940 | 85.940 | 0 | 0.000% |
js_callback | 113.412 | 113.412 | 0 | 0.000% |
keyed_list | 201.050 | 201.050 | 0 | 0.000% |
mount_point | 89.146 | 89.146 | 0 | 0.000% |
nested_list | 115.820 | 115.820 | 0 | 0.000% |
node_refs | 96.251 | 96.251 | 0 | 0.000% |
password_strength | 1721.057 | 1721.057 | 0 | 0.000% |
portals | 98.349 | 98.349 | 0 | 0.000% |
router | 318.554 | 318.554 | 0 | 0.000% |
simple_ssr | 144.036 | 144.036 | 0 | 0.000% |
ssr_router | 390.321 | 390.321 | 0 | 0.000% |
suspense | 119.004 | 119.004 | 0 | 0.000% |
timer | 91.755 | 91.755 | 0 | 0.000% |
timer_functional | 100.466 | 100.466 | 0 | 0.000% |
todomvc | 143.765 | 143.765 | 0 | 0.000% |
two_apps | 89.857 | 89.857 | 0 | 0.000% |
web_worker_fib | 138.845 | 138.845 | 0 | 0.000% |
web_worker_prime | 190.343 | 190.343 | 0 | 0.000% |
webgl | 88.461 | 88.461 | 0 | 0.000% |
✅ None of the examples has changed their size significantly.
Visit the preview URL for this PR (updated for commit 5634c02):
https://yew-rs-api--pr3463-patch-1-rmiwbw8k.web.app
(expires Fri, 20 Oct 2023 11:14:27 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Benchmark - SSR
Yew Master
Benchmark | Round | Min (ms) | Max (ms) | Mean (ms) | Standard Deviation |
---|---|---|---|---|---|
Baseline | 10 | 377.651 | 377.816 | 377.745 | 0.057 |
Hello World | 10 | 641.761 | 650.948 | 645.133 | 2.427 |
Function Router | 10 | 2131.403 | 2160.264 | 2149.425 | 7.917 |
Concurrent Task | 10 | 1006.275 | 1008.135 | 1007.158 | 0.523 |
Many Providers | 10 | 1535.088 | 1677.202 | 1562.241 | 43.074 |
Pull Request
Benchmark | Round | Min (ms) | Max (ms) | Mean (ms) | Standard Deviation |
---|---|---|---|---|---|
Baseline | 10 | 377.702 | 378.085 | 377.813 | 0.111 |
Hello World | 10 | 645.637 | 649.784 | 647.344 | 1.316 |
Function Router | 10 | 2183.205 | 2241.010 | 2210.687 | 15.868 |
Concurrent Task | 10 | 1006.115 | 1008.126 | 1007.473 | 0.673 |
Many Providers | 10 | 1566.677 | 1713.970 | 1589.725 | 44.731 |
Can we have an update on this?