Skip to content

Thaw/v0.5#388

Merged
lizidev merged 31 commits intomainfrom
thaw/v0.5
Aug 12, 2025
Merged

Thaw/v0.5#388
lizidev merged 31 commits intomainfrom
thaw/v0.5

Conversation

@lizidev
Copy link
Copy Markdown
Collaborator

@lizidev lizidev commented Mar 5, 2025

This is meant to prepare for a 0.5.0-alpha release.

It will include the following breaking changes:

  • Update leptos to v0.8.0-alpha.
  • RatingColor adds Marigold attribute.
  • InputType adds Number prop.
  • The icon prop of Icon is changed to icondata_core::Icon type.
  • The value prop of MenuItem is changed to generic type.

  • Theme is changed to use getset.

Reason: When adding new components requires changing ColorTheme, it is very easy to make breaking changes.

example:

// 0.4
let _ = theme.common.font_weight_bold;
let _ = theme.color.color_brand_background;
theme.common.font_weight_bold = "700".to_string();
theme.color.color_brand_background = "#f5222d".to_string();

// 0.5
let _ = theme.common.font_weight_bold();
let _ = theme.color.color_brand_background();
theme.common.set_font_weight_bold("700".to_string());
theme.color.set_color_brand_background("#f5222d".to_string());

This was referenced Mar 11, 2025
@povilasb povilasb mentioned this pull request Jun 27, 2025
@povilasb
Copy link
Copy Markdown

Hey, any plans on proceeding with this PR?

@lizidev
Copy link
Copy Markdown
Collaborator Author

lizidev commented Jul 1, 2025

@povilasb I plan to finish working on https://github.com/thaw-ui/thaw/milestone/4 first, and then release v0.5.

@povilasb
Copy link
Copy Markdown

povilasb commented Jul 2, 2025

Perfect.

Heads up that I've been testing this branch with leptos = 0.8.2 and it produces a cryptic compilation error when server function is declared:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
�[38;5;77m       Cargo�[0m finished �[38;5;241mcargo build --package=thaw-demo --lib --target-dir=/Users/povilas/projects/thaw-demo/target/front --target=wasm32-unknown-unknown --no-default-features --features=hydrate�[0m
�[38;5;77m       Front�[0m generating JS/WASM with wasm-bindgen
�[31mThe application panicked (crashed).�[0m
Message:  �[36mthaw_demo::app::_::__ctor::h0c98ab51124d5ea9: Read a negative address value from the stack. Did we run out of memory?�[0m
Location: �[35m/Users/povilas/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wasm-bindgen-wasm-interpreter-0.2.100/src/lib.rs�[0m:�[35m245
$ rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)

$ cargo leptos --version
cargo-leptos 0.2.36

$ sw_vers
ProductName:            macOS
ProductVersion:         15.5
BuildVersion:           24F74

Let me know if you need more info.

@lizidev
Copy link
Copy Markdown
Collaborator Author

lizidev commented Jul 2, 2025

@povilasb The Thaw feature should not be enabled by default.
WeChat3043732535fcd60562bf040641977c17

@povilasb
Copy link
Copy Markdown

povilasb commented Jul 3, 2025

That worked indeed. Thank you 🙇

I still am a little confused on when to use the SSR feature?
I figured I should be using it when I'm building an SSR app 🤔 based on the docs

To enable the ssr mode, the following configurations are required:

thaw = { ..., features = ["ssr"] }

@povilasb
Copy link
Copy Markdown

Heads up that there will be a few reactive-graph related issues with leptos 0.8.5:

error[E0277]: the trait bound `S: reactive_graph::owner::storage::Storage<ArcField<Vec<T>>>` is not satisfied
   --> /Users/povilas/projects/thaw/thaw_utils/src/signals/model/vec_model.rs:261:48
    |
261 |         let field: Field<Vec<T>, S> = subfield.into();
    |                                                ^^^^ the trait `reactive_graph::owner::storage::Storage<ArcField<Vec<T>>>` is not implemented for `S`
    |
    = note: required for `Field<Vec<T>, S>` to implement `From<Subfield<Inner, Prev, Vec<T>>>`
    = note: required for `Subfield<Inner, Prev, Vec<T>>` to implement `Into<Field<Vec<T>, S>>`
help: consider further restricting type parameter `S` with trait `Storage`
    |
255 |     S: Storage<T> + Storage<ArcField<Vec<T>>> + Storage<Option<T>> + Storage<Vec<T>> + reactive_graph::owner::storage::Storage<reactive_stores::ArcField<std::vec::Vec<T>>>,
    |                                                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

@lizidev
Copy link
Copy Markdown
Collaborator Author

lizidev commented Jul 23, 2025

@povilasb

I still am a little confused on when to use the SSR feature?
I figured I should be using it when I'm building an SSR app 🤔 based on the docs

The documentation is a bit misleading here, I will correct this later.

Specifically, we should not activate the corresponding features, but only provide two features to the cargo-leptos tool, which will build two packages based on these two features.

cargo build --features=hydrate
cargo build --features=ssr

Heads up that there will be a few reactive-graph related issues with leptos 0.8.5:

There are no problems in my local and CI. Can you provide the execution command and version information (execute cargo -vV command)?

@adamnemecek
Copy link
Copy Markdown

Commendable effort! When do you think this might be merged?

* fix: make cargo test pass

* feat: Add pure-rust-locales dependency

* feat: Add locale to ConfigProvider

* feat: translate the month name in Calendar

* feat: translate the month name in DatePicker

* feat: translate the day name in Calendar

* feat: translate the day name in DatePicker

* feat: start the week at the correct day in Calendar

* feat: start the week at the correct day in DatePicker

* docs: write docs for internationalization

* feat: translate the today button in French locales

* refactor: make LocaleConfig more generic

This allows the user to provide its own translation of "Today" for locales
where we don't provide one.

* refactor: make some methods of LocaleConfig crate-private
@povilasb
Copy link
Copy Markdown

@lizidev just tested with the latest version of this branch - compiles fine now.
Thank you 🙇

kandrelczyk and others added 5 commits August 1, 2025 23:39
* feat: min and max props added to Grid (#417)

* grid: added min and max props

* switch from `MaybeProp`s to `Signal`s

* add input_size property to spin_button

* i32 -> u32

---------

Co-authored-by: jerhat <2805041+jerhat@users.noreply.github.com>
Co-authored-by: Luke Petherbridge <luke.petherbridge@epeerless.com>
@lizidev
Copy link
Copy Markdown
Collaborator Author

lizidev commented Aug 12, 2025

Since leptos v0.8 has been out for a while, and to better facilitate CI/CD, I'm merging the thaw/v0.5 branch into main.

For issues related to thaw-v0.4, please check out the thaw-v0.4 branch.

@lizidev lizidev merged commit 507d203 into main Aug 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants