Commit Graph

158 Commits

Author SHA1 Message Date
Tim Kurdov 0091679779
Make `<textarea>` a void element (#3465)
* made <textarea> a void element
* added defaultvalue special attr to <textarea>
* updated error message when trying to pass children to textarea

* updated docs, fixed formatting
* fixed hydration test
* fixed suspense test
* fixed heading in docs
* fixed clippy warnings
* fixed SSR, added SSR test for precedence of value over defaultvalue
* fixing wasm-bindgen-test screwups & replacing deprecated function use
2025-02-20 18:13:07 +00:00
WorldSEnder 3871418174
Modernize github workflows (#3711)
* modernize github workflows

this mainly fixes some inconsistencies in style, outdated or wrong comments and action version
- replace Legit-Labs/action-download-artifact with actions/download-artifact
- fix Swatinem/rust-cache arguments
- fix benchmark transformations
- expand feature soundness lints
- wording and capitalization in comments

* fix no_run on crate level doc

* fix some more small issues
2024-08-22 20:04:04 +05:00
Elina 37e668b19b
Fix CI for 1.80 (#3691)
* fix rust 1.80 lints

* attempt to fix benchmark ci
2024-07-25 20:33:14 +05: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
Kaede Hoshikawa 08f4fd3032
Fix Dependabot and GitHub Actions (#3111) 2023-03-05 07:03:10 +09:00
Kaede Hoshikawa 924792c002
Enable Dependabot for Examples and Tools (#2785)
* Enable dependabot for examples and tools.

* Make everything to use Gloo.

* Require features for binaries.

* Update every Friday.
2022-07-21 01:23:22 +09:00
Muhammad Hamza 2e4a919679
Split the huge workspace into smaller & improve CI (#2774)
* Split repository into multiple workspaces, update CI

* pull_request_target for build-website workflow

This should allow the workflow to read secrets instead of requiring a different, publish-website workflow to be needed to publish the side

* pull_request_target for build-api-docs workflow

This should allow the workflow to read secrets instead of requiring a different, publish-api-docs workflow to be needed to publish the side

* use `paths` instead of `path_ignore` for examples

* cleanup main-checks.yml

* it's rustfmt, not fmt

* correct paths for workflow files

* it's rustfmt, not fmt: part 2 electric bolgoo

* me idiot: part infinity

* ???

* main checks should be the same then?

* ??? part 2

* it should work now

* more fixes

* checkout before using file, actually use stable for wasm-bindgen-cli

* Revert "pull_request_target for build-api-docs workflow"

This reverts commit 38977292c8.

* Revert "pull_request_target for build-website workflow"

This reverts commit 1638a0cd24.

* Benchmark workflow uses pull_request event

* pull_request for size-cmp
2022-07-07 00:17:03 +05:00
Kaede Hoshikawa 7f5eb3890c
Streamed SSR Response (#2697)
* yew::platform?

* Stream Response.

* Migrate example

* Remove old implementation.

* Remove extra implementation.

* Prefer String instead of Cow.

* Fix MSRV.

* Fix trybuild.

* Optimise Memory Allocation.

* More optimisation.

* BufWriter.

* Fix tests.

* Optimise BufWriter.

* Remove more allocations.

* Allow setting of buffer capacity.

* Fix capacity size.

* Fix capacity size.

* Remove unneeded const notation.

* Fix macro tests.

* Slightly optimises BufWriter committing logic.

* Optimise Implementation.

* Move BufWriter to a separate file.

* Additional Implementation Note.

* Adjust API so it matches `std::channel::mpsc::channel`.

* Fix feature soundness.

* Make a compatibility layer on channels.

* Fix clippy.

* Fix feature soundness.

* Fix CI.

* Inlining.

* Add documentation.

* Punctuation.

* Switch to tokio channel.

* Remvoe pin-project.

* Fix feature soundness.

* Typo.

* Move io to platform.

* Tokio does not compile.

* Fix workflow.

* Restore wrongly removed docs.

* Does tokio work?

* Switch back to tokio.

* Remove pin-project.

* Use cargo resolver 2.

* Add panic notice.

* Update documentation.

* Properties does not have to be send.

* Fix capacity checking as pointed in the review.

* Implementation order.

* Update note.
2022-07-01 14:26:12 +05:00
Cecile Tonglet 7ddf26752f
Introduce immutable string, array and map (#2563) 2022-06-24 16:58:20 +01:00
Muhammad Hamza 31594245ef
Update examples and their builds in CI (#2652)
- Remove agents example
- Agents example is replaced by web_worker_fib as they both serve the same purpose now that trunk 0.15 has been released
- Clean up CI setup and ensure that examples are deployed in publish-examples.yml as they're built in size-cmp.yml
2022-05-03 16:08:05 +05:00
Muhammad Hamza 653aa542b3
Don't use wasm-pack in CI (#2648)
* don't use wasm-pack for wasm tests

* use proper version of wasm-bindgen-cli

* also run with chrome driver

* use cargo pkgid
2022-04-29 14:50:34 +02:00
zahash 73771562c2
simple counter application with functional components (#2603)
* simple counter application with functional components

* clean up some comments

* use the word 'function' instead of 'functional'

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>

* add the counter functional example package to workspace root cargo toml

* add data-trunk link tag in index html

* include counter functional into the examples readme file

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
2022-04-12 15:54:15 +05:00
Kaede Hoshikawa e46ae55cab
SSR Hydration (#2552)
* Bring changes to this branch.

* Add feature hydration.

* Hydrate text.

* Hydrate tag.

* Hydrate node.

* Hydrate List.

* Hydrate Suspense.

* Hydrate component.

* Renderer::hydrate.

* Add example and tests.

* Fix comp_id.

* Move some code away from generics.

* Fix everything.

* trybuild?

* Collectable!

* Phantom component.

* Migrate docs as well.

* Update example.

* Fix docs and improve debug message.

* Minor fixing.

* Add hydration to feature soundness check.

* Fix name in debug.

* Remove Shift.

* Remove comment.

* Adjust readme.

* Update website/docs/advanced-topics/server-side-rendering.md

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>

* Update packages/yew/src/dom_bundle/bnode.rs

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>

* Update packages/yew/src/dom_bundle/bnode.rs

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>

* Once via structopt, now direct clap.

* Fix docs and empty fragment.

* Remove struct component warning.

* Move function router into a separate binary.

* Optimise Code Logic.

* Fix condition.

* Fix rendering behaviour.

* Fix comment.

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
2022-04-03 08:00:16 +09:00
Kaede Hoshikawa 839a7965ad
Function Router Example (#2494)
* Move example from #2453.

* Add implementation note.

* Update Implementation Note.
2022-03-07 18:38:22 +05:00
Matt 6669d1873e
Optimize CI caching and path filtering (#2340)
* fix docs.rs logo url

* fix formatting

* bump docusaurus to beta14

* bring back the semicolon

* cache npm for build-website workflow

* Add prebuilt cargo-sweep binary

* Optimize website CI

* per-job caching, stale cache invalidation

* extract fmt job as workflow
move website test as a prerequisite for publish

* fix typo in cargo-sweep executable path

* chmod +x

* rename to main-checks.yml

* --exclude has to be used with --workspace

* revert accidental revert

* Switch from cargo-sweep to rust-cache

* link to this related issue of extra brackets

* remove blanks

* exclude website-test in main tests

* rename suffixes from .mdx to .md

* replace actions-rs/install with wasm-pack-action

fixes #2351

* shouldn't ignore .md because website snippet tests depends on .md files and there can be
#[doc(include("../some.md"))] in the code

* restore accidentally deleted mdx files

* include tools/website-test (for real this time)
2022-01-18 10:49:11 +01:00
Kaede Hoshikawa d8c2550fc7
Server-side Rendering (without hydration) (#2335)
* Basic render to html implementation.

* Remove HtmlWriter.

* Escape html content.

* Add non-suspense tests.

* Add Suspense tests.

* Gated "ssr" feature.

* Add example.

* Fix tests.

* Fix docs.

* Fix heading size.

* Remove the unused YewRenderer.

* Remove extra comment.

* unify naming.

* Update docs.

* Update docs.

* Update docs.

* Isolate spawn_local.

* Add doc flags.

* Add ssr feature to docs.

* Move ServerRenderer into their own file.

* Fix docs.

* Update features and docs.

* Fix example.

* Adjust comment position.

* Fix effects being wrongly called when a component is suspended.

* Fix clippy.

* Uuid & no double boxing.

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
2022-01-12 18:43:09 +05:00
Howard.Zuo fff1ffaab8
Example of function memory game (#2255)
* example of function memory game

* refactor: remove unnecessary manual PartialEq implementation

* refactor: remove unnecessary license note

* refactor: update implementation and doc with suggestions

* refactor: fix format and lint issues
2022-01-12 18:40:38 +05:00
Julius Lungys 4be9308b84
Benchmarks completely redone (#2352) 2022-01-10 22:24:53 +05:00
Kaede Hoshikawa ac3af0a9bc
Suspense Support (#2212)
* Make Html a Result.

* Fix tests.

* Implement Suspense.

* Schedule render when suspension is resumed.

* Shift children into a detached node.

* styled example.

* Update wording a little bit.

* Move hint to hint.

* Add some tests.

* Fix clippy.

* Add docs.

* Add to sidebar.

* Fix syntax highlight.

* Component -> BaseComponent.

* Html -> VNode, HtmlResult = RenderResult<Html>.

* Suspendible Function Component.

* Add a method to create suspension from futures.

* Revert extra changes.

* Fix tests.

* Update documentation.

* Switch to custom trait to make test reliable.

* Fix file permission.

* Fix docs.

* Remove log.

* Fix file permission.

* Fix component name error.

* Make Suspension a future.
2022-01-05 18:16:34 +05:00
Kaede Hoshikawa 7d52858d01
Remove context & job agent (#2295)
* Remove context and job agent.

* Revert "Remove context and job agent."

This reverts commit 408f6fcdf0.

* Revert "Revert "Remove context and job agent.""

This reverts commit 44a42dfb31.

* Update example.

* Fix docs.

* Fix test.

* Rename examples.

* Fix examples & docs.

* Update website/docs/concepts/function-components/custom-hooks.mdx

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>

* Examples in alphabetical order.

Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
2021-12-29 17:15:26 +05:00
Julius Lungys f749ca3c83
Move/Remove tools (#2274)
* move tools

* delete yew-validation

* update paths

* fix cargo.toml
2021-12-15 22:53:01 +01:00
Julius Lungys c0f584c761
Add multithreading example (#2171)
* correctly reflect the status of multi_thread example

* commiting a partially working example ported from 0.18 to next

* make the app actually start

* remove example from github workflows

* rust-fmt

* cargo make pr-flow done succesfully :)

* update per comments

* fix build errors

* fix cargo fmt

* fix stuff

* Apply suggestions from code review

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

* Update examples/web_worker_fib/src/app.rs

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

* Remove space

* Update .github/workflows/publish-examples.yml

Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>

Co-authored-by: SpanishPear <shrey.somaiya@gmail.com>
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>
2021-11-23 11:05:01 +00:00
Philip Peterson 1f03a04a23
Replace `crm` example with `password strength` to show controlled components (#1706)
* Remove crm example

* Add password_strength example

* Update README

* Remove .DS_Store

* Update README

* Cargo fmt

* Apply suggestions from code review

* Update list of examples

* update the pr to work with latest master

* fix readme

* add newline

Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
2021-11-20 21:43:30 +02:00
WorldSEnder aa9b9b266c
Implementation of portals (#2147)
* initial poc implementation of portals

* add new_before

* add portals example

* add shadow dom example

* add english website documentation
2021-11-16 16:48:04 +01:00
Drew Hutton (Yoroshi) 05728e1001
Add Function Components Example (#2088)
* feat(examples): add function components todo example

* chore(examples): apply feedback for function components example

* chore(examples): apply more feedback for function components example

* feat(examples): implement custom hook for edit boolean toggle

* chore(examples): prep for merge, add more documentation

* chore(examples): add more descriptive comment to function component hook, fix cargo.toml
2021-10-16 20:05:06 +01:00
mc1098 ed2e1ea00e
Add testing for website code blocks (#2014)
* Add doc-test to test website code snippets

Heavily inspired by tokio-rs/website repo.

* Fix code snippets to pass doc tests

Some code snippets are explicitly ignored and some are not run
to avoid having to include dependencies for one liners.

* Add website code snippet tests to CI

* Fix CI

* Remove doc-test from workspace

* Exclude doc-test from workspace

* Refactor code snippets and tests

Code snippets can import types from doc_test crate i.e.:
```rust
use doc_test::agents::EventBus;
```
This allows for moving some boilerplate away from the example and still
checks that the code compiles correctly.

Also some slight changes to some of the examples and the information
about `ComponentLink` which is deprecated.

* Move doc-test to packages

* Rename doc-test crate to website-test

The new name makes it more clear the purpose of this crate.

* fix ci
2021-08-28 13:17:28 +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
Cecile Tonglet e99e83ad37 Helper to build changelog (#1845) 2021-06-05 23:00:58 +02:00
Muhammad Hamza af440761ed
Rewrite router (#1791)
* rewrite router

* add support for 404 routes

* support base urls

* parse query params

* don't use js snippets lol

* cleanup code, update example

* bruh fmt

* test router

* add more tests

* wasm_test feature, CI

* Add rustdocs

* update docs on website

* use enum for routes, add derive macro for it

* fix 404 handling

* fix tests

* formatting

* update docs, little cleanup

* fix example

* misc fixes

* add routable macro tests

* document routable macro, rustfmt

* fix test, add makefile

* Replace the children based API with callback based one

* update example

* update docs

* update Cargo.toml

* clippy & fmt

* cleanup code

* apply review

* more fixes from review

* fix warnings

* replace function component with struct component, update docs

* formatting

* use `href` getter instead of reading attribute

* apply review

* use serde to parse query parameters

* use js_sys::Array for search_params + formatting

* fix doc test

* Apply suggestions from code review

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

* Update docs/concepts/router.md

apply suggestion

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

* apply review (part 2)

* use serde for parsing query

* a more modular implementation

* docs for query parameters

* fix doc

* Apply suggestions from code review

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

* fixes (from review)

* formatting

* use new functions

* not_found returns `Option<Self>`, to_route -> to_path

* Apply suggestions from code review

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

* remove PartialEq + Clone bound

* docs

* fix example

Co-authored-by: Simon <simon@siku2.io>
2021-05-17 17:39:12 +02:00
Nicklas Warming Jacobsen 09a41d6903
Change the app struct to be a real handle to an Yew app instance and make it possible to destroy a running app (#1825)
* Naive implementation of destroy app

* Move functions get_component_link and destroy

The function get_component_link and destroy on App does not require
Component::Properties to be Default. So move them to their own impl
block.

* Change the fn signatures for the other mount fns too

* Add example of how to use the apps dynamically

* Rename example

* Change title of example html file

* Update examples/dyn_create_destroy_apps/src/counter.rs

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

* Change fn signatures of App to not take Self

* app.rs thorugh to public API: only make it possible to create an
instance of an App by mounting it. And only make it possible to mount
an App by creating it. This prevents double mounting.
* Change Scope::mount_in_place to take &self instead of self, because it
doesn't have too.

* Fix examples to compile with new App signature

* Fix tests to compile with new App signature

* Remove pub pulic App::mount* API

* Make the documentation compile again with the new start_app API

* Make the examples compile again with the new start_app API

* Make the yew packages compile again with the new start_app API

* rename module yew::app to yew::app_handle

* Fix identation in styling file for dyn_create_destroy_app ex

* Fix naming in examples/dyn_create_destroy_apps/README.md

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

* Use Self instead of AppHandle to create AppHandle

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

* Fix the start_app_in_body docs

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

* Remove comparison with Elm in the start_app docs

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

* Fix english in dyn_create_destroy_apps example

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

* Impl Deref instead of AsRef for AppHandle

* Formatting

* Remove AppHandle::new use Default trait instead

* Rename the Yew::start_app* function names

* Revert "Remove AppHandle::new use Default trait instead"

This reverts commit 97e4897c1e.

* remove default impl for AppHandle

* Make the tests compile again

* Make the examples compile again

* Add dyn_create_destroy_apps to examples/README.md

* Remove mount_to_body_with_props

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

* Use yew getters instead of query selectors

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

* Remove AppHandle::new

* Remove unused function

* code style fix

* Fix compile error

* Add func set_custom_panic_hook

This commit adds the function set_custom_panic_hook. In addition Yew
will now check if a custom panic is registered when one of start_app*
functions are called, if that is not the case a default panic hook is
registered.

* Fix docs for set_custom_panic_hook

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

Co-authored-by: Nicklas Warming Jacobsen <nwj@skybox.gg>
Co-authored-by: Simon <simon@siku2.io>
2021-05-17 13:43:06 +02:00
Justin Starry 5adb142be5
Add Makefile.toml for yew-services (#1713) 2021-01-23 23:57:33 +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
Muhammad Hamza 23a166b5d9
Add attribute for generating function components from functions (#1638)
* Add attribute macro for functional components

* make rustfmt happy

* add docstring for macro

* Add example for functional components

* make rustfmt and clippy happy

* oops

* https://tenor.com/view/come-on-brad-gregory-upset-freaking-out-overwhelmed-gif-17476366

* remove functional example

* remove useless feature, fix order of deps, fix docs

* various fixes

* make rustfmt happy

* oopsie

* bruh i forgot

* handle generics, box Block

* handle >1 parameters

* don't do `TokenStream1`, make rustfmt happy

* ensure const, async and extern functions can't be used, better error messages

* thanks rustfmt

* transparently consume FnArg

* add tests, fix error message

* seriously?

* fix these 2

* More test cases, better errors, formatting

* docs

* properly use #![no_implicit_prelude] for passing tests

* pass all attributes as is

* add Makefile.toml

* docs

* update test

* docs

* hooks docs

* Add docs for FunctionalProvider trait

* oopsie

* is this it?

* lets try this

* bruh moment

* better error message for bad return type, use function name for function struct,  fix order in dictionary.txt

* better error messages

* replace `function` with `functional`

* completely replace `function` with `functional`

* completely replace `functional` with `function`: part 2

Missed this in previous commit

* revert package/crate names back

* formatting + fix workflow

* proc macros are fragile

* fix what i broke

* fixes

* Update docs

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

* Improve examples in docs

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

* update how #[function_component(_)] is explained

* finish "macro" -> "attribute", docs updates

* move contribute note to the top

* update #[function_component(_)] docstring

* Update docs

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

* oops, missed this

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

* Move hello world to a more appropriate place

* forgot to update the stderr file

* apparently this example didn't compile

* improve example

Co-authored-by: Simon <simon@siku2.io>
2020-11-09 17:58:06 +01:00
Simon 5217ed9347
Use --public-url value in router example (#1597)
* Use --public-url value for router example

* some documentation
2020-10-02 01:11:55 +02:00
Simon c946b99610
Overhaul examples (#1559)
* remove old files

* update counter

* update crm example

* Add readme for counter

* update custom_components

* update webgl example

* update two_apps

* update todomvc

* mark special case multithread

* update dashboard

* update examples readme

* file_upload example

* fragments example

* futures example

* game_of_life example

* inner_html example

* js_callback example

* keyed_list example

* remove large_table

* remove minimal

* mount_point example

* I can't count apparently

* nested_list example

* node_refs example

* timer example

* store example

* pub_sub example

* rip npm_and_my_sanity

* use a title™️

* clean up multi_thread

* fix format

* boids part 1

* boids part 2

* add workflow

See: <https://github.com/siku2/yew/pull/13>

* remove my little scratchpad again

* add boids to examples table

* runtime-generated list in  nested_list example

* update workflow

* first batch of yewtil examples

* clippy "futures"

* remove old yew-router examples

* add a new router example to the main examples

* remove remaining yewtil examples

* more progress

* update for testing purposes

* author list

* improve content generation

* revert this mistake

I thought it would be great to use `unimplemented!()` in case the component doesn't have any properties.
This helps avoid the mistake of forgetting to update the change method when adding props later on.
What I didn't consider is that just because the props are () that doesn't mean that Yew isn't going to call it...
So yeah, it's still a good idea for update, but certainly not for change.

* missed a few

* turn router switch example into test

* seems to be working

* make it possible to host the router example on a sub-path

* create a 404 file for SPA

* remove the three examples and update table

* remove the 404 file because it isn't working anyway

* fix small router issue relating to the sub-path hack
2020-09-22 00:17:48 +02:00
Motoki saito 63b79bf213
Add boid example (#1540)
* It appears!

* boid example works well (#1539)

* remove clippy and fmt warnings (#1539)

* fix typo and remove vector.add, sub, mul (#1539)

* remove triangle

* rename the filename

* remove fmt errors

* define size square function (#1540)
2020-09-16 17:55:08 +02:00
Simon 55f7a42cbd
Move CI to GitHub Actions (#1474)
* clippy in tests

* add pull request workflow

* fix formatting

* add names to steps

* fix clippy

* update

* avoid mutable

* use wasm target

* install it too

* except there

* let's give chrome a spin

* clippy has some more to say

* only run specific tests

* fix tests on chrome

* add cache

* rename benchmark for consistency

* re-enable geckodriver

* clean up old files

* remove all mentions of Travis

* check all examples

* let's try with a bigger timeout

* test both browsers at the same time

* chrome really doesn't like me

* finish up

* run for pushes to master

* improve caching

* fix order in workspace members

* clippy use --all-targets

* rename workflow file

* Apply suggestions from code review

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* use stable toolchain for lints

* run lints on nightly too

* add doctest for yew-stdweb

* allow failure for nightly clippy steps

* let's try it on the job level again

* always run all lint steps

* only run lints on stable toolchain

* use 'no_run' instead of 'ignore'

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2020-08-15 22:32:19 +08:00
Philip Peterson 17fa773324
Add yew-validation crate (#1376)
* Add yew-validation crate

* Update description

* add test to run-tests.sh
2020-08-15 15:13:40 +08:00
Thomas Lacroix 429d9674af
Fix keyed list ordering issue (#1231)
* New example to showcase keyed elems reordering issue

* Allow building examples in release mode

* Fix ordering issue with keyed virtual nodes

* review comments for build.sh

* review comments for examples/keyed_list

* fix style.css to keyed_list example

* remove ahash

* Add GitHub issue to TODO in key.rs

* Address some review comments in virtual_dom

* New diffing algorithm for keyed vlists

* Add forgotten dependency for yew-stdweb

* Add tests for vlist diffing

* Removed VDiffNodePosition

* Fix usage of next_sibling for vlist

* Fix tests for stdweb

* Mitigate issue with moving VLists when children are all VLists

Note: The new UT is failing, I now. I want to discuss that before
maybe fixing it (moving all VList children?).

* Fix issue with inserting into vlist that is not last child

* Refactor VDiff trait to make way for keyed list fixes

* Fix quote_spanned macro invocations

* Revert some minor changes (style, Debug)

* Revert some minor changes (style, Debug)

* Fix self-referencing NodeRef issue

* All VList tests pass

* Fix algorithm choice in degenerated case

* Remove stdweb and non keyed tests

* Key from finite list of types

* WIP moving VList tests to diff_layouts

* Removed unnecessary Vec

* Fix VComp NodeRef self linking issue

* Add logs to diff_layouts tests

* WIP moving VList tests to diff_layouts

* WIP Failing test moving VComp

* Add VComp move_before

* Fix list component change method

* Fix bad merge

* Add more protection against node ref cycles

* Remove commented tests

* Feedback and clippy

* Failing test

* tests pass

Co-authored-by: Justin Starry <justin.starry@icloud.com>
2020-06-29 00:52:59 +08:00
Michal Kawalec 9130f814af
A stateful agent (#1247)
* first sketch of a stateful agent

* share the data with listeners only immutably

* rename the stateful agent to Store

* moved stuff around, fixed missing parts

* removed a useless directory

* fmt fixes

* added missing comments
2020-05-21 22:21:41 +08:00
Teymour Aldridge f8c6615a77
Separate out `yewtil::dsl` into `yew-dsl` (#1199)
* Separated out `yewtil::dsl` into `yew-dsl`

* Reformat code.

* Remove an unused import.

* Added some rudimentary documentation.

* Reformat code.

* Added default impl for vlist.

* Reformat code.
2020-05-11 20:57:41 +08:00
Justin Starry 6a6dbf7f84 Remove server projects from workspace 2020-05-01 12:15:57 +00:00
fbucek 528ec66fbc
updated examples, added build script (#1165)
* script for building examples

minimal example updated to work with wasm-pack
minimal_wb exampel to be used with wasm-bindgen directly

* minimal is wasm-bindgen as default ( wp wasm-pack )

* examples updated to work with wasm-bindgen

* script to run all yew/examples

* upated example doc, added script to multi-thread

* cargo fmt, disabled build_examples.sh

* one build.sh for examples, updated doc

* removed build size optimalization

* wasm-pack requirement info in lib.rs

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/readme.md

* Update examples/build.sh

Co-Authored-By: Justin Starry <justin.m.starry@gmail.com>

* Update examples/build.sh exit trap

Co-Authored-By: Justin Starry <justin.m.starry@gmail.com>

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2020-04-29 22:57:55 +08:00
Henry Zimmerman ac2e6420ea
Release v0.12 of Yew Router (#1135)
* Release v0.12 of Yew Router

* port router examples to web_sys

* fix minimal example
2020-04-27 11:41:12 +08:00
Justin Starry 8cda60dc99
Move components out of core crate (#1132) 2020-04-25 18:57:05 +08:00
Justin Starry f9a783c2ca
Upstream yewtil crate (#1119)
* Upstream yewtil crate

* cargo fmt

* cargo clippy

* cargo fmt
2020-04-25 17:01:50 +08:00
Justin Starry 9f286d126f
Upstream yew-router project (#1095)
* Add yew-router

* Add router examples

* Add CODEOWNERS
2020-04-23 21:50:01 +08:00
Justin Starry fa8a1d9f00
Reorganize examples and general repo layout (#1092)
* Reorganize crates

* Remove symlink

* Check examples

* Cleanup CI scripts

* nits

* cleanup

* cargo fmt

* Fix yew-stdweb

* cargo clippy --all

* stdweb-examples

* run_emscripten_checks.sh

* Fix typo

* fix typo

* yew-stdweb

* Run tests from yew-stdweb

* fix webgl script
2020-04-20 22:22:24 +08:00
Justin Starry 039c8603ae
Bump yew-macro version to 0.14.1 (#1070) 2020-04-04 14:06:27 +08:00
Justin Starry ef441684ad
Prep release for 0.14.3 (#1069) 2020-04-04 14:01:12 +08:00