Kaede Hoshikawa
7ef8e0da18
Mark VNode as #[must_use] ( #3387 )
...
This fixes for Rust Release 1.72.
Rust 1.72 makes `From::from` a must use, which effectively makes `html!` a must use.
I have tried various ways to suppress `unused_must_use` for `html!`.
However, it is not effective. So I added `let _ = ` to tests.
I have also made `VNode` a `#[must_use]` so the diagnostic will be easier to understand.
---
* Fix clippy.
* Make html must use.
2023-08-28 20:01:07 +05:00
Tim Kurdov
3c4ac56980
Add IntoPropValue implementation to convert from Cows to AttrValue ( #3346 )
...
* added IntoPropValue impls to & from Cows
* fixed formatting & test's expected output
* fixed formatting
* fixed macro test's expected output
* removed conversion to String & Rc
* fixed macro tests
* fixed macro tests
2023-08-21 21:31:29 +05:00
Tim Kurdov
afde963230
Fix incorrect text escaping during SSR ( #3381 )
...
Fixes : #3129
---
* (#3129 ) fixed incorrect text escaping during SSR
* fixed formatting issues
* moved SpecialVTagKind to feat_ssr, improved its description
* added a test case for multiple text nodes in a style tag
* fixed formatting
* SpecialVTagKind -> VTagKind
2023-08-21 16:29:46 +00:00
Kaede Hoshikawa
b28e69a574
Remove compatibility code before 1.64 ( #3379 )
2023-08-19 22:57:16 +09:00
Muhammad Hamza
42e1890f03
Update signature of use_prepared_state/use_transitive_state ( #3376 )
...
* Update signature of use_prepared_state
* Update signature of use_transitive_state
* Migration guide + example
* bless trybuild tests
* please fmt
* there's one usage here as well
* use_prepared_state_with_suspension needs updates
* updated tests
2023-08-19 21:58:36 +09:00
Muhammad Hamza
41d42fb89d
Make signature of use_future_with consistent ( #3372 )
2023-08-15 20:32:27 +09:00
Mikita Bykau
46bbb0cfe5
Added the ability to pass state through a link. ( #3358 )
...
* state-for-link
* S generic as last generic
* state as last clone
2023-08-14 17:13:00 +05:00
Muhammad Hamza
3e9e253e66
Keep checked attribute for elements without special handling ( #3373 )
...
* Return checked attr for non-input elements
* Add tests
* fine
2023-08-12 02:16:06 +09:00
Xu Shaohua
a9ab085e74
Fix input dynamic text rendered as textarea ( #3239 ) ( #3301 )
2023-08-05 18:58:19 +05:00
dependabot[bot]
4023c88c39
Bump indexmap from 1.9.3 to 2.0.0 ( #3322 )
...
* Bump indexmap from 1.9.3 to 2.0.0
Bumps [indexmap](https://github.com/bluss/indexmap ) from 1.9.3 to 2.0.0.
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/bluss/indexmap/compare/1.9.3...2.0.0 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update dependency minimum version
* clippy
* Bump MSRV to 1.64
* more clippy
* Update action that fails (probably outdated)
* Bump implicit-clone to 0.3.8
* Forgot to bump MSRV in some places
* Forgot to update setup-chromedriver in one place
* Bump implicit-clone to 0.4.0
* Update stderr files
* clippy
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2023-07-29 22:00:53 +09:00
Kaede Hoshikawa
8b9e164d7e
Update Dependencies to Fix CI ( #3326 )
...
* Update dependencies.
* Update dependencies.
* Fix gloo breaking change.
2023-07-01 01:33:18 +00:00
Jedd Dryden
27f537a288
Encode Path Parameters in yew-router ( #3187 )
...
* Escape for URL in `routable_derive`
* Fixed generic datatypes bug
* FQN
* FQN Again
* remove encode_for_url from public API
* fmt
---------
Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
2023-06-21 22:37:25 +09:00
Kaede Hoshikawa
71b0f206a1
Allow any type to be used as Children (take 2) ( #3289 )
...
* Partially copy useful implementation.
* Adjust conversion.
* Temporary fix iterator.
* Add ToString implementation.
* Add Renderable trait.
* Make Macro tests pass.
* Add tests for render_prop as Children.
* Update benchmark and Children used in yew packages.
* Selective suppress lints.
* Rollback unintentional rollback.
* Fix rustfmt.
* Remove unneeded implementation.
* Update Comment.
* Rollback more changes.
* Rollback more changes.
* Fix website.
* Fix documentation tests.
* Add prelude.
* Fix test.
* Blanket Implementation for &'_ T for Renderable types.
* Implement Renderable for &str.
* Update signature.
* Update children to Html in examples.
* Remove unnecessary dereferencing.
* Rollback nested_list example.
* Fix comment.
* Convert to Pattern Matching.
* Add tracing issue.
* Rename Renderable to ToHtml.
* Move ToHtml to yew::html.
* Convert more to match pattern.
2023-06-11 15:33:39 +05:00
dependabot[bot]
1d9daa949f
Bump serde from 1.0.160 to 1.0.162 ( #3259 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.160 to 1.0.162.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.160...1.0.162 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-05 19:29:22 +09:00
Kaede Hoshikawa
9cebb09b58
Update dependencies. ( #3253 )
2023-04-30 20:42:43 +05:00
Kaede Hoshikawa
dbe671e8c4
Fix clippy for Rust 1.69 ( #3246 )
...
* Fix clippy for Rust 1.69.
* use std::marker::PhantonData.
* Change callee to caller.
2023-04-28 23:32:11 +05:00
Dillen Meijboom
d0205a8ea3
feat: implement hydration for vraw ( #3245 )
2023-04-26 02:48:04 +05:00
dependabot[bot]
c38de0e03c
Bump tokio from 1.26.0 to 1.27.0 ( #3216 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.26.0...tokio-1.27.0 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 11:40:24 +03:00
Julius Lungys
24d79e840a
Add webkitdirectory to the boolean attributes list ( #3214 )
...
* Implement bool IntoPropValue String & AttrValue
* Revert "Implement bool IntoPropValue String & AttrValue"
This reverts commit 8468e7a3d9d5d55fc6e1360e49bb2be9f3772376.
* Add webkitdirectory to the boolean attributes list
2023-04-05 21:40:12 +03:00
Kaede Hoshikawa
934aedbc88
Enable PartialEq for all virtual dom types ( #3206 )
...
* Enable PartialEq for VComp.
* Fix VList's children PartialEq.
* Update use context test.
2023-04-04 09:54:29 +09:00
Arniu Tseng
6f4cdf2802
Pass hook dependencies as the first function argument ( #2861 )
...
* Add use_effect_with
* Fix doc
* Add NeverEq
* Save as deps-and-runner
* remove with_deps
* fix other use_effect_with_deps
* add migration guide
* fix website
* fix doc test
* return use_effect_base
* fix docs
* fmt
* fix doc tests
* noeq
* use_callback
* finsihing touches
* fmt
* nighly fmt
* fix mistake
---------
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
2023-04-03 19:15:11 +03:00
Greg Johnston
bdf5712d96
Incremental performance improvements to element creation ( #3169 )
...
* enable interning
* intern tag names
* intern attribute keys and event listener types
* intern attribute values
* cache and clone elements
* clean up the node cloning version a bit
* use HashMap instead of Vec for element cache
* Revert "intern attribute values"
This reverts commit 28653c4660dcf1942fab3b0ad7d4c840b96e0f2a.
* add `enable-interning` feature to Yew that activates the same in wasm-bindgen
* remove interning feature
2023-04-02 22:29:21 +03:00
Kaede Hoshikawa
9d7fafa3ff
Make VList's children Rc'ed ( #3050 )
...
* Make VList's children Rc'ed.
* Slightly optimise for bundle size.
* Revert manual cloning.
* Add a benchmark.
* Revert "Revert manual cloning."
This reverts commit 1f737f26f85a13e49186df71eb41425387f3aa02.
* Revert "Slightly optimise for bundle size."
This reverts commit 71cf2a1d36f1a99463c68aae3d128aa3be93dc03.
* Add size marker.
* Revert "Add size marker."
This reverts commit 3ca55be4ea309f516d91ecd8e2aa8256dd810d11.
* Update benchmark.
* Fix children_mut visibility.
* Try to exclude add_child behaviour.
* Fix typo.
* Adjust visibility and docs.
* Fix hydration with empty children.
2023-04-02 23:51:59 +09:00
dependabot[bot]
138a74ffc7
Bump serde from 1.0.158 to 1.0.159 ( #3192 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.158 to 1.0.159.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.158...v1.0.159 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-02 01:17:49 +03:00
Muhammad Hamza
cc9dd0271e
Update dependencies ( #3171 )
...
* Update to syn 2
* bless macro outputs
* update prettyplease
* fix review + update lockfile
2023-03-28 19:41:55 +09:00
Jonas Scholz
b85313b2a2
Add MathML support + test. ( #3121 )
...
Co-authored-by: Jonas Scholz <jonas.scholz123@gmail.com>
2023-03-18 13:59:17 +05:00
dependabot[bot]
d63a91c08a
Bump tokio from 1.25.0 to 1.26.0 ( #3146 )
2023-03-05 10:11:47 +09:00
dependabot[bot]
532b0c7a7d
Bump base64ct from 1.5.3 to 1.6.0 ( #3144 )
2023-03-05 10:11:18 +09:00
Vlad Beskrovny
c7b7e45e4c
Implement component name completion in html! for IntelliJ Rust plugin ( #2972 )
2023-02-02 22:36:51 +09:00
Cecile Tonglet
bff497e002
Pass string types to Html props ( #2872 )
...
* Pass string types to Html props
* Not sure why passing None explicitly here...
* Update test stderr
2023-02-02 20:00:51 +09:00
Kaede Hoshikawa
65b930acb6
Deduplicate suspensions when considering subsequent renders for suspensions ( #3099 )
...
* FIx duplicate suspension.
* Fix tests.
* Fix tests.
* Fix tests.
2023-02-01 22:04:43 +05:00
Kaede Hoshikawa
456a05ba40
Fix clippy for 1.67 ( #3100 )
...
* Fix clippy for 1.67
* Fix trybuild.
2023-02-01 21:57:05 +05:00
WorldSEnder
c5ffe601f2
Implement an internal DomSlot for positioning instead of NodeRef ( #3048 )
...
use instead of NodeRef, decoupling the two
fixes #3043
* implement internal DomSlot
* move DomSlot into submodule of dom_bundle
* hide behind feature csr
* add test cases
* write get in continuation style, this saves a clone
* private DomSlot::get
2023-01-09 15:08:08 +01:00
Kaede Hoshikawa
b55be12d3c
Prefer pop_first if it is available ( #3084 )
2023-01-08 23:09:49 +09:00
Cecile Tonglet
d4c2f03c3d
Add method map() on Children to wrap easily ( #3039 )
2023-01-05 11:30:05 +01:00
Kai Salmon
1542e2b181
Only handle "normal" clicks on <Link>s ( #3056 )
...
* Fixing https://github.com/yewstack/yew/issues/2911
Prevents Link onclick behaviour from executing if the Ctrl key (for
Windows and Linux) or Meta Key (For Mac) is pressed.
This technically introduces a bug that means that links will reload the
page on windows machines when the windows key is held down. However,
this error is also in React Router, so I think we can get away with it.
See:
11156ac7f3/packages/react-router-dom/dom.ts (L29)
* Router Links now use default browser behaviour for alt and shift keys.
This change is inspired by 11156ac7f3/packages/react-router-dom/dom.ts (L29)
This allows uses to shift click links to save whatever the link points
at, and alt click on links to open them in new windows
2022-12-22 21:38:26 +01:00
WorldSEnder
aebd225963
Reentrant event listeners ( #3037 )
...
* add test case for reentrent event listeners
* use Fn to allow reentrent event listeners
2022-12-21 01:57:55 +00:00
Cecile Tonglet
d14fcd2e2d
Add impl IntoIterator on &Classes ( #3038 )
2022-12-14 02:07:16 +05:00
WorldSEnder
57f45e2c81
Assert there are no circular references ( #3025 )
...
* assert there are no circular references
the check is costly in release builds and should always fail
note that the current PartialEq impl is *not* symmetric!
should be fixed as well, with an improved design
* remove internal test for cyclic node refs
wasm_bindgen does not yet support #[should_panic]
see also https://github.com/rustwasm/wasm-bindgen/issues/2286
2022-12-10 16:36:59 +01:00
WorldSEnder
d7f988055f
Fix top-level reconciliation in portals ( #3020 )
2022-12-10 14:42:53 +01:00
Cecile Tonglet
772763c2e2
Make Classes cheap to clone ( #3021 )
...
* Use AttrValue instead of Cow in Classes
* Wrap indexset into Rc
* Impl ImplicitClone for Classes
* clippy
* Trigger CI
* Update macro stderr
* Copy optimization made for String to AttrValue
* Update macro stderr again
2022-12-10 18:02:36 +05:00
WorldSEnder
9e980a36b4
Fix clippy::let_unit_value lint in propless components ( #2970 )
2022-12-09 00:10:22 +05:00
IchHabeKeineNamen
77b0d40455
fix: dead links ( #3013 )
2022-12-06 06:31:35 +00:00
GitHub Action
17f125c9ec
(cargo-release) version {{crate_name}}-v{{version}}
2022-11-28 19:14:03 +00:00
Julius Lungys
2fcb2a32bd
Add yew-agent repository, homepage, documentation ( #2985 )
2022-11-28 20:01:39 +02:00
GitHub Action
e32d8bd8bb
(cargo-release) version {{crate_name}}-v{{version}}
2022-11-25 18:28:11 +05:00
GitHub Action
05d2ec4434
(cargo-release) version {{crate_name}}-v{{version}}
2022-11-25 18:28:11 +05:00
GitHub Action
09a7f2f457
(cargo-release) version {{crate_name}}-v{{version}}
2022-11-25 18:28:11 +05:00
GitHub Action
1bbe75ec9b
(cargo-release) version {{crate_name}}-v{{version}}
2022-11-25 18:28:11 +05:00
Muhammad Hamza
f0209c786f
Prepare for Yew 0.20 ( #2973 )
...
* 0.20 Changelog
* Improve changelog generator
* Add blog post
* Add blog post
* Apply suggestions from code review
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
* update Changelog
* update Cargo.toml
* changelog gen compiles
* website version 0.20
* add migration guides
* prettier
* i18n
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
2022-11-25 15:19:07 +05:00