From 84a8cd6c168ae3598cd35d5ac800cb856cb1bfeb Mon Sep 17 00:00:00 2001 From: David O'Connor Date: Sun, 28 Jul 2019 21:09:19 +0400 Subject: [PATCH] v.0.4.0 release --- CHANGELOG.md | 11 +++++++++++ README.md | 8 ++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6a2579d2..e653d7717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,17 @@ - `ElContainer`, imported in prelude, renamed to `View`. (Breaking) - Internal refactor of `El`: Now wrapped in `Node`, along with `Empty` and `Text`. Creation macros return `Node(Element)`. (Breaking) +- Changed the way special attributes like `disabled`, `autofocus`, and +`checked` are handled (Breaking) +- `MessageMapper` now accepts closures +- `Orders` is a trait now instead of a struct. (Breaking) +- Significant changes to MessageMapper +- Orders has new methods, `clone_app` and `msg_mapper` which can allow access to app instance. - Added more SVG element macros - Several minor bux fixes +- Examples updated to reflect these changes +- Improvements to Fetch API, especially regarding error handling +and deserialization ## v0.3.7 - `routes` now accepts `Url` instead of `&Url` (Breaking) @@ -31,6 +40,8 @@ especially for animations - Styles no longer implicitly add `px`. Added `unit!` macro in its place - `Map` can now be used directly in elements, without needing to annotate type and collect (ie for child `Elements`, and `Listener`s) +- Significant changes to MessageMapper +- Orders hs new methods, `clone_app` and `msg_mapper` that allow access to app instance. - Fixed a bug where `empty` elements at the top-level were rendering in the wrong order - Added an `empty!` macro, which is similar to `seed::empty` - Attributes and style now retain order diff --git a/README.md b/README.md index 3330f1cac..b9b9b7b04 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ And cargo-make: `cargo install --force cargo-make` To start, clone [the quickstart repo](https://github.com/David-OConnor/seed-quickstart): `git clone https://github.com/david-oconnor/seed-quickstart.git`, -run `cargo make all` in a terminal to build the app, and `cargo make serve` to start a dev server +run `cargo make build` in a terminal to build the app, and `cargo make serve` to start a dev server on `127.0.0.0:8000`. If you'd like the compiler automatically check and recompile when you make changes, run `cargo make watch` instead of `cargo make all`. @@ -122,7 +122,7 @@ enum Msg { } /// How we update the model -fn update(msg: Msg, model: &mut Model, _orders: &mut impl Orders) { +fn update(msg: Msg, model: &mut Model, _orders: &mut Orders) { match msg { Msg::Increment => model.count += 1, Msg::Decrement => model.count -= 1, @@ -182,7 +182,7 @@ fn view(model: &Model) -> impl View { #[wasm_bindgen(start)] pub fn render() { - seed::App::build(|_,_| Model::default(), update, view) + seed::App::build(Model::default(), update, view) .finish() .run(); } @@ -192,7 +192,7 @@ For a truly minimimal example, see [lib.rs in the quickstart repo](https://githu ## Building and running -To build your app, run `cargo make all`, and to host on a dev server, run `cargo make serve`. +To build your app, run `cargo make build`, and to host on a dev server, run `cargo make serve`. For a more robust starting setup, check out Martin Kavik's [seed-quickstart-webpack repo](https://github.com/MartinKavik/seed-quickstart-webpack).