Commit graph

372 commits

Author SHA1 Message Date
Ben Wishovich
1d25134213
Merge branch 'main' into generated_routes 2023-01-07 14:58:26 -08:00
Greg Johnston
f2842cf14e children should take FnOnce(Scope) -> Fragment, to ease need of cloning etc. 2023-01-07 17:04:58 -05:00
Greg Johnston
8915e2615b Adjust default features for meta and router 2023-01-07 14:43:32 -05:00
Greg Johnston
af7b93fa1e
Merge pull request #128 from akesson/workspace-features
Workspace features
2023-01-07 14:19:56 -05:00
hakesson
b852e459a9 Unify workspace dependencies 2023-01-07 18:00:37 +01:00
Martin
7acc309f66 Minor: Clippy format!() all variables now inlined. 2023-01-07 15:46:47 +00:00
Greg Johnston
05d2eb8ce0 Improve CI disk space usage 2023-01-07 07:43:52 -05:00
Greg Johnston
ef067f18e1 Fix router tests when no features enabled 2023-01-07 07:36:27 -05:00
benwis
677e4f2540 Leptos can now generate routes and provide them to the Axum router. More
testing and Actix version to come
2023-01-06 19:52:38 -08:00
benwis
63b1837315 First pass of method to generate routelist 2023-01-06 14:08:45 -08:00
Greg Johnston
05ffd8c989 Add all the missing router tests 2023-01-06 12:48:45 -05:00
Greg Johnston
13bdef22bd Fixes off-by-one error in the router that was causing inappropriate scope disposal 2023-01-05 09:47:03 -05:00
Greg Johnston
d5bda04306 <Outlet/> should dispose of child scopes if it needs to 2023-01-04 22:39:32 -05:00
Greg Johnston
cab7360bef Fix hydration mismatch in <Outlet/> 2023-01-04 15:32:39 -05:00
Greg Johnston
5dffb0a803 Document how to modularize/externalize route definitions 2023-01-03 19:38:11 -05:00
Greg Johnston
e2a5c2d78f Fix issues with route matching on different sub-routes with same path (closes issue #229) 2023-01-03 19:32:58 -05:00
Greg Johnston
ca679ec496 chore: clear warning 2023-01-03 19:06:59 -05:00
Greg Johnston
10282857fe chore: clear warnings 2023-01-03 18:47:21 -05:00
Greg Johnston
263d5b1d89 Allow path prop on <Route/> to be any type that impl std::fmt::Display 2023-01-03 18:37:43 -05:00
Greg Johnston
6a4cbbf266 Specify html::a to suppress warning 2023-01-03 16:07:51 -05:00
Greg Johnston
755ceb7d75 0.1.0-beta 2023-01-02 16:35:00 -05:00
Greg Johnston
cc1d15989e Update router to new action APIs 2022-12-30 15:36:01 -05:00
Greg Johnston
e06946e5a4 stable support for router 2022-12-29 18:40:50 -05:00
Greg Johnston
333f60cfb7 Changes for stable in router and meta 2022-12-29 18:10:14 -05:00
Greg Johnston
70f6297277 Merge branch 'leptos_dom_v2' of https://github.com/jquesada2016/leptos into jquesada2016-leptos_dom_v2 2022-12-29 09:32:12 -05:00
Greg Johnston
b86e7f33dc Bump versions for new cargo-leptos compatible integrations 2022-12-29 08:04:22 -05:00
Greg Johnston
4b1fce4c9c Revert "Merge branch 'main' into pr/119"
This reverts commit 63f680f37d, reversing
changes made to 50ba796f49.
2022-12-28 15:06:46 -05:00
Greg Johnston
63f680f37d Merge branch 'main' into pr/119 2022-12-28 14:21:54 -05:00
Greg Johnston
e3c4e9f6a4 chores: fix failing tests, update docs, suppress warnings 2022-12-28 11:33:26 -05:00
Greg Johnston
5540bb8e8c Bump version to 0.1.0-alpha 2022-12-25 22:58:07 -05:00
Matt Crane
587a85baaf Fix erros in counter-isomorphic with stable 2022-12-24 12:13:35 -08:00
Greg Johnston
c1d6ff51a6 Update meta and router versions 2022-12-23 13:19:51 -05:00
Jose Quesada
aa9f8f24b0 renamed element to view on <Route /> and RouteDefinition 2022-12-22 17:41:01 -06:00
Jose Quesada
d2ba8f5d46 exporting everything from matching 2022-12-22 17:30:30 -06:00
Greg Johnston
66ac7d2a9d Fix hydration of <Routes/> 2022-12-21 07:58:26 -05:00
Greg Johnston
557bd25e2c Clear warnings 2022-12-19 07:39:30 -05:00
Greg Johnston
3195ab4ffc Get Suspense/Transition hydration working 2022-12-18 07:38:51 -05:00
Greg Johnston
9c6aaed0a8 Fix issue of <Routes/> mismatch 2022-12-17 08:28:22 -05:00
Greg Johnston
d65fde1ed4 Fix Link in SSR 2022-12-16 12:17:41 -05:00
Jose Quesada
a591d54a22 changed router to directly return children, rather than a closure to not break tracing continuity 2022-12-15 13:53:39 -06:00
Jose Quesada
5603fac109 ported Route 2022-12-15 13:07:09 -06:00
Jose Quesada
8adf9108c5 ported Routes 2022-12-15 13:00:53 -06:00
Jose Quesada
610e38a967 fixed Coutlet from being a double component 2022-12-15 12:52:46 -06:00
Jose Quesada
34697b74a0 fixed form components to take children(cx) directly instead of a closure 2022-12-15 12:51:43 -06:00
Jose Quesada
0a8b516182 ported A 2022-12-15 12:50:00 -06:00
Jose Quesada
5405dcd09d ported MultiActionForm 2022-12-15 12:40:41 -06:00
Jose Quesada
1aaacbaf5b ported ActionForm 2022-12-15 12:37:19 -06:00
Jose Quesada
ce9aec2520 started porting router to #[component] 2022-12-15 12:31:53 -06:00
Greg Johnston
5ca169ac06 Properly handle Scope when creating component children 2022-12-13 07:42:14 -05:00
Greg Johnston
035f929d3b Merge class prop back into A component 2022-12-12 13:39:19 -05:00
Greg Johnston
43ffa1bcd7 Use Fn() -> Fragment for component children, and update router and Suspense/Transition 2022-12-10 22:12:08 -05:00
Greg Johnston
4b970b3f1c Fix rerendering issue 2022-12-10 14:06:49 -05:00
Greg Johnston
bcb130deca Working on router 2022-12-10 09:15:05 -05:00
Greg Johnston
5bdd150347 Get router working with new renderer 2022-12-10 08:32:58 -05:00
Greg Johnston
c01dba5138
Merge pull request #160 from gbj/component-documentation
Allows documenting `Component` and `ComponentProps` in a single doc comment
2022-12-09 14:27:36 -05:00
Greg Johnston
74ec8925dc Additional documentation for issue #156 2022-12-09 12:41:17 -05:00
Greg Johnston
baf3cc8712 Correct imports 2022-12-09 12:36:33 -05:00
Greg Johnston
23777ad67b Use leptos reexport of typed-builder crate 2022-12-09 12:30:21 -05:00
Greg Johnston
9d950b97ff Better error message for RouterIntegrationContext 2022-12-07 07:52:01 -05:00
Greg Johnston
5c45538e9f Make necessary changes for stable support for router and meta 2022-12-05 18:55:03 -05:00
Greg Johnston
19698d86b6 Allow styling <A/> component with class 2022-12-02 13:20:07 -05:00
Greg Johnston
21ef96806f Rename ToHref to something a little more generic 2022-12-02 13:04:37 -05:00
Greg Johnston
36de06f183 0.0.19 2022-11-27 09:13:21 -05:00
Greg Johnston
4800600e4f original_path() for <Outlet/> logic 2022-11-25 13:48:39 -05:00
Greg Johnston
a051b1e08c Proper <Outlet/> logic so we only rerender if it's actually a different parameter 2022-11-25 13:46:55 -05:00
Greg Johnston
d9ab70de0d Untrack <Outlet/> child to avoid rerenders 2022-11-25 07:57:09 -05:00
Greg Johnston
aaac1d37ac Untrack to avoid double-rendering <Outlet/> 2022-11-24 22:22:27 -05:00
Greg Johnston
498b5345d5 Fix Outlet 2022-11-24 08:51:53 -05:00
Greg Johnston
02a7af2c1e Reduce exponential rerenders to max of 2 2022-11-24 08:40:47 -05:00
Greg Johnston
588ebf51a5 Fix event type in router 2022-11-23 16:54:45 -05:00
Greg Johnston
4f205b5368 0.0.18 2022-11-22 07:32:12 -05:00
Greg Johnston
2651bf5fef Fix meta and router tests 2022-11-21 22:45:56 -05:00
Greg Johnston
014b5f9453 Update note in router docs 2022-11-21 09:54:10 -05:00
Greg Johnston
55896d97b8 Clear warning 2022-11-21 09:40:48 -05:00
Greg Johnston
5e532b60b0 prevent_default until after navigation so a failed navigation will fall back to browser navigation 2022-11-21 09:40:42 -05:00
Greg Johnston
a3181dea64 Clear some form-related warnings 2022-11-21 09:35:09 -05:00
Greg Johnston
1f1218bbb7 Fix broken links and other issues in docs 2022-11-21 09:25:09 -05:00
Greg Johnston
986cd2979a Remove unused Request/Response stuff in router 2022-11-20 22:13:31 -05:00
Greg Johnston
8b3a8489b6 handle_server_fns for Axum 2022-11-20 22:13:17 -05:00
Greg Johnston
ad880efc0d leptos 0.0.17 and leptos_router 0.0.3 2022-11-18 15:45:04 -05:00
Greg Johnston
5ff806d35a
Merge pull request #92 from gbj/action-api
`Action` and `MultiAction` API changes
2022-11-18 15:21:07 -05:00
Greg Johnston
412693c2c3 MultiAction, create_multi_action, create_server_multi_action, and MultiActionForm 2022-11-18 13:25:46 -05:00
Greg Johnston
d530b28348 Give direct access to input and value fields on actions 2022-11-18 10:56:00 -05:00
Greg Johnston
7ad8a6bef2 Clear up some r-a issues (and allow for stable in future) 2022-11-17 20:30:32 -05:00
Greg Johnston
e26393a42c Fix router issues 2022-11-17 20:30:18 -05:00
Greg Johnston
77504de8f1 Correctly set value and input when using <ActionForm/> so we can do real optimistic UI (see issue #51) 2022-11-16 20:16:21 -05:00
Greg Johnston
b0f64aacba leptos_router should default to csr like leptos and leptos_macro 2022-11-14 17:31:45 -05:00
Greg Johnston
22eaa92355 Use serde_urlencoded for server functions (making it easier to use normal text inputs for forms) 2022-11-14 08:18:01 -05:00
Greg Johnston
3ad2129a4c Remove unused import 2022-11-08 22:00:25 -05:00
Greg Johnston
4e4b513c1b Fix panic if you redirect immediately in a route component 2022-11-08 21:59:25 -05:00
Greg Johnston
f75d49fe4c Router 0.0.2 2022-11-05 22:23:12 -04:00
Greg Johnston
2483616d0d Remove route data loaders for now. 2022-11-05 09:32:12 -04:00
Greg Johnston
2595ffe10e Fix doctests 2022-11-05 09:22:02 -04:00
Greg Johnston
221cdf2685 Doc updates, cleanups 2022-11-05 09:12:42 -04:00
Greg Johnston
bd652ec542 Adding docs 2022-11-04 16:50:03 -04:00
Greg Johnston
d8852f909e Remove action 2022-11-03 21:31:32 -04:00
Greg Johnston
e16cc4fc4a Remove actions 2022-11-03 21:11:59 -04:00
Greg Johnston
d5e3661bcf Remove actions (moved to leptos_server) 2022-11-03 21:07:05 -04:00
Greg Johnston
8873ddc40a Require docs 2022-11-03 21:06:46 -04:00
Greg Johnston
b7e2e983f0 Update main docs 2022-11-03 21:06:23 -04:00
Greg Johnston
b3c7de8460 Cargo, go home. You're drunk. (Optional dependencies are not features. Cargo bug we work around.) 2022-11-02 22:25:19 -04:00
Greg Johnston
db69145fd9 Sorting out all sorts of feature flags etc. so everything will build and test 2022-11-02 21:46:47 -04:00
Greg Johnston
19db83c933 Rename ServerForm to ActionForm 2022-11-02 07:49:40 -04:00
Greg Johnston
c034e84b1d Direct server fn => ServerForm interface per #43 2022-11-01 22:57:55 -04:00
Greg Johnston
292c3d8bb1 Support for POST in client-side forms 2022-10-30 20:37:50 -04:00
Greg Johnston
ae0fad5465 Abstract out ActixIntegration into a broader ServerIntegration and make it easier to use 2022-10-30 19:41:59 -04:00
Dan Heuckeroth
1f34d667fa Remove unnecessary Clone bounds 2022-10-23 21:24:31 -04:00
Greg Johnston
600eb8c1c9 serde, serde-lite, and miniserde features for resources 2022-10-22 16:22:44 -04:00
Greg Johnston
5c022879f1 Transition from serde to serde-lite to save Wasm binary size 2022-10-22 11:02:47 -04:00
Greg Johnston
1cacc6b52d Fix issues with route outlet reactivity 2022-10-21 22:13:35 -04:00
Greg Johnston
13d3fd82c8 Dispose of old routes 2022-10-21 15:28:00 -04:00
Greg Johnston
9bf3e804a1 Make <Form/> action dynamic in exchange for it being required. This is a pretty good trade, and more importantly it's needed to make forms work properly on routes using params without rerendering the entire form 2022-10-21 15:14:34 -04:00
Greg Johnston
289a1561f9 Remove extra logs 2022-10-21 15:02:12 -04:00
Greg Johnston
89b24bc52f Replace route loaders with resources in examples, as the loader API is going to change 2022-10-21 14:47:59 -04:00
Greg Johnston
0e1f3c567f Improve error messages by moving unwrap => expect 2022-10-20 17:48:38 -04:00
Greg Johnston
1bbbdbf29e Rationalize features and set up defaults so that a) users don't need to specify csr mode by default and b) tests pass without feature flags 2022-10-18 10:42:55 -04:00
hakesson
99b1c323a0 Add workspace and disable default ssr or csr features 2022-10-18 07:10:57 +02:00
Greg Johnston
ade1376eec Fix SSR with new run_scope_undisposed 2022-10-17 19:47:01 -04:00
Greg Johnston
bc8cf4e9fb IntoVec hasn't actually been necessary in a while due to changes in how I handle component children: this removes a nightly feature 2022-10-17 12:59:10 -04:00
Greg Johnston
4cb576940a loader_to_json only available as an SSR helper 2022-10-17 10:53:10 -04:00
Greg Johnston
3f7e7193ea Clearing up some of the flood of warnings for unused imports etc. that have come up as I've shifted around implementations 2022-10-17 10:45:20 -04:00
Greg Johnston
4c5518bd20 Helper for route loader JSON responses 2022-10-16 22:18:07 -04:00
Greg Johnston
3dd3870dbf Fixing/updating SSR/hydration and some bugs in new reactivity 2022-10-15 22:17:58 -04:00
Greg Johnston
d0127ce30d Initial work on Leptos Router docs and publishing crate 2022-10-14 17:29:22 -04:00
Greg Johnston
16f084a712 Fix Hacker News SSR/streaming/hydration 2022-10-13 18:53:31 -04:00
Greg Johnston
a03cee3faf Simply versioning of interrelated packages 2022-10-12 22:30:33 -04:00
Greg Johnston
6e89ea4447 Proc-macro hygiene by including cx in view! macro. :-( but necessary... 2022-10-10 20:44:44 -04:00
Greg Johnston
b6cdf43622 Fix issue #1 on route loaders reloading 2022-10-08 22:03:35 -04:00
Greg Johnston
3638f488c9 Change <Link/> and <NavLink/> to <A/>, and update router example 2022-10-08 21:34:59 -04:00
Greg Johnston
2d2f2a52a4 Update all libraries and examples to use new set_x API 2022-10-08 20:39:13 -04:00
Greg Johnston
10cc0fbef4 Clean up some dependency issues 2022-10-07 16:28:22 -04:00
Greg Johnston
c0c42fdf59 Clean up features/dependencies 2022-10-07 16:05:28 -04:00
Greg Johnston
a4f36102f1 Roll back leptos_dom 0.0.2 2022-10-07 07:05:05 -04:00
Greg Johnston
3327255440 Make leptos_dom submodules public (to allow use from macro) 2022-10-07 07:00:20 -04:00
Greg Johnston
b23a6b6a26 Add version number for leptos dependencies 2022-10-07 06:53:17 -04:00
Greg Johnston
97d7afec2e Fix authors field 2022-10-07 06:50:21 -04:00
Greg Johnston
5742cc8bd9 Set versions 2022-10-07 06:41:50 -04:00
Greg Johnston
450f521ad0 Nice quality-of-life improvement: if we don't need to reuse a param, can remove() it to get it owned 2022-10-07 06:25:41 -04:00
Greg Johnston
12db14cb40 Loader calls for subsequent page navigations in hydration mode 2022-10-05 20:37:29 -04:00
Greg Johnston
3d96e10937 Reorganize <Router/> and <Routes/> so that hydration isn't broken 2022-10-01 21:26:05 -04:00
Greg Johnston
862258e035 Make router integration easier 2022-09-30 15:57:35 -04:00
Greg Johnston
6365ac2c8c Stream resources using bincode => base64 instead of serde_json for bundle size and overall speed 2022-09-25 22:11:32 -04:00
Greg Johnston
f9ff54249a Make it clearer which hooks are reactive 2022-09-25 22:10:46 -04:00
Greg Johnston
d8cfa973f1 Get router working with SSR 2022-09-25 22:10:37 -04:00
Greg Johnston
0f110cd2a1 Initial <title> work for meta tags 2022-09-23 16:33:00 -04:00
Greg Johnston
010a8ad985 Hide all transition features under a feature flag for increased perf/marginally smaller bundle size when not needed 2022-09-21 19:38:42 -04:00
Greg Johnston
fa80ba261d Clear a warning 2022-09-20 15:37:45 -04:00
Greg Johnston
edd84f4ec5 Easily export ParamsMap to query string 2022-09-20 15:37:35 -04:00
Greg Johnston
1695f129e2 Cleanup 2022-09-20 14:31:06 -04:00
Greg Johnston
d4204241e8 Make href actually reactive 2022-09-17 17:09:00 -04:00
Greg Johnston
5eb2364b2c Fix <Form/> submission with ENTER button 2022-09-17 16:23:05 -04:00
Greg Johnston
23b9730fd3 Better warnings in loader 2022-09-17 10:38:40 -04:00
Greg Johnston
2c6a679ffb Lazy-evaluate children 2022-09-16 22:35:25 -04:00
Greg Johnston
6f96efed14 Strip unnecessary div wrapper 2022-09-14 22:17:04 -04:00
Greg Johnston
6a1eac0945 <Form/> component 2022-09-14 10:15:52 -04:00
Greg Johnston
d59147e355 use_query, use_query_map, use_navigate hooks 2022-09-14 10:15:45 -04:00
Greg Johnston
3ccd42c5b6 Router <Form/> component (GET only for now) 2022-09-14 10:14:47 -04:00
Greg Johnston
9bea0a85ae Improved flexibility in <Link href/> acceptable types 2022-09-14 10:14:18 -04:00
Greg Johnston
1c1c03b01a Fix bug parsing search params 2022-09-11 15:28:13 -04:00
Greg Johnston
80de7e9e12 Work on data streaming 2022-09-11 15:11:03 -04:00
Greg Johnston
4424361f57 Fixing hydration 2022-09-08 22:04:36 -04:00
Greg Johnston
133a088364 Progress on SSR/hydration 2022-09-07 15:43:35 -04:00
Greg Johnston
45d1bbc236 Create HackerNews app 2022-09-05 12:32:27 -04:00
Greg Johnston
a4a8a972b5 Rationalize features for CSR/SSR/hydration 2022-09-03 11:26:57 -04:00
Greg Johnston
54f37095dc Beginning work on SSR/hydration 2022-09-01 10:39:04 -04:00
Greg Johnston
dea973dac6 Making memos work 2022-09-01 10:38:56 -04:00
Greg Johnston
83bb874cd5 Memos should actually memoize 2022-09-01 10:38:10 -04:00
Greg Johnston
d1b5e652c1 Progress on nested routing, relative Link/NavLinks, etc 2022-08-29 08:04:00 -04:00
Greg Johnston
9233985738 Cleaning warnings 2022-08-25 15:04:30 -04:00
Greg Johnston
b602eea6bb New reactive system 2022-08-24 16:47:37 -04:00
Greg Johnston
41f415160a Remove Memo 2022-08-24 11:19:58 -04:00
Greg Johnston
7cfebcbfee Significant router work 2022-08-24 10:59:06 -04:00