Skip to content

Commit

Permalink
Update to Leptos v0.7 (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Dec 16, 2024
1 parent add92b4 commit 4a2c5b7
Show file tree
Hide file tree
Showing 88 changed files with 1,032 additions and 2,467 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ jobs:
- csr-complete
- ssr-hydrate-actix
- ssr-hydrate-axum
- ssr-islands-axum
- system-gtk
# TODO: re-add 'ssr-islands-axum' and 'system-gtk'
toolchain:
- stable
- nightly
Expand Down
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ repos:
- id: clippy
alias: clippy-no-features
name: clippy-no-features
args: [
args:
[
--exclude=leptos-fluent-ssr-hydrate-axum-example,
--exclude=leptos-fluent-ssr-islands-axum-example, # TODO: excluded by Leptos bug
--workspace,
--,
-D,
Expand Down Expand Up @@ -87,7 +87,6 @@ repos:
[
"--features=ssr,actix",
--exclude=leptos-fluent-ssr-hydrate-axum-example,
--exclude=leptos-fluent-ssr-islands-axum-example,
--exclude=leptos-fluent-csr-complete-example,
--exclude=leptos-fluent-csr-minimal-example,
--workspace,
Expand Down Expand Up @@ -116,7 +115,6 @@ repos:
--exclude=leptos-fluent-ssr-hydrate-actix-example,
--exclude=leptos-fluent-csr-complete-example,
--exclude=leptos-fluent-csr-minimal-example,
--exclude=leptos-fluent-ssr-islands-axum-example,
--workspace,
--,
-D,
Expand Down
74 changes: 69 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,76 @@
# CHANGELOG

## [Unreleased] - 0.2.0
## 2024-12-17 - [0.2.0]

### Breaking changes

- The feature `json` is not enabled by default anymore. Now leptos-fluent
does not includes features by default, so you don't need to use
`default-features = false` in your `Cargo.toml` file.
#### Require Leptos v0.7

Support for Leptos v0.6 has been dropped. Now leptos-fluent requires
Leptos v0.7.

#### Declarative API

Previously, the `leptos_fluent!` macro was providing the I18n context
using `provide_context`, so the app was configured as:

```rust
#[component]
fn App() -> impl IntoView {
leptos_fluent! {
// ...
}

view! {
// ...
}
}
```

Now a `children` option has been added to the macro and need to be used
to declare a I18n component:

```rust
#[component]
fn I18n(children: Children) -> impl IntoView {
leptos_fluent! {
children: children(),
// ...
}
}

#[component]
fn App() -> impl IntoView {
view! {
<I18n>
// ...
</I18n>
}
}
```

By this way `leptos_fluent!` does not return the I18n context anymore.

#### No more double curly braces

Support for deprecated double curly braces syntax for the `leptos_fluent!`
macro has been removed. Use single curly braces instead:

```rust
leptos_fluent! {
// ...
}
```

#### No more default features

The feature `json` is not enabled by default anymore. Now leptos-fluent
does not includes features by default, so you don't need to use
`default-features = false` in your `Cargo.toml` file.

#### `SsrHtmlTag` component removed

The deprecated `SsrHtmlTag` component has been removed.

## 2024-11-15 - [0.1.26]

Expand Down Expand Up @@ -552,7 +616,7 @@ version to `0.1` during installation.

- Added all ISO-639-1 and ISO-639-2 languages.

[Unreleased]: https://github.com/mondeja/leptos-fluent/compare/v0.1.26...master
[0.2.0]: https://github.com/mondeja/leptos-fluent/compare/v0.1.26...v0.2.0
[0.1.26]: https://github.com/mondeja/leptos-fluent/compare/v0.1.25...v0.1.26
[0.1.25]: https://github.com/mondeja/leptos-fluent/compare/v0.1.24...v0.1.25
[0.1.24]: https://github.com/mondeja/leptos-fluent/compare/v0.1.23...v0.1.24
Expand Down
Loading

0 comments on commit 4a2c5b7

Please sign in to comment.