mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Update changelog format and add 0.8 changelog (#575)
This commit is contained in:
parent
c3d270c7d2
commit
b1f3992adc
165
CHANGELOG.md
165
CHANGELOG.md
@ -1,69 +1,146 @@
|
||||
# Changelog
|
||||
|
||||
## 0.6 - unreleased
|
||||
## ✨ **0.8** *(2019-08-10)*
|
||||
|
||||
### Breaking changes
|
||||
***Props! Props! Props!***
|
||||
|
||||
### New features
|
||||
This release introduces a more developer friendly way to handle your `Component` props. Use the new `#[derive(Properties)]` macro to beef up your props! Property values can now be annotated as `#[props(required)]` which will enforce that props are present at compile time. This means that your props struct no longer needs to implement `Default`, so time to clean up all of those prop values you wrapped in `Option` to have a default value.
|
||||
|
||||
- Added `start_app` method. It's a shortcut to initialize a component and mount it to the body.
|
||||
- #### ⚡️ Features
|
||||
|
||||
- Added handling of files of `input` element. There is new `ChangeData::Files` variant
|
||||
of `onchange` handler.
|
||||
- `html!` - Self-closing html tags can now be used: `<div class="marker" />` [[@totorigolo], [#523](https://github.com/yewstack/yew/pull/523)]
|
||||
- `html!` - SVG name-spaced tags are now supported! [[@jstarry], [#550](https://github.com/yewstack/yew/pull/550)]
|
||||
- Properties can now be required at compile time [[@jstarry], [#553](https://github.com/yewstack/yew/pull/525)]
|
||||
- App components can now be mounted with properties [[@jstarry], [#567](https://github.com/yewstack/yew/pull/567)]
|
||||
- Apps can now be mounted as the `<body>` tag [[@jstarry], [@kellytk], [#540](https://github.com/yewstack/yew/pull/540)]
|
||||
- Content editable elements can now trigger `oninput` events [[@tiziano88], [#549](https://github.com/yewstack/yew/pull/549)]
|
||||
|
||||
- Added `ReaderService` to read data from `File` instances. It supports two methods: `read_file`
|
||||
to read an entire file at a time and `read_file_by_chunks` to read a file by small pieces of data.
|
||||
- #### 🛠 Fixes
|
||||
|
||||
- New example `file_upload` that prints sizes of uploaded files.
|
||||
- `html!` - Class name order is now preserved which unlocks the use of Semantic UI [[@charvp], [#424](https://github.com/yewstack/yew/pull/424)]
|
||||
- `html!` - Dashed tag names and properties are supported [[@jstarry], [#512](https://github.com/yewstack/yew/pull/512), [#550](https://github.com/yewstack/yew/pull/550)]
|
||||
- `html!` - All rust keywords can be used as tag attributes [[@jstarry], [#550](https://github.com/yewstack/yew/pull/550)]
|
||||
- `html!` - Support `Callback` closure with explicit return type [[@totorigolo], [#564](https://github.com/yewstack/yew/pull/564)]
|
||||
- `html!` - Fixed edge case where `>` token would break parser [[@totorigolo], [#565](https://github.com/yewstack/yew/pull/565)]
|
||||
- Performance improvement to the diff engine [[@totorigolo], [#539](https://github.com/yewstack/yew/pull/539)]
|
||||
- `Properties` no longer need to implement the `PartialEq`, `Clone`, or `Default` traits [[@jstarry], [#553](https://github.com/yewstack/yew/pull/553)]
|
||||
- `Component` will not panic if the `change` method is unimplemented [[@jstarry], [#554](https://github.com/yewstack/yew/pull/554)]
|
||||
|
||||
### Bug fixes
|
||||
- #### 🚨 Breaking changes
|
||||
|
||||
- It was impossible to set `value` attribute for any tag instead of `option`, because it used
|
||||
- The `Component::Properties` associated type must implement the new `Properties` trait [[@jstarry], [#553](https://github.com/yewstack/yew/pull/553)]
|
||||
|
||||
The new `Properties` trait is what powers the ability to check required props are present at compile time. Use the derive props macro to implement automatically.
|
||||
|
||||
```rust
|
||||
use yew::Properties;
|
||||
|
||||
#[derive(Properties)]
|
||||
pub struct Props {
|
||||
#[props(required)]
|
||||
pub value: MyStruct,
|
||||
}
|
||||
```
|
||||
|
||||
- `Callback` props no longer transform into `Option` types [[@jstarry], [#553](https://github.com/yewstack/yew/pull/553)]
|
||||
|
||||
```rust
|
||||
html! { <Button on_click=Msg::Click /> }
|
||||
```
|
||||
|
||||
***before:***
|
||||
|
||||
```rust
|
||||
#[derive(PartialEq, Clone, Default)]
|
||||
pub struct Props {
|
||||
on_click: Option<Callback<()>>,
|
||||
}
|
||||
```
|
||||
|
||||
***after:*** *note the `#[props(required)]` attribute*
|
||||
|
||||
```rust
|
||||
#[derive(PartialEq, Properties)]
|
||||
pub struct Props {
|
||||
#[props(required)]
|
||||
on_click: Callback<()>,
|
||||
}
|
||||
```
|
||||
|
||||
## ✨ **0.7** *(2019-07-19)*
|
||||
|
||||
***Commas? We don't need no stinkin' commas!***
|
||||
|
||||
This release brings a new and improved `html!` macro for writing JSX-like syntax. Commas and colons are no longer necessary now that the macro is written as a procedural macro.
|
||||
|
||||
- #### ⚡️ Features
|
||||
- `html!{}` is now valid syntax and can be used to render nothing [[@jstarry], [#500](https://github.com/yewstack/yew/pull/500)]
|
||||
- Apps can now be built without `cargo-web` using `wasm-bindgen` [[@jstarry], [#497](https://github.com/yewstack/yew/pull/497)]
|
||||
- `Callback` now implements `Debug` [[@DenisKolodin], [#485](https://github.com/yewstack/yew/pull/485)]
|
||||
- New utility method for getting the `host` of the current page [[@DenisKolodin], [#509](https://github.com/yewstack/yew/pull/509)]
|
||||
|
||||
- #### 🛠 Fixes
|
||||
- `html!` - Commas are no longer necessary for splitting up attributes [[@jstarry], [#500](https://github.com/yewstack/yew/pull/500)]
|
||||
- `html!` - Colons are no longer necessary for denoting a `Component` tag [[@jstarry], [#500](https://github.com/yewstack/yew/pull/500)]
|
||||
- Textarea value can be now be set: `<textarea value="content">` [[@DenisKolodin], [#476](https://github.com/yewstack/yew/pull/476)]
|
||||
- changed `StorageService::restore` to take an immutable receiver [[@dermetfan], [#480](https://github.com/yewstack/yew/pull/480)]
|
||||
- Fixed a component rendering bug [[@jstarry], [#502](https://github.com/yewstack/yew/pull/502)]
|
||||
|
||||
## ✨ **0.6** *(2019-02-20)*
|
||||
|
||||
- #### ⚡️ Features
|
||||
- Added `start_app` convenience method for initializing the app and mounting it to the body [[@DenisKolodin], [#462](https://github.com/yewstack/yew/pull/462)]
|
||||
- Added handling of files of `input` element. There is now a `ChangeData::Files` variant for the `onchange` handler [[@DenisKolodin], [#464](https://github.com/yewstack/yew/pull/464)]
|
||||
- Added `ReaderService` to read data from `File` instances. [[@DenisKolodin], [#464](https://github.com/yewstack/yew/pull/464), [#468](https://github.com/yewstack/yew/pull/468)]
|
||||
|
||||
- #### 🛠 Fixes
|
||||
- It was impossible to set `value` attribute for any tag instead of `option`, because it used
|
||||
inner value of `VTag` to keep the value for `input` element. Now `value` attribute works
|
||||
for `options`, `progress` tags, etc.
|
||||
|
||||
## 0.5 - Released 2019-02-01
|
||||
|
||||
### Breaking changes
|
||||
- #### 🔮 Examples
|
||||
- New example `file_upload` that prints sizes of uploaded files [[@DenisKolodin], [#464](https://github.com/yewstack/yew/pull/464)]
|
||||
|
||||
- Context requirement removed. Not necessary to use `Component<CTX>` type parameter.
|
||||
Instead of a context a link to an environment provided with `Component::create` call.
|
||||
All examples had changed.
|
||||
## ✨ **0.5** *(2019-02-01)*
|
||||
|
||||
- `html!` macro adds `move` modifier and the type of event for every handler (#240). Use
|
||||
`<input oninput=|e| Msg::UpdateEvent(e.value), />` instead of obsolete
|
||||
`<input oninput=move |e: InputData| Msg::UpdateEvent(e.value), />`.
|
||||
**🎶 Secret Agent Man 🎶**
|
||||
|
||||
- `send_back` method requires a mutable reference to `self`. This was added to prevent creating
|
||||
callbacks in `view` implementations.
|
||||
This release introduces the concept of an `Agent`. Agents are separate activities which you could run in the same thread or in a separate thread. There are three types of agents `Context`, `Job`, `Public` described below. To connect to an agent use the `Worker::bridge` method and pass a link of component's environment to it.
|
||||
|
||||
### New features
|
||||
- #### ⚡️ Features
|
||||
- Introduced the concept of an `Agent` which can run processes in other contexts:
|
||||
- `Context` agent spawns once per thread
|
||||
- `Job` agent spawns for every bridge
|
||||
- `Public` agent spawns an agent in a separate thread (it uses [Web Workers API] under the hood).
|
||||
- Allow setting the whole properties struct of a component with `<Component: with props />`
|
||||
- `ComponentLink` now has a `send_self` method which allows components to update themselves [[@DenisKolodin], [#365](https://github.com/yewstack/yew/pull/365)]
|
||||
- All services are re-exported within the `yew::services` module.
|
||||
- `html!` macro supports multiple classes in a single string:
|
||||
`<a class="button is-primary",>`.
|
||||
- Added `FetchOptions` to allow setting `Credentials` of `fetch` request.
|
||||
- `FetchService` aborts requests using `AbortController`.
|
||||
- Added `SubmitEvent` with `onsubmit` rule.
|
||||
|
||||
- Added `Agent`s concept. Agents are separate activities which you could run in the same thread
|
||||
or in a separate thread. There is `Context` kind of agent that spawn context entities as many
|
||||
as you want and you have to interact with a context by a messages. To join an agent use
|
||||
`Worker::bridge` method and pass a link of component's environment to it.
|
||||
|
||||
- Added three types of agents: `Context` - spawns once per thread, `Job` - spawns for every bridge,
|
||||
`Public` - spawns an agent in a separate thread (it uses [Web Workers API] under the hood).
|
||||
- #### 🛠 Fixes
|
||||
|
||||
- Added `<Component: with props />` rule to set a whole struct as a properties of a component.
|
||||
- Bug with emscripten target `RuntimeError: index out of bounds` fixed with a new scheduler [[@DenisKolodin], [#272](https://github.com/yewstack/yew/pull/272)]
|
||||
|
||||
- All services are reexported within the `yew::services` module.
|
||||
- #### 🚨 Breaking changes
|
||||
- `send_back` method requires a mutable reference to `self`. This was added to prevent creating callbacks in `view` implementations. [[@DenisKolodin], [#367](https://github.com/yewstack/yew/pull/367)]
|
||||
- `Context` requirement removed. It's no longer necessary to use `Component<CTX>` type parameter. Instead, a link to the environment is provided with the `Component::create` call. [[@DenisKolodin], [#272](https://github.com/yewstack/yew/pull/272)]
|
||||
|
||||
- `html!` macro supports multiple classes in a single string. For example:
|
||||
`<a class="button is-primary",>{ "Send" }</a>`.
|
||||
|
||||
- Added `FetchOptions` to set `Credentials` of `fetch` request.
|
||||
|
||||
- `FetchService` aborts requests using `AbortController`.
|
||||
|
||||
- Added `SubmitEvent` with `onsubmit` rule.
|
||||
|
||||
- Added `send_self` method to `ComponentLink` to send messages itself immediately.
|
||||
## ✨ **0.4** *(2018-06-01)*
|
||||
## ✨ **0.3** *(2018-04-23)*
|
||||
## ✨ **0.2** *(2018-01-08)*
|
||||
## ✨ **0.1** *(2017-12-31)*
|
||||
|
||||
[Web Workers API]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- Bug with emscripten target `RuntimeError: index out of bounds` (#220) fixed with a new scheduler.
|
||||
[@charvp]: https://github.com/charvp
|
||||
[@DenisKolodin]: https://github.com/DenisKolodin
|
||||
[@dermetfan]: https://github.com/dermetfan
|
||||
[@jstarry]: https://github.com/jstarry
|
||||
[@kellytk]: https://github.com/kellytk
|
||||
[@tiziano88]: https://github.com/tiziano88
|
||||
[@totorigolo]: https://github.com/totorigolo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user