8.6 KiB
Changelog
✨ 0.9 (TBD)
-
⚡️ Features
- The derive props macro now supports Properties with lifetimes [@jstarry, #580]
- New
ResizeServicefor registering forwindowsize updates [@hgzimmerman, #577]
-
🛠 Fixes
-
🚨 Breaking changes
✨ 0.8 (2019-08-10)
Props! Props! Props!
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.
-
⚡️ Features
html!- Self-closing html tags can now be used:<div class="marker" />[@totorigolo, #523]html!- SVG name-spaced tags are now supported! [@jstarry, #550]- Properties can now be required at compile time [@jstarry, #553]
- App components can now be mounted with properties [@jstarry, #567]
- Apps can now be mounted as the
<body>tag [@jstarry, @kellytk, #540] - Content editable elements can now trigger
oninputevents [@tiziano88, #549]
-
🛠 Fixes
html!- Class name order is now preserved which unlocks the use of Semantic UI [@charvp, #424]html!- Dashed tag names and properties are supported [@jstarry, #512, #550]html!- All rust keywords can be used as tag attributes [@jstarry, #550]html!- SupportCallbackclosure with explicit return type [@totorigolo, #564]html!- Fixed edge case where>token would break parser [@totorigolo, #565]- Performance improvement to the diff engine [@totorigolo, #539]
Propertiesno longer need to implement thePartialEq,Clone, orDefaulttraits [@jstarry, #553]Componentwill not panic if thechangemethod is unimplemented [@jstarry, #554]
-
🚨 Breaking changes
-
The
Component::Propertiesassociated type must implement the newPropertiestrait [@jstarry, #553]The new
Propertiestrait is what powers the ability to check required props are present at compile time. Use the derive props macro to implement automatically.use yew::Properties; #[derive(Properties)] pub struct Props { #[props(required)] pub value: MyStruct, } -
Callbackprops no longer transform intoOptiontypes [@jstarry, #553]html! { <Button on_click=Msg::Click /> }before:
#[derive(PartialEq, Clone, Default)] pub struct Props { on_click: Option<Callback<()>>, }after: note the
#[props(required)]attribute#[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]- Apps can now be built without
cargo-webusingwasm-bindgen[@jstarry, #497] Callbacknow implementsDebug[@DenisKolodin, #485]- New utility method for getting the
hostof the current page [@DenisKolodin, #509]
-
🛠 Fixes
html!- Commas are no longer necessary for splitting up attributes [@jstarry, #500]html!- Colons are no longer necessary for denoting aComponenttag [@jstarry, #500]- Textarea value can be now be set:
<textarea value="content">[@DenisKolodin, #476] - changed
StorageService::restoreto take an immutable receiver [@dermetfan, #480] - Fixed a component rendering bug [@jstarry, #502]
✨ 0.6 (2019-02-20)
-
⚡️ Features
- Added
start_appconvenience method for initializing the app and mounting it to the body [@DenisKolodin, #462] - Added handling of files of
inputelement. There is now aChangeData::Filesvariant for theonchangehandler [@DenisKolodin, #464] - Added
ReaderServiceto read data fromFileinstances. [@DenisKolodin, #464, #468]
- Added
-
🛠 Fixes
- It was impossible to set
valueattribute for any tag instead ofoption, because it used inner value ofVTagto keep the value forinputelement. Nowvalueattribute works foroptions,progresstags, etc.
- It was impossible to set
-
🔮 Examples
- New example
file_uploadthat prints sizes of uploaded files [@DenisKolodin, #464]
- New example
✨ 0.5 (2019-02-01)
🎶 Secret Agent Man 🎶
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.
-
⚡️ Features
- Introduced the concept of an
Agentwhich can run processes in other contexts:Contextagent spawns once per threadJobagent spawns for every bridgePublicagent 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 /> ComponentLinknow has asend_selfmethod which allows components to update themselves [@DenisKolodin, #365]- All services are re-exported within the
yew::servicesmodule. html!macro supports multiple classes in a single string:<a class="button is-primary",>.- Added
FetchOptionsto allow settingCredentialsoffetchrequest. FetchServiceaborts requests usingAbortController.- Added
SubmitEventwithonsubmitrule.
- Introduced the concept of an
-
🛠 Fixes
- Bug with emscripten target
RuntimeError: index out of boundsfixed with a new scheduler [@DenisKolodin, #272]
- Bug with emscripten target
-
🚨 Breaking changes
send_backmethod requires a mutable reference toself. This was added to prevent creating callbacks inviewimplementations. [@DenisKolodin, #367]Contextrequirement removed. It's no longer necessary to useComponent<CTX>type parameter. Instead, a link to the environment is provided with theComponent::createcall. [@DenisKolodin, #272]