Skip to content

Commit fd83a30

Browse files
authored
v0.8
Prepare v0.8 release (#473) * Add migration guide for v0.7 to v0.8 * Rename migration_guides to migration * Update changelog * Update Cargo.toml descriptions * Add release post * Update version number.
1 parent deb98ef commit fd83a30

File tree

20 files changed

+491
-55
lines changed

20 files changed

+491
-55
lines changed

CHANGELOG.md

+62
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,67 @@
11
# Changelog
22

3+
## **0.8.0** _(2022-08-28)_
4+
5+
Release post: https://sycamore-rs.netlify.app/news/announcing-v0.8.0
6+
7+
- #### ⚡️ Features
8+
9+
- [Add `.map()` utility to `Signal`.](https://github.com/sycamore-rs/sycamore/pull/326)
10+
- [Reactive Primitives v2 🎉!](https://github.com/sycamore-rs/sycamore/pull/337) Read the
11+
[blog post](https://sycamore-rs.netlify.app/news/new-reactive-primitives) for more information.
12+
- [Suspense and async components.](https://github.com/sycamore-rs/sycamore/pull/345)
13+
- [Async transitions.](https://github.com/sycamore-rs/sycamore/pull/353)
14+
- [Type-checked HTML element tags.](https://github.com/sycamore-rs/sycamore/pull/354)
15+
- [Builder API v2!](https://github.com/sycamore-rs/sycamore/pull/373)
16+
- [SVG support.](https://github.com/sycamore-rs/sycamore/pull/389)
17+
- [Implement `AddAssign` and friends for `Signal`.](https://github.com/sycamore-rs/sycamore/pull/397)
18+
- [Add `Signal::modify` to mutate signal.](https://github.com/sycamore-rs/sycamore/pull/399)
19+
- [Add `NoHydrate` and `NoSsr` utility components.](https://github.com/sycamore-rs/sycamore/pull/409)
20+
- [Add `from_web_sys` function.](https://github.com/sycamore-rs/sycamore/pull/432)
21+
- [Add `prop:` directive to `view!`](https://github.com/sycamore-rs/sycamore/pull/435)
22+
- [Add `dangerously_set_inner_html` to the builder API.](https://github.com/sycamore-rs/sycamore/pull/378)
23+
- [Print hydration key for hydration mismatch.](https://github.com/sycamore-rs/sycamore/pull/444)
24+
- [New view syntax for components.](https://github.com/sycamore-rs/sycamore/pull/460) Unifies the
25+
syntax used for setting attributes/props in elements and components.
26+
27+
- #### 🛠 Fixes
28+
29+
- [Make `SsrNode` attribute order stable.](https://github.com/sycamore-rs/sycamore/pull/323)
30+
- [Call cleanup callbacks in `map_keyed` and `map_indexed`](https://github.com/sycamore-rs/sycamore/pull/357)
31+
- [Create a nested reactive scope if `cx` is used inside dyn expression.](https://github.com/sycamore-rs/sycamore/pull/364)
32+
- [Fix and simplify `SsrNode` and `HydrateNode` codegen in `view!`.](https://github.com/sycamore-rs/sycamore/pull/392)
33+
- [Fix hydration for top-level dynamic views.](https://github.com/sycamore-rs/sycamore/pull/374)
34+
- [Fix setting `class` on SVG elements.](https://github.com/sycamore-rs/sycamore/pull/398)
35+
- [Fix parsing of legacy components in child views.](https://github.com/sycamore-rs/sycamore/pull/417)
36+
- [Fix destructuring in async component props.](https://github.com/sycamore-rs/sycamore/pull/419)
37+
- [Add the `<body>` tag to the HTML elements list.](https://github.com/sycamore-rs/sycamore/pull/420)
38+
- [Fix `scope_depth` to return `0` for root scope.](https://github.com/sycamore-rs/sycamore/pull/424)
39+
- [Fix removing old nodes from parent.](https://github.com/sycamore-rs/sycamore/pull/428)
40+
- [Remove Unit `()` implementation of `Prop`.](https://github.com/sycamore-rs/sycamore/pull/431)
41+
- [Add `Debug` implementations to all public items.](https://github.com/sycamore-rs/sycamore/pull/441)
42+
- [Fix boolean attribute list.](https://github.com/sycamore-rs/sycamore/pull/440)
43+
- [Allow fragments and dynamic views in `Router`.](https://github.com/sycamore-rs/sycamore/pull/471)
44+
- [Fix hydration error for `Router`.](https://github.com/sycamore-rs/sycamore/pull/472)
45+
46+
- #### 🎁 Examples and Documentation
47+
48+
- [Add HTTP request example.](https://github.com/sycamore-rs/sycamore/pull/305)
49+
- [Add HTTP request builder example.](https://github.com/sycamore-rs/sycamore/pull/418)
50+
- [Add more docs in book about router and components.](https://github.com/sycamore-rs/sycamore/pull/451)
51+
52+
- #### 🚅 Performance
53+
54+
- [Remove some allocations in `sycamore-reactive`.](https://github.com/sycamore-rs/sycamore/pull/422)
55+
56+
- #### Internal
57+
58+
- [Update license to 2022.](https://github.com/sycamore-rs/sycamore/pull/328)
59+
- [Make website responsive and mobile-friendly.](https://github.com/sycamore-rs/sycamore/pull/331)
60+
- [Use in-tree `js-framework-benchmark` implementation for benchmarking.](https://github.com/sycamore-rs/sycamore/pull/355)
61+
- [Split the `sycamore` crate into `sycamore-core` and `sycamore-web`.](https://github.com/sycamore-rs/sycamore/pull/416)
62+
- [Simplify `reconcile_fragments` implementation.](https://github.com/sycamore-rs/sycamore/pull/423)
63+
- [Update MSRV to 1.63 and remove some `unsafe`s from `sycamore-reactive`.](https://github.com/sycamore-rs/sycamore/pull/470)
64+
365
## **0.7.1** _(2021-12-15)_
466

567
- #### 🛠 Fixes

docs/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name = "docs"
44
version = "0.1.0"
55

66
[dependencies]
7-
pulldown-cmark = "0.9.1"
7+
pulldown-cmark = "0.9.2"
88
serde = { version = "1.0.136", features = ["derive"] }
99
serde_json = "1.0.79"
10-
syntect = "4.6.0"
10+
syntect = "5.0.0"
1111
walkdir = "2.3.2"

docs/next/advanced/routing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To add routing to your Sycamore app, install the
1111
[`sycamore-router`](https://crates.io/crates/sycamore-router) crate from crates.io.
1212

1313
```toml
14-
sycamore-router = "0.8.0-beta.7"
14+
sycamore-router = "0.8.0"
1515
```
1616

1717
### Compatibility with `sycamore`

docs/next/basics/view.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ lot of elements in your app, there is a special terse syntax.
1717
```rust
1818
view! { cx,
1919
// A simple div
20-
div
20+
div {}
2121
// A div with a class
2222
div(class="foo")
2323
// An empty paragraph
24-
p
24+
p {}
2525
// Custom elements!
26-
my-custom-element
26+
my-custom-element {}
2727
}
2828
```
2929

docs/next/getting_started/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You now need to add Sycamore to your new project's dependencies. Add the followi
6161
`Cargo.toml` file in your project folder:
6262

6363
```toml
64-
sycamore = "0.8.0-beta.7"
64+
sycamore = "0.8.0"
6565
```
6666

6767
> **Note**: Sycamore is currently being developed at a rapid pace. To have access to the latest

docs/next/migration/0.7-to-0.8.md

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Migration Guide: v0.7 to v0.8
2+
3+
Before migrating, make sure to run `rustup update`.
4+
5+
Sycamore v0.8 relies heavily on the "non-lexical lifetimes" (NLL) feature that was
6+
[recently stabilized](https://blog.rust-lang.org/2022/08/05/nll-by-default.html). As a result, the
7+
Minimum Supported Rust Version (MSRV) has been updated from `1.53` to `1.63`.
8+
9+
The major changes introduced in v0.8 are described below. There are many further small changes that
10+
are not described here.
11+
12+
## Reactivity
13+
14+
Reactivity has been completely overhauled to be more ergonomic. Check out
15+
[Reactivity](/docs/v0.8/basics/reactivity) in the updated book and the
16+
[Reactivity v2 blog post](/news/new-reactive-primitives) for more information.
17+
18+
## Components
19+
20+
### `#[component]` macro
21+
22+
The `#[component]` macro no longer takes the name of the component as a parameter. Instead, the name
23+
of the component is the function itself. As such, it is now idiomatic to name component functions in
24+
`PascalCase`.
25+
26+
```rust
27+
// Old v0.7 syntax.
28+
#[component(MyComponent<G>)]
29+
fn my_component(props: MyProps) -> View<G> { ... }
30+
31+
// New v0.8 syntax.
32+
#[component]
33+
fn MyComponent<G: Html>(props: MyProps) -> View<G> { ... }
34+
```
35+
36+
### Component arguments and children
37+
38+
Component arguments and children should now be passed using the same syntax as elements.
39+
40+
```rust
41+
// Old v0.7 syntax.
42+
view! {
43+
MyComponent(MyProps {
44+
foo: true,
45+
bar: "abc",
46+
children: view! { ... }
47+
})
48+
}
49+
50+
// New v0.8 syntax.
51+
view! { cx,
52+
MyComponent(foo=true, bar="abc") {
53+
...
54+
}
55+
}
56+
```
57+
58+
## Empty elements
59+
60+
Empty elements must now be followed by an empty block.
61+
62+
```rust
63+
// Old v0.7 syntax.
64+
view! {
65+
br
66+
}
67+
68+
// New v0.8 syntax.
69+
view! { cx,
70+
br {}
71+
}
72+
```
73+
74+
## Builder API
75+
76+
The builder API has been rebuilt from the ground up. Check out the
77+
[book](docs/v0.8/basics/view#builder-syntax) for more information on migrating.
78+
79+
## Keyed and Indexed props
80+
81+
The `template` prop has been renamed to `view`.
82+
83+
```rust
84+
// Old v0.7 syntax.
85+
Keyed(KeyedProps {
86+
iterable: count.handle(),
87+
template: |x| view! {
88+
li { (x) }
89+
},
90+
key: |x| *x,
91+
})
92+
93+
// New 0.8 syntax.
94+
Keyed(
95+
iterable=count,
96+
view=|cx, x| view! { cx,
97+
li { (x) }
98+
},
99+
key=|x| *x,
100+
)
101+
```
102+
103+
## Feature Flags
104+
105+
Some of the feature flags have been removed/renamed:
106+
107+
- `experimental-builder-agnostic` and `experimental-builder-html` has been removed since they are
108+
available by default.
109+
- `experimental-hydrate` is now `hydrate`.
110+
- `dom` is now `web`.
111+
- `futures` is now `suspense`.
112+
113+
Be sure to make the according changes to your `Cargo.toml`.

docs/next/sidebar.json

+9
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@
9191
}
9292
]
9393
},
94+
{
95+
"title": "Migration Guides",
96+
"items": [
97+
{
98+
"name": "v0.7 to v0.8",
99+
"href": "migration/0.7-to-0.8"
100+
}
101+
]
102+
},
94103
{
95104
"title": "Contribute",
96105
"items": [

0 commit comments

Comments
 (0)