Commit graph

4179 commits

Author SHA1 Message Date
Greg Johnston
bb0dff6af5
fix: support complex punctuated attribute keys in attr: syntax (closes #3221) (#3214) 2024-11-08 17:01:27 -05:00
Greg Johnston
d204ac6d5e
fix: ensure that aria-current is set correctly (closes #3196) (#3213) 2024-11-08 16:19:03 -05:00
Greg Johnston
b0ad85e624
chore: clarify GTK example status in README (closes #3215) 2024-11-08 16:18:51 -05:00
Greg Johnston
0eebe9e289
fix: only register async work with transition if it isn't already done (closes #3197) (#3209) 2024-11-08 09:04:52 -05:00
Greg Johnston
2abbdb6594
fix: complete navigation after rendering fallback (closes #3199) (#3208) 2024-11-08 09:04:40 -05:00
dependabot[bot]
8f8f3e23e4
chore(deps): bump tokio from 1.41.0 to 1.41.1 (#3207)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.41.0 to 1.41.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.41.0...tokio-1.41.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-07 19:16:59 -05:00
Saber Haj Rabiee
aab952357e
Dependabot, Attemp #2 (#3204)
* fix: remove examples and benchmarks from dependabot search path

* chore: update/upgrade deps to prevent dependabot PR pollution at first
run

* fix: increase number of pull requests from dependabot as the workspace
is pretty big

* fix: revert rkyv version as it was unexpectedly downgraded

* fix: tower in example
2024-11-07 10:55:57 -08:00
Saber Haj Rabiee
f1ebf77fa6
fix: make free space for ci workflows before running them (#3206) 2024-11-07 10:55:42 -08:00
Darwin Boersma
5cc2f3858d
Add futures-executor feature for any_spawner (#3195)
Signed-off-by: Darwin Boersma <darwin@sadlark.com>
2024-11-05 10:11:34 -08:00
Tommy Yu
8252655959
Updated tests for #3182 (#3194)
* fix: ensure we check memos the first time a dependency uses them, even if the dependency always runs on its first run (closes #3181)

* Correct expected counter values down due to #3182

- As #3182 fixed the issue where superfluous resource fetches happened
  when hydration happened inside a nested component, the expected values
  for the counters are down to where they actually are supposed to be.

---------

Co-authored-by: Greg Johnston <greg.johnston@gmail.com>
2024-11-04 18:12:54 -08:00
Saber Haj Rabiee
14e47e87ba
chore: add Cargo.lock (closes #2881) (#3192) 2024-11-04 16:21:35 -05:00
Greg Johnston
4a8cfad7c5
chore(ci): suppress warnings about unused code in example tests (#3193) 2024-11-04 13:08:50 -05:00
Louis Dispa
d9f52dad76
feat: implement rendering traits for fixed-size arrays (#3174) 2024-11-04 12:26:43 -05:00
Greg Johnston
3a8508df6c rc1 2024-11-03 20:19:57 -05:00
Daniëlle Huisman
865c6df483
wasm-bindgen 0.2.95 (#3186) 2024-11-03 20:19:21 -05:00
Greg Johnston
c1d7f0f8d1
fix: exclude excluded server fn paths instead of unregistering them (closes #3150, #3175) (#3176) 2024-11-03 20:02:11 -05:00
zakstucke
8c2dd73b70
chore: expose internals of SerializedDataId and SsrSharedContext to allow creating custom hydration contexts (#3145) 2024-11-03 19:55:59 -05:00
Greg Johnston
d5894555cc
fix: allow !Send errors in Actix extract() (#3189) 2024-11-03 19:53:24 -05:00
Enzo Nocera
2ef1723607
Makes the wasm32-wasip1/2 target a first-class citizen for Leptos's Server-Side (#3063)
* feat: WIP wasi integrations crate

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* feat(server_fn): add generic types

This commit adds `From` implementations for the
`Req` and `Res` types using abstraction that are deemed
"platform-agnostic".

Indeed, both the `http` and `bytes` crates contains types
that allows us to represent HTTP Request and Response,
while being capable to target unconventional platforms
(they even have `no-std` support). This allows the
server_fn functions to target new platforms,
for example, the `wasm32-wasip*` targets.

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(server_fn): generic types cleanup

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* feat(integrations/wasi): make WASI a first-class citizen of leptos server-side

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* WIP: chore(any_spawner): make the futures::Executor runable

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* fix(server_fn): include `generic` in axum.

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(any_spawner): some clippy suggestions

I ran clippy in really annoying mode since I am still
learning Rust and I want to write clean idiomatic code.
I took suggestions that I thought made sense, if any
maintainers think those are *too much*, I can relax
those changes:

* Use `core` instead of `std` to ease migration to `no_std`
  (https://rust-lang.github.io/rust-clippy/master/index.html#/std_instead_of_core)
* Add documentation on exported types and statics
* Bring some types in, with `use`
* Add `#[non_exhaustive]` on types we are not sure we
  won't extend (https://rust-lang.github.io/rust-clippy/master/index.html#exhaustive_enums)
* Add `#[inline]` to help the compiler when doing
  cross-crate compilation and Link-Time optimization
  is not enabled. (https://rust-lang.github.io/rust-clippy/master/index.html#/missing_inline_in_public_items)
* Use generic types instead of anonymous `impl` params
  so callers can use the `::<>` turbofish syntax (https://rust-lang.github.io/rust-clippy/master/index.html#/impl_trait_in_params)

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(leptos_wasi): fine-tune linter and clean-up

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* feat(leptos_wasi): better handling of server fn with form

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: cargo fmt

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: remove custom clippy

Remove clippy crate rules since it
seems to make tests fails in tests.

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: use `wasi` crate

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: revert changes to any_spawner

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: simpler crate features + cleanup

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* feat(any_spawner): add local custom executor

This commit adds a single-thread "local"
custom executor, which is useful for environments
like `wasm32` targets.

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* feat(leptos_wasi): async runtime

This commit adds a single-threaded
async runtime for `wasm32-wasip*`
targets.

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* feat(leptos_wasi): error handling

This commit adds error types for the users
to implement better error handling.

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: migrate integration off-tree

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(ci): fix formatting

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore: remove ref to leptos_wasi in Cargo.toml

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(ci): fix fmt

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(ci): remove explicit into_inter()

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

* chore(ci): make generic mutually exclusive with other options

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>

---------

Signed-off-by: Enzo "raskyld" Nocera <enzo@nocera.eu>
2024-11-02 09:44:50 -07:00
Greg Johnston
13f7387d45
fix: Oco equality check (closes #3178) (#3180) 2024-11-01 14:55:49 -04:00
Greg Johnston
0a13f7c08c
chore: reexport unescape (closes #3177) (#3179) 2024-11-01 14:55:37 -04:00
Greg Johnston
7c83904aea
Merge pull request #3173 from leptos-rs/store-tweaks
Store tweaks
2024-10-30 20:33:10 -04:00
Greg Johnston
6e13ff9787 feat: impl Into<Field<T>> for Store<T> (closes #3102) 2024-10-28 20:28:09 -04:00
Greg Johnston
234d138f03 chore: remove log 2024-10-28 20:17:23 -04:00
Greg Johnston
97110cd5ac chore: remove Then 2024-10-28 20:17:23 -04:00
Greg Johnston
5acc1b1a5a chore: rename .iter() to .iter_unkeyed() for clarity 2024-10-28 20:16:54 -04:00
Nicolas Cura
f3987246cb
docs: remove duplicated "calls" word (#3171) 2024-10-28 20:04:33 -04:00
Greg Johnston
e5149fb348
fix: correctly track inner subfields on Field (closes #3169) (#3170) 2024-10-28 20:04:16 -04:00
Greg Johnston
d67ff03568
chore: fix leptos_dom reexports (closes #3166) (#3168) 2024-10-27 21:12:41 -04:00
Greg Johnston
1dbca3005d
Merge pull request #3163 from leptos-rs/undep-mp
chores
2024-10-25 17:47:14 -04:00
Greg Johnston
af61be0c72
fix: correctly reset classes when using Option<T> (#3164) 2024-10-25 17:47:00 -04:00
Johannes Heuel
76facf9539
feat: improve tailwind config to also catch dynamic classes (#3143) 2024-10-25 14:06:19 -04:00
Tommy Yu
0e73d18d7b
ci: regression tests for double suspense/double resource fetch (#3103)
* test: first cut of the instrumented suspense_tests

- Based on initial concepts developed for reproducing #2937 and others,
  streamlined and instrumented for e2e testing and refined for inclusion
  as a standalone module to be plugged into some other App.

* First cut of the fixtures and tests

* Actually make it work properly

- Instead of using examples, just feed it the table because examples
  will rerun the whole scenario from scratch, which isn't what we are
  trying to test here.
- Provide a basic example with item listing to show how this will work.

* Use ticketing system to disambiguate CSR calls

- Keep all SSR calls on ticket 0 as a means to disambiguate them from
  CSR calls.  For the mean time the focus of tests isn't on that
  behavior but this may be modified when suitable.

* Update the baseline fixtures

- Given the new understanding, the scenerios all being the baseline
  tests they are now moved into one file.
- Have the checks against all calls at once for better diff output,
  and reword the new scenerios into more idomatic gherkin.
- Streamline the steps and provide additional ones that will help with
  feature definitions.

* Translate the reproduction steps into Gherkin

* Comment out logging to avoid output interference.

* Be able to reset CSR counters everywhere

- Done by providing a button directly on the top level component with
  the navigation footer.  This will be useful for the next test.

* Test showing difference between hydrate and CSR

- Specifically, under hydrated load, resources that shouldn't need
  refetching gets refetched, while CSR does not show this issue.
2024-10-25 14:05:42 -04:00
Greg Johnston
d306a15f86
fix: avoid deadlocking if can't take Memo write lock (closes #3158) (#3160) 2024-10-25 13:57:44 -04:00
Greg Johnston
bf95648dc9 chore: clippy doc comment length 2024-10-25 13:56:02 -04:00
Greg Johnston
00edfc0e0a chore: undeprecate MaybeProp 2024-10-25 13:49:19 -04:00
zakstucke
396327b667
feat: Option<T> read-like traits & deprecate MaybeSignal (#3098) 2024-10-25 13:41:26 -04:00
zakstucke
a437289f81
feat: impl IntoStyle for Option<impl IntoStyle & Oco (#3119) 2024-10-25 13:31:07 -04:00
zakstucke
58e7897db6
fix: From<> impls between ArcLocalResource and LocalResource (#3144) 2024-10-25 13:30:18 -04:00
Greg Johnston
1be1f41fba
fix: restore array syntax for setting multiple classes dynamically (closes #3151) (#3152) 2024-10-23 20:10:04 -04:00
Greg Johnston
7b8cd90a6e 0.7.0-rc0 2024-10-21 21:16:20 -04:00
Greg Johnston
d0ef7b904d
feat: add OptionalParamSegment (closes #2896) (#3140) 2024-10-21 21:15:14 -04:00
Greg Johnston
7904e0c395
fix: unregister server functions whose paths are in excluded routes (closes #2735) (#3138) 2024-10-21 09:14:36 -04:00
Greg Johnston
7b4c470155
perf: type erasure in router (#3107) 2024-10-20 20:07:14 -04:00
Greg Johnston
98eccc9eb8
perf: make LeptosOptions lighter-weight to clone (closes #3036) (#3136) 2024-10-20 20:05:29 -04:00
Greg Johnston
70d06e2716
feat: Action::clear() to clear action value (closes #2364) (#3135) 2024-10-20 16:29:05 -04:00
PenguinWithATie
67c3bf2478
chore: add tachys::view::fragment::Fragment to prelude (#3125) 2024-10-20 14:15:15 -04:00
Corvus
f3aaae857a
feat: allow axum to serve precompressed files (#3133) 2024-10-19 20:47:35 -04:00
Greg Johnston
d727e53dd6
chore(ci): reduce tachys feature set combinations (#3131) 2024-10-19 20:45:49 -04:00
zakstucke
e4543ab5df
feat: new nostrip: prop prefix to pass Option<T> directly when prop(optional) (#3105) 2024-10-19 15:41:51 -04:00