22 Commits

Author SHA1 Message Date
bakape
d89f1ccc5c
Optimize VTag construction, memory footprint and patching (#1947)
* yew-macro: optimize VTag construction in html! macro

* yew/vtag: decrease VTag memory footpting and construction args

* yew,yew-macro: optimize VTag contruction, memory footprint and diffing

* yew/vlist: revert to VTag boxing

* yew-macro: add clippy allow for nightly rust

* yew-macro:  fix allow namespace

* *: bump MSRV to 1.49.0

* yew/vnode: restore == for VTag comparison

* yew/vtag: clean up reference casting

* yew-macro/html_element: fix error span regression
2021-07-18 18:26:52 +02:00
Muhammad Hamza
2412a68bee
Refactor and cleanup codebase (#1842)
* remove yew-dsl

* remove yew-components

* remove yew-services

* remove yew::format

* fix CI

* move yew::agent to yew-agent crate

* move yew-functional to yew

plus a couple of misc fixes

* move futures and neqassign out of yewtil

* move yewtil::store to yew_agent, remove yewtil

* formatting

* fix tests

* update docs

* use `rustwasm` gloo repo instead of mine

* add docs

* use rustwasm/gloo repo

* remove unused file

* fix Makefile.toml

* Fix issues after rebase

* Apply suggestions from code review (part 1)

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>

* Apply suggestions from code review (part 2)

* move `#[function_component(_)]` tests

missed those before

* Apply suggestions from code review

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>

Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
2021-07-18 15:57:09 +02:00
mc1098
0f92d4878e
Add focusin and focusout event support (#1945)
* Adds focusin and focusout event support

* Update element-fail.stderr file
2021-07-09 19:21:44 +02:00
nitnelave
2e8f52c73f
Fix case warning on derived properties (#1929)
When deriving `Properties`, the compiler sometimes complains of the
non-Camel-case `Foo_build`. This fixes the issue.
2021-06-26 17:11:09 +02:00
Jens Reimann
b03f02f624
Bring back &str assignment to optional properties (#1895)
This drops the "optional" conversion concept in favor of directly
converting to `Option<T>`.

fixes #1888
2021-06-07 17:15:59 +02:00
Hamza
8fc81b47ee Fix issues after cherry-picking 2021-06-05 23:00:58 +02:00
bakape
e1f093858b yew-macro: fix inability to set the autoplay atribute (#1866) 2021-06-05 23:00:58 +02:00
Cecile Tonglet
e1f539a085 (cargo-release) version 0.18.0 2021-06-05 23:00:58 +02:00
Cecile Tonglet
e99e83ad37 Helper to build changelog (#1845) 2021-06-05 23:00:58 +02:00
Simon
f17d370217 Implicit optional attributes (#1637) 2021-06-05 23:00:58 +02:00
Xavientois
3699dd2bdd
Change match statement to if (#1884) 2021-05-28 09:04:59 +02:00
bakape
7cac4d4756
Optimize vtag construction (#1867)
* yew-macro: optimize VTag construction in html! macro

* vtag: remove inlining suggestions

* vtag: clean up doc comment
2021-05-23 23:33:25 +02:00
Teymour Aldridge
97f67fa77d
Apply Clippy lints. (#1863)
* Apply Clippy lints.

* f

* f
2021-05-21 17:35:30 +02:00
Jasper
c51ab7f094
Added missing licenses to Cargo.toml files and updated to use SPDX syntax (#1822) 2021-04-25 23:24:14 +02:00
Hudson Shykowski
cc51208a48
Implement .into_inner() for Json (#1816)
* Implement .into_inner() for Json

This allows users to use .into_inner() the same way it would be possible
in the serde crate. Previously, it was only possible via dump.0 (which
looks gross), or Json(dump).

* Fix an error using HtmlBlock

The definition uses {content, brace} but the usage used [brace, content}

* Update packages/yew/src/format/json.rs

Co-authored-by: Simon <simon@siku2.io>
2021-04-12 20:04:38 +02:00
Muhammad Hamza
991abab7e1
Update Rust version for macro tests to 1.51 & enable const generics tests (#1801)
* update rust version for macro test to 1.51

* enable const generic tests

* run integration tests using MSRV

* am blind

* clippy, fmt

* apply suggestion
2021-03-30 22:35:21 +02:00
Simon
37401402a1
Allow the use of Rust keywords for element names (#1772)
* time for more hygiene

* update corresponding tests

* while I'm at it

* now let's fix the actual issue

* fix the publish examples CI while I'm at it

* resolve clippy warnings
2021-02-28 15:49:58 +01:00
Luke Chu
bc46062864
Refactor html tag peeking (#1738)
* Fix html macro tests

* Fix generics with lowercase type param

* Satisfy clippy

* Parse generics with multiple type params

* Reorganize tests

* Remove Peek for HtmlTree

* Add additional test

* cargo fmt

* Remove peek_component_type

* Remove failing tests
2021-02-27 15:49:45 +01:00
Xavientois
f27e268f7e
Add support for the unit struct in Properties derive (#1752)
* Add support for the unit struct in Properties derive

* Add test to show that the code now compiles

* Fix fmt lint
2021-02-20 14:45:17 +01:00
Teymour Aldridge
0b90a3df0a
Fix duplicate with props error messages. (#1730)
* Fix duplicate `with props` error messages.

* Fix error span.

* Use `quote!` for error message.

Co-authored-by: Simon <simon@siku2.io>

Co-authored-by: Simon <simon@siku2.io>
2021-02-05 23:43:13 +01:00
Philip Peterson
5fc4387dc5
Rip out stdweb (#1697)
* feat: Remove usage of stdweb

* Cleanup Cargo.toml

* yew-services fixes

* fix doc test

Co-authored-by: Justin Starry <justin.starry@icloud.com>
2021-01-24 00:14:15 +08:00
Philip Peterson
e6a3ae7301
Move top-level crates to packages/<crate> (#1680)
* Move crates to packages/*

* Update Cargo.toml

* Update links

* Fix pull-request.yml

* Update examples Cargo.toml

* Update relative paths

* Update tests

* Fix path
2021-01-12 11:32:48 +08:00