Commit graph

226 commits

Author SHA1 Message Date
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