Commit graph

2967 commits

Author SHA1 Message Date
Greg Johnston
74f9c3cd82
fix: <Transition/> fallback should show if client-rendered (closes #2123) (#2128) 2023-12-22 17:10:09 -05:00
martin frances
34fb39c976
chore: fix lifetime on example (#2125)
```bash
cd leptos/leptos_macro/example
cargo clippy
```

warning: the following explicit lifetimes could be elided: 'a
  --> src/lib.rs:41:20
   |
41 | fn TestMutCallback<'a, F>(mut callback: F, value: &'a str) -> impl IntoView
   |                    ^^                              ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
41 - fn TestMutCallback<'a, F>(mut callback: F, value: &'a str) -> impl IntoView
41 + fn TestMutCallback<F>(mut callback: F, value: &str) -> impl IntoView
   |

warning: `example` (lib) generated 1 warning (run `cargo clippy --fix --lib -p example` to apply 1 suggestion)
2023-12-20 19:10:59 -05:00
martin frances
ea80a21a54
chore: remove duplicate itertools versions (#2124)
The root cause is the family of leptos modules requiring both versions 0.10.5 and 0.11.0
This PR will fix that. ( Also needs a bump to 0.12.0 )

```
warning: multiple versions for dependency `itertools`: 0.10.5, 0.11.0
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_crate_versions
note: the lint level is defined here
 --> src/lib.rs:4:9
  |
4 | #![warn(clippy::cargo)]
  |         ^^^^^^^^^^^^^
  = note: `#[warn(clippy::multiple_crate_versions)]` implied by `#[warn(clippy::cargo)]`
```
2023-12-20 19:10:00 -05:00
Greg Johnston
33590d487b
chore: clean up warnings causing CI issues (#2119) 2023-12-18 08:15:46 -05:00
Rakshith Ravi
880002de31
fix: pass through doc comments for server fns (#2099) 2023-12-17 20:40:22 -05:00
Niklas Eicker
fb0a62f3f6
fix: support additional context for route generation (#2113) 2023-12-17 20:37:27 -05:00
Greg Johnston
a4bd7c4274
chore: don't warn when stabilized features are used (#2118) 2023-12-17 20:34:32 -05:00
NKID00
8122941c3c
fix: let mount_to_body accept FnOnce closures (closes #2115) (#2116) 2023-12-17 20:28:18 -05:00
Gentle
21f4c27cfb
chore: add nix-darwin support, update flake (#2106)
Co-authored-by: Gentle <ramon.klass@gmail.com>
2023-12-14 09:42:07 -05:00
Simon Richard
b578ec82d7
examples: change output names to clarify Tailwind examples (#2102) 2023-12-11 20:25:10 -05:00
jo!
50432e2651
examples: ergonomic improvements to session_auth_axum (#2057)
I've always hated the get_todos function and I
wanted to change it badly. Added a .env file
containing the db url for sqlx-cli, and cleaned
up with leptosfmt

Co-authored-by: j0lol <me@j0.lol>
2023-12-10 14:28:42 -05:00
Niclas Åhdén
fcc9242a63
docs: minor documentation corrections (#2098)
* Docs: Fix Body docs incorrectly referring to html

* Docs: Correct X/Z/Z to X/Y/Z in CONTRIBUTING
2023-12-10 14:24:16 -05:00
Greg Johnston
6014a70d0d
fix: support complete URLs in <A/> and <Form/> (closes #2076) (#2096) 2023-12-01 19:20:43 -05:00
Trey Lowerison
ed61ea9dd2
feat: add support for placing attributes on server functions (#2093)
* fix: add support for placing attributes on server functions

Adding instrumentation to server functions is not straightforward (requires calling out to another ssr-only function which is instrumented). This commit adds all attributes on the server function to both the generated front end and back end functions. If those attributes are only desirable on the backend say, a user can always wrap their attribute in `#[cfg_attr(feature = "ssr", ..)]`.

* nit: formatting in example cargo
2023-12-01 15:36:52 -05:00
itowlson
9bbd881757
feat: support spawn_local on Spin WASI (#2066)
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
2023-12-01 15:34:29 -05:00
Greg Johnston
8d68c34796
docs: point the book toward its new location with redirects (#2095) 2023-12-01 15:20:44 -05:00
Daniel Mantei
e8025705a4
docs: book restructuring and updates (#2052)
* move DX page under "Getting Started" section; add leptosfmt to DX page

* add a "community and leptos-* crates" page

* create folder for "getting_started"

* updates to 'getting started' chapter (feedback-based)

* clarify book structure + add necessary explanations

* address PR comments by @reedwoodruff

* update "getting started"

* address gbj's comments

* remove the term "universal" from book

* minor update

* formatting

* address reedwoodruff comment
2023-11-30 19:24:18 -05:00
blorbb
19711e16b6
feat: improved macro hygiene (#2084) 2023-11-29 07:47:18 -05:00
Alex Lazar
1272bd12f0
docs: use with!() macro in book and update formatting on Effect page (#2054) 2023-11-29 07:41:13 -05:00
martin frances
731b028b11
chore: Bump http from 0.2.8 to 0.2.11. (#2068) 2023-11-29 07:36:03 -05:00
sdutwsl
1a295bb3d6
docs: correct titile level for 04b_iteration.md (#2080) 2023-11-28 19:53:41 -05:00
Rockie Guo
9c44da2594
docs: minor fixes for some code examples in the book (#2077) 2023-11-28 19:53:26 -05:00
Alex Lazar
75c27e0b85
docs: fix book chapter 3.9 #3 (#2053)
* Fix book chapter 3.9 #3

* Add note about Layout and Content
2023-11-28 19:52:01 -05:00
Greg Johnston
b95a79240e v0.5.4 2023-11-28 18:46:51 -05:00
Alexis Fontaine
8e374efe8d
fix: invalid attribute value for aria-current (#2089) 2023-11-28 15:23:16 -05:00
Greg Johnston
b578660624
docs: make it easy to see how to run each example in its README (#2085) 2023-11-28 11:47:56 -05:00
Greg Johnston
d6ee2a37f4 v0.5.3 2023-11-27 19:38:33 -05:00
Greg Johnston
18a92bbfd8
fix: improved rust-analyzer support in #[component] macro (#2075) 2023-11-27 19:37:43 -05:00
Greg Johnston
4e8c3accf2
fix: make prop serialization opt-in for devtools (closes #1952) (#2081) 2023-11-27 16:35:31 -05:00
Joseph Cruz
a8e25af523
ci(leptos): run ci on change instead of check (#2061)
* ci: run ci examples on leptos change

* chore(ci): simulate leptos source change

* ci(todo_app_sqlite_csr): increase retries

* ci: delete check examples workflow

* ci: rename ci examples workflow

* ci: run ci examples with stable toolchain

* chore(ci): remove simulated change

* ci: delete check stable workflow
2023-11-24 14:59:13 -05:00
Greg Johnston
d531848db5
fix: dispose previous route or outlet before rendering new one (closes #2070) (#2071) 2023-11-24 14:51:51 -05:00
hpepper
670f415565
docs: add instruction to install trunk to examples/README.md (#2064)
Co-authored-by: Henry Pepper <henry>
2023-11-24 14:06:02 -05:00
Greg Johnston
061213ca78
fix: correctly mark Trigger as clean when it is re-tracked (closes #1948, #2048) (#2059) 2023-11-22 09:29:25 -05:00
Greg Johnston
0ce4ee8a7a
docs: add warning for nested Fn in attribute (see #2023) (#2045) 2023-11-22 07:35:20 -05:00
Greg Johnston
1cd6603da0
ci(examples): fix portal test (#2051) 2023-11-20 20:39:19 -05:00
Andrew Wheeler(Genusis)
453911e6fc
examples: updated axum session to latest 0.9 in examples (#2049)
* updated axum_database_sessions to axum_session along with axum_sessions_auth to axum_session_auth

* updated to axum session 0.9
2023-11-20 20:33:31 -05:00
Greg Johnston
cb6267ad08
feat: <Provider/> component to fix context shadowing (closes #2038) (#2040) 2023-11-19 20:24:36 -05:00
Ken
4518d3c89f
Have fetch example conform to docs guidance around using <ErrorBoundary> and <Transition> in conjunction (#2035)
* put `<ErrorBoundary>` inside `<Transition>`

* fix indentation
2023-11-18 08:24:30 -05:00
Greg Johnston
e47a619556
examples: add CSR with server functions example (closes #1975) (#2031) 2023-11-18 08:24:15 -05:00
Daniel Mantei
414f5fc393
docs: reorganize deployment section (#2036)
* Update mdbook-admonish book dependency

* Move "Optimizing Binary Size" to Deploy.. chapter

* Minor text updates to the Deployment section
2023-11-17 15:40:20 -05:00
martin frances
362e3bc603
chore: stop using std::fmt, instead used core::fmt. (#2033) 2023-11-17 15:36:13 -05:00
taohua
4d549f70c9
docs: fix misnamed form field in <Form/> example (#2024)
Co-authored-by: datewu <>
2023-11-17 15:27:06 -05:00
Chris
85dd726d43
docs: ActionForm examples for indexing into struct fields (#2017)
Co-authored-by: chrisp60 <gh@cperry.me>
2023-11-17 15:22:11 -05:00
blorbb
24febe11f3
feat: impl Default for TextProp (#2016) 2023-11-17 15:20:03 -05:00
Greg Johnston
64b1e9bed3
fix: use create_effect for <Portal/> to avoid hydration issues (closes #2010) (#2029) 2023-11-17 15:19:07 -05:00
Greg Johnston
68c91a732d
fix: allow nested functions in Attribute (closes #2023) (#2027) 2023-11-15 11:00:15 -05:00
blorbb
8573f22d96
fix: re-export slice! macro (#2008) 2023-11-11 06:47:15 -05:00
Greg Johnston
61c7ff4256
docs: add note about context shadowing (closes #1986) (#2015) 2023-11-10 18:04:22 -05:00
Greg Johnston
860d887931
chore: remove duplicate benchmarks in leptos_reactive (#2014) 2023-11-10 15:53:32 -05:00
Chris
5e929a75fa
feat: Action::new and Action::server (#1998) 2023-11-10 15:53:20 -05:00