v0.3.0
#1042
gbj
announced in
Announcements
`v0.3.0`
#1042
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
v0.3.0
is another incremental-ish release with a bunch of new features, many on the server end but including a bunch of general-purpose improvements. It includes several things that are breaking changes in the semantic-versioning sense, but you may find that not much breaks in your actual app. (For example, no code in any of the the three starter templates needed to change.)New Features and Small Fixes
General
__Props
types for components; you can justuse app::MyComponent;
instead ofapp::{MyComponent, MyComponentProps};
#[slot]
syntax to define typed component children.window_event_listener
HtmlElement::optional_event
style:
syntax in theview
macro to set individual styles, much likeclass:
sets individual classesResource::update
method to reactively update current value.expect_context::<T>(cx)
shorthand foruse_context::<T>(cx).unwrap()
Server
GET
requests (with either URL or CBOR encoding), for easier caching.extract
helper to directly use Actix extractors in a server function.Vec<_>
as server function arguments (anything that can be de/serialized byserde_qs
)<Route/>
in response to additional HTTP methods/verbs, e.g., the classic PHP/multi-page-app style in which aPOST
request can be sent to a page and it will render a response. (Seemethods
prop.)SsrMode::PartiallyBlocked
which works like out-of-order streaming but replaces the HTML for any “blocked” fragments on the server. Improves UX when JS is disabled.Developer Experience and Ergonomics
tracing
crateleptos_meta
with no features enabled or accidentally ending theview
a component returns with a semicolon, meaning it renders nothing)Performance
<Suspense/>
/<Transition/>
.And as always...
Breaking Changes
&'a str
can no longer be directly rendered as a view: add.to_string()
to effected variables. (Previously, all&str
were converted toString
by the renderer; usingCow<'static, str>
now allows&'static str
to be rendered without the additional allocation, at the cost of requiring the conversion of&str
toString
to be more explicit.)window_event_listener
now takes a typed event (likeev::keypress
). Usewindow_event_listener_untyped
for the old behavior.Params
to use typed router search/params, theFromStr
error for any type needs to beSend + Sync
so they areErrorBoundary
compatiblecreate_slice
have changed to allow different input types for getter/setter; only relevant if (for some reason?) you were specifying them manually.What's Changed
Fix server functions default macro on stable by @Demonthos in Fix server functions default macro on stable #784
docs: add runtime "strict mode" checks that warn if you’re non-reactively accessing a value by @gbj in docs: add runtime "strict mode" checks that warn if you’re non-reactively accessing a value #786
fix: warnings about untracked signal access in
<Router/>
by @gbj in fix: warnings about untracked signal access in<Router/>
#790Remove unused fs dependency from leptos_config by @valeth in Remove unused fs dependency from leptos_config #787
fix:
untrack
should disable warnings about untracked reads by @gbj in fix:untrack
should disable warnings about untracked reads #791fix: nested
<Suspense/>
by @gbj in fix: nested<Suspense/>
#781docs:
<Form/>
component by @gbj in docs:<Form/>
component #792Fix server functions with non-copy server contexts by @Demonthos in Fix server functions with non-copy server contexts #785
fix: unused warning on cx in server functions by @markcatley in fix: unused warning on cx in server functions #794
docs: warn if you are using
leptos_meta
without features by @gbj in docs: warn if you are usingleptos_meta
without features #797fix: warning in Cargo.toml by @markcatley in fix: warning in Cargo.toml #800
feat: Add ability to include options to event listeners by @Ofenhed in feat: Add ability to include options to event listeners #799
fix: fixes Fixing scope handling on dynamic children #802 as a temporary measure without resorting to Fix
DynChild
scope handling #803 yet by @gbj in fix: fixes #802 as a temporary measure without resorting to #803 yet #804fix: prevent router panic on root-level
<Redirect/>
during route list generation by @gbj in fix: prevent router panic on root-level<Redirect/>
during route list generation #801Reduce size of RuntimeId when slotmap is not used by @novacrazy in Reduce size of RuntimeId when slotmap is not used #805
fix: unused warning in reactive signal diagnostics by @markcatley in fix: unused warning in reactive signal diagnostics #807
Add the ability for server fns to be submitted via GET requests by @benwis in Add the ability for server fns to be submitted via GET requests #789
chore: fix unused variable warning in property now that it's not memoized by @gbj in chore: fix unused variable warning in property now that it's not memoized #810
Optimize Runtime::mark_dirty by @novacrazy in Optimize Runtime::mark_dirty #808
Optimize memory usage of update methods by @novacrazy in Optimize memory usage of update methods #809
fix: correctly escape HTML special characters in text nodes during SSR by @gbj in fix: correctly escape HTML special characters in text nodes during SSR #812
Publish book ci by @bram209 in Publish book ci #817
remove
Leptos guide
link by @bram209 in removeLeptos guide
link #818docs: add sandbox links and max height by @gbj in docs: add sandbox links and max height #824
fix: correctly pass server fn errors to client by @gbj in fix: correctly pass server fn errors to client #822
fix: server functions with
url
as argument name (closes issue Server Function generates invalid code with an argument namedurl
#823) by @gbj in fix: server functions withurl
as argument name (closes issue #823) #825chore: deny warnings on github actions by @markcatley in chore: deny warnings on github actions #814
Use local pools for axum handlers by @akarras in Use local pools for axum handlers #815
tests: update benchmarks by @gbj in tests: update benchmarks #827
feat: make
__Props
imports unnecessary (closes Do not require FooProps for component Foo to be imported #746) by @gbj in feat: make__Props
imports unnecessary (closes #746) #828Various optimizations, size reductions and stability improvements by @novacrazy in Various optimizations, size reductions and stability improvements #831
Fix leaked memo nodes by @novacrazy in Fix leaked memo nodes #841
[Fix] Correct broken
MaybeSignal
link by @hoangph271 in [Fix] Correct brokenMaybeSignal
link #840feat:
rustls
feature forreqwest
and any other relevant dependencies by @gbj in feat:rustls
feature forreqwest
and any other relevant dependencies #842fix: don't entity-encode HTML special characters inside
<script>
or<style>
(closes <script> and <Script> not decoding the children correctly #837) by @gbj in fix: don't entity-encode HTML special characters inside<script>
or<style>
(closes #837) #846feat: allow multiple HTTP request methods/verbs by @gbj in feat: allow multiple HTTP request methods/verbs #695
[WIP] Trigger prototype by @novacrazy in [WIP] Trigger prototype #838
fix static text nodes with curly braces in SSR by @gbj in fix static text nodes with curly braces in SSR #849
docs: emit error when trying to combine global class and dynamic class in a bugged way by @gbj in docs: emit error when trying to combine global class and dynamic class in a bugged way #850
fix: custom events in SSR mode by @gbj in fix: custom events in SSR mode #852
fix: Strip
&
from the end of params queries by @mondeja in fix: Strip&
from the end of params queries #854fix: match statement in leptos book by @chroth7 in fix: match statement in leptos book #860
Fix the counter without macros test by @agilarity in Fix the counter without macros test #863
feat: add ability to set
node_ref
and pass additional attributes to<Form/>
and friends by @gbj in feat: add ability to setnode_ref
and pass additional attributes to<Form/>
and friends #853Fixed typo in life cycle docs by @Stackingttv in Fixed typo in life cycle docs #869
examples: fix error handling in fetch example by @gbj in examples: fix error handling in fetch example #870
feat: add the ability to specify animations on route transitions by @gbj in feat: add the ability to specify animations on route transitions #736
[fix] updated nix flakes lock files on session auth axum examples by @mustafasegf in [fix] updated nix flakes lock files on session auth axum examples #872
docs: Add per-project toolchain override readme by @kamilogorek in docs: Add per-project toolchain override readme #876
feat: add non-animation base classes to
<AnimatedOutlet/>
and<AnimatedRoutes/>
by @gbj in feat: add non-animation base classes to<AnimatedOutlet/>
and<AnimatedRoutes/>
#877Use override key, if available, for server function calling by @snapbug in Use override key, if available, for server function calling #878
feat: add
expect_context
function by @markcatley in feat: addexpect_context
function #864fix: rendering error in SSR InOrder/Async Mode by @hjin-me in fix: <For/> rendering error in SSR InOrder/Async Mode #879
Split counter without macros web test by @agilarity in Split counter without macros web test #884
fix: dispose of scope when server fns return error by @gbj in fix: dispose of scope when server fns return error #888
perf: tiny optimization on primitive child values by @gbj in perf: tiny optimization on primitive child values #887
chore(readme): add link to Matrix bridge by @filipdutescu in chore(readme): add link to Matrix bridge #894
Fixes
leptos_axum
does not build on stable due to use of unstableOnceLock
#890 that was using OnceLock, which is nightly only, by adding the once_cell crate as a dependency. by @OvermindDL1 in Fixes #890 that was using OnceLock, which is nightly only, by adding the once_cell crate as a dependency. #891This should solve ParamsMap / LinearMap serde serialization and deserialization ParamsMap / LinearMap serde serialization and deserialization #892 by @dgsantana in This should solve ParamsMap / LinearMap serde serialization and deserialization #892 #895
feat: add ability to mutate resources by @gbj in feat: add ability to mutate resources #886
fix: erroneous non-reactive access warning in undelegated events by @gbj in fix: erroneous non-reactive access warning in undelegated events #900
perf: improve router performance on server by calculating route branches once by @gbj in perf: improve router performance on server by calculating route branches once #898
Added get_untracked for node_ref. by @dgsantana in Added get_untracked for node_ref. #902
Use cargo make to run tests for examples by @agilarity in Use cargo make to run tests for examples #904
Add a window event listener with a callback that receives an event that has been cast to its non-generic type. by @loganbnielsen in Add a window event listener with a callback that receives an event that has been cast to its non-generic type. #910
docs: compile error on mutually-exclusive features by @gbj in docs: compile error on mutually-exclusive features #911
fix: issue with ordering of
class
attribute andclass=("fancy-name-200", true)
(closesclass=("name", true)
syntax not reordered correctly #907) by @gbj in fix: issue with ordering ofclass
attribute andclass=("fancy-name-200", true)
(closes #907) #914change: add
window_event_listener_untyped
and deprecatewindow_event_listener
pending 0.3.0 by @gbj in change: addwindow_event_listener_untyped
and deprecatewindow_event_listener
pending 0.3.0 #913feat: add slots by @yuuma03 in feat: add slots #909
examples: fix broken
counters
tests by @gbj in examples: fix brokencounters
tests #915fix some issues with animated routing by @gbj in fix some issues with animated routing #889
fix: panic when creating nested
StoredValue
by @gbj in fix: panic when creating nestedStoredValue
#920Tracing Updates by @benwis in Tracing Updates #908
docs: fixed a minor typo in async readme by @escwxyz in docs: fixed a minor typo in async readme #921
docs: removed extra unused code blocks in form.md by @escwxyz in docs: removed extra unused code blocks in form.md #923
docs: fixed typo in interlude_styling.md by @escwxyz in docs: fixed typo in interlude_styling.md #924
fix: features related compile error by @agilarity in fix: features related compile error #919
fix: allow nested slots by @yuuma03 in fix: allow nested slots #928
docs: add some content on server-side rendering by @gbj in docs: add some content on server-side rendering #930
chore: specify dependency version for cached by @rodrigc in chore: specify dependency version for cached #929
Remove need for LEPTOS_OUTPUT_NAME env var after compilation by @benwis in Remove need for LEPTOS_OUTPUT_NAME env var after compilation #899
Added (potentially broken) timer example by @bluenote10 in Added (potentially broken) timer example #925
Link to actual type instead of Into trait for component properties by @ModProg in Link to actual type instead of Into trait for component properties #932
feat: add allow missing_docs to
children
field by @ModProg in feat: add allow missing_docs tochildren
field #934Adds the GetCbor and GetJson to server macro documentation. by @dgsantana in Adds the GetCbor and GetJson to server macro documentation. #938
Fix ServerFnError::Serialization error string by @mtsr in Fix ServerFnError::Serialization error string #939
examples: better practice for view types in todos by @gbj in examples: better practice for view types in todos #940
CI: fix unused variables breaking tests by @gbj in CI: fix unused variables breaking tests #950
fix: generics on
impl From slot to Vec<slot>
by @yuuma03 in fix: generics onimpl From slot to Vec<slot>
#946feat: add Actix
extract
helper by @gbj in feat: add Actixextract
helper #936Test business logic for counter_without_macros by @agilarity in Test business logic for counter_without_macros #927
impl
IntoView
for component props by @jquesada2016 in implIntoView
for component props #948impl FromIterator for View by @ModProg in impl FromIterator for View #945
Add From for RequestParts into Parts for Axum and add an option to ge… by @benwis in Add From for RequestParts into Parts for Axum and add an option to ge… #931
fix:
<ErrorBoundary/>
toggling between states (closes issue<ErrorBoundary/>
not rendering in release mode #820) by @gbj in fix:<ErrorBoundary/>
toggling between states (closes issue #820) #957docs: add note on projecting children by @gbj in docs: add note on projecting children #959
fix: escapes in doc comments on component properties by @ModProg in fix: escapes in doc comments on component properties #958
Add wasm web test and common tasks by @agilarity in Add wasm web test and common tasks #954
docs: note need for
serde
dependency for server functions (closes Document need forserde
dependency when using#[server]
#947) by @gbj in docs: note need forserde
dependency for server functions (closes #947) #962fix: use a HashMap on Branches::initialize by @yuuma03 in fix: use a HashMap on Branches::initialize #966
chore: fix typos by @fattenap in chore: fix typos #964
feat: add collect_view(cx) by @ModProg in feat: add collect_view(cx) #956
v0.3.0-alpha
by @gbj inv0.3.0-alpha
#968Replace
serde_urlencoded
withserde_html_form
to support cross-input vec serverfn by @snapbug in Replaceserde_urlencoded
withserde_html_form
to support cross-input vec serverfn #973change/fix: require
FromStr
errors onParams
to beSend + Sync
so they areErrorBoundary
compatible by @gbj in change/fix: requireFromStr
errors onParams
to beSend + Sync
so they areErrorBoundary
compatible #974Fix the lint issues in the counter example by @agilarity in Fix the lint issues in the counter example #971
feat: add builder syntax for optional event listener by @gbj in feat: add builder syntax for optional event listener #969
Fix lint issues in counter_isomorphic example by @agilarity in Fix lint issues in counter_isomorphic example #980
fix: suppress warning loading local resource without
<Suspense/>
in hydrate mode (closesResource::read()
warnings should not show for local resources when reading outside<Suspense/>
#979) by @gbj in fix: suppress warning loading local resource without<Suspense/>
in hydrate mode (closes #979) #984feat: allow structs in server function arguments by @gbj in feat: allow structs in server function arguments #987
docs: switch from compile errors to runtime warnings for incompatible feature flags by @gbj in docs: switch from compile errors to runtime warnings for incompatible feature flags #990
docs: error when component ends with
view! { ... };
(closes Better warnings when a component returns()
#985) by @gbj in docs: error when component ends withview! { ... };
(closes #985) #993fix: lint issues in
counters
example by @agilarity in fix: lint issues incounters
example #986fix: lint issues in
erros_axum
example by @agilarity in fix: lint issues inerros_axum
example #988fix: lint issues in
fetch
example by @agilarity in fix: lint issues infetch
example #989fix: lint issues in
hackernews
example by @agilarity in fix: lint issues inhackernews
example #991fix: lint issues in
hackernews_axum
example by @agilarity in fix: lint issues inhackernews_axum
example #992fix: lint issues in
login_with_token_csr_only
example by @agilarity in fix: lint issues inlogin_with_token_csr_only
example #995fix: lint issues in
router
example by @agilarity in fix: lint issues inrouter
example #996fix: lint issues in
session_auth_axum
example by @agilarity in fix: lint issues insession_auth_axum
example #997fix: lint issues in
todo_app_sqlite
example by @agilarity in fix: lint issues intodo_app_sqlite
example #998fix: lint issues in
todo_app_sqlite_axum
example by @agilarity in fix: lint issues intodo_app_sqlite_axum
example #999fix: lint issues in
todo_app_sqlite_viz
example by @agilarity in fix: lint issues intodo_app_sqlite_viz
example #1000fix: lint issues in
todomvc
example by @agilarity in fix: lint issues intodomvc
example #1001[docs] Reduce firmness of overlapping signal warning by @dglsparsons in [docs] Reduce firmness of overlapping signal warning #1004
docs: document that
<ActionForm/>
only works with form-encoded server functions by @gbj in docs: document that<ActionForm/>
only works with form-encoded server functions #1005fix: properly dispose of
<Suspense/>
scopes (closes Detached Nodes memory leak #834) by @gbj in fix: properly dispose of<Suspense/>
scopes (closes #834) #1006test: lint examples with --all-features by @agilarity in test: lint examples with --all-features #1008
feat: add
style:
to view by @gbj in feat: addstyle:
to view #1009Relax Debug trait bounds by @Wadu436 in Relax Debug trait bounds #1010
docs: add a server fn section by @gbj in docs: add a server fn section #1014
book: close iframe tag on global state management page by @Wadu436 in book: close iframe tag on global state management page #1013
docs: adjust Dynamic Attributes page by @FrankReh in docs: adjust Dynamic Attributes page #1011
book: fix link to cargo-leptos README by @Wadu436 in book: fix link to cargo-leptos README #1012
docs: add examples for manual server integration by @ChristopherPerry6060 in docs: add examples for manual server integration #1015
Clean up examples after verification by @agilarity in Clean up examples after verification #1019
build tailwind CSS with trunk by @agilarity in build tailwind CSS with trunk #1016
[fix] indentation erros in examples by @hoangph271 in [fix] indentation erros in examples #1017
fix: maintain insertion order of meta tags by @gbj in fix: maintain insertion order of meta tags #1021
fix: corrects error-deserialization behavior of
ActionForm
(closesActionForm
should deserialize errors #1024) by @gbj in fix: corrects error-deserialization behavior ofActionForm
(closes #1024) #1025feat:
SsrMode::PartiallyBlocked
by @gbj in feat:SsrMode::PartiallyBlocked
#1026fix: flicking
<Transition/>
in release mode (closes Flickering <Transition> in release mode #960) by @gbj in fix: flicking<Transition/>
in release mode (closes #960) #1030fix: avoid extra
{
escaping (closes Extra escaping with SSR rendering #1035) by @gbj in fix: avoid extra{
escaping (closes #1035) #1038change: remove APIs that had been marked deprecated by @gbj in change: remove APIs that had been marked deprecated #1037
Update slice.rs by @sjud in Update slice.rs #1036
examples: fix trunk config to run tailwind at the right time by @flosse in examples: fix trunk config to run tailwind at the right time #1040
Migrate axum integration to use
with_state
overlayer(Extension
by @snapbug in Migrate axum integration to usewith_state
overlayer(Extension
#1032New Contributors
MaybeSignal
link #840Full Changelog: v0.2.5...v0.3.0
This discussion was created from the release `v0.3.0`.
Beta Was this translation helpful? Give feedback.
All reactions