yew
yew copied to clipboard
Redesigned File Upload Example
Description
This redesigns the file upload example with better styling. Support for previewing media is added, as well as support for drag & drop.
Checklist
- [X] I have reviewed my own code
- [ ] I have added tests
Size Comparison
examples | master (KB) | pull request (KB) | diff (KB) | diff (%) |
---|---|---|---|---|
boids | 169.292 | 169.306 | +0.014 | +0.008% |
contexts | 107.345 | 107.346 | +0.001 | +0.001% |
counter | 84.875 | 84.877 | +0.002 | +0.002% |
counter_functional | 85.501 | 85.499 | -0.002 | -0.002% |
dyn_create_destroy_apps | 87.801 | 87.803 | +0.002 | +0.002% |
file_upload | 101.396 | 99.538 | -1.857 | -1.832% |
function_memory_game | 162.828 | 162.840 | +0.012 | +0.007% |
function_router | 345.488 | 345.473 | -0.016 | -0.005% |
function_todomvc | 157.840 | 157.840 | 0 | 0.000% |
futures | 222.037 | 222.035 | -0.002 | -0.001% |
game_of_life | 105.170 | 105.172 | +0.002 | +0.002% |
immutable | 180.707 | 180.709 | +0.002 | +0.001% |
inner_html | 81.973 | 81.977 | +0.004 | +0.005% |
js_callback | 110.686 | 110.692 | +0.007 | +0.006% |
keyed_list | 193.449 | 193.446 | -0.003 | -0.002% |
mount_point | 84.659 | 84.661 | +0.002 | +0.002% |
nested_list | 112.132 | 112.138 | +0.006 | +0.005% |
node_refs | 91.816 | 91.818 | +0.002 | +0.002% |
password_strength | 1547.212 | 1547.213 | +0.001 | +0.000% |
portals | 95.398 | 95.401 | +0.003 | +0.003% |
router | 314.926 | 314.941 | +0.016 | +0.005% |
simple_ssr | 151.352 | 151.347 | -0.005 | -0.003% |
ssr_router | 390.970 | 390.960 | -0.010 | -0.002% |
suspense | 108.411 | 108.413 | +0.002 | +0.002% |
timer | 87.643 | 87.646 | +0.003 | +0.003% |
todomvc | 139.264 | 139.266 | +0.002 | +0.001% |
two_apps | 85.520 | 85.522 | +0.003 | +0.003% |
web_worker_fib | 150.502 | 150.504 | +0.002 | +0.001% |
webgl | 85.655 | 85.653 | -0.002 | -0.002% |
⚠️ The following example has changed its size significantly:
examples | master (KB) | pull request (KB) | diff (KB) | diff (%) |
---|---|---|---|---|
file_upload | 101.396 | 99.538 | -1.857 | -1.832% |
Will fix the fmt and clippy issues.
Also agreed, if we suggest using function components, the examples should use the same, and I'm anyway rewriting the example. I'll make the changes for this.
I've taken the liberty to push a merge of master and fix the clippy issues here. I think it's ready for review.