Commit graph

246 commits

Author SHA1 Message Date
Evan Almloff
af1749d7be re export renderers in dioxus 2024-01-15 19:14:11 -06:00
Jonathan Kelley
9881a94e67
Remove cx in more places 2024-01-13 21:18:36 -08:00
Jonathan Kelley
1dde044697
remove cx.render 2024-01-13 21:12:21 -08:00
Jonathan Kelley
fae0b08e61
Fix the router and stub out a number of crates to get compiling 2024-01-13 20:51:37 -08:00
Jonathan Kelley
2ae3241cc0
Merge branch 'master' into jk/breaking-merged 2024-01-11 16:04:36 -08:00
Evan Almloff
e004c1722f set the required environment variable for manganis support 2024-01-10 11:19:51 -06:00
Evan Almloff
663296ae45 make collect-assets not optional in dioxus fullstack 2024-01-09 13:58:28 -06:00
Jonathan Kelley
28a9dc6805
Pin assets sha to keep CI in check 2024-01-08 14:54:02 -08:00
ealmloff
01c2691953
fix duplicate serde dependancy 2024-01-08 13:30:08 -06:00
Evan Almloff
b180b501f7 Merge branch 'master' into fullstack-binary-size-compile-times 2024-01-08 13:18:05 -06:00
Evan Almloff
f4af297777 merge upstream 2024-01-06 16:14:22 -06:00
Evan Almloff
3865f44081 make desktop compile 2024-01-05 14:39:45 -06:00
Evan Almloff
b1de7d850c Merge branch 'master' into intigrate-collect-assets 2024-01-04 18:44:29 -06:00
Jonathan Kelley
1a8bf13ff5
Merge branch 'master' into resilient-hydration 2024-01-04 10:28:41 -08:00
Jonathan Kelley
922d9c8c05
Merge branch 'master' into fix-event-bubbling 2024-01-04 10:06:27 -08:00
Jonathan Kelley
20a080d6c0
Merge pull request #1738 from ealmloff/bump-salvo-utils
Bump the version of Salvo
2024-01-04 09:55:50 -08:00
Evan Almloff
422df68fea fix formatting 2024-01-03 15:35:24 -06:00
ealmloff
937be8b752
fix the on double click event and depreciate ondblclick (#1743) 2024-01-03 14:02:08 -06:00
Evan Almloff
b7aea9653f fix server cached docs 2023-12-27 10:25:42 -06:00
Evan Almloff
e2646e655e fix hydration after suspense 2023-12-27 10:17:18 -06:00
Evan Almloff
8b125231f0 make backend and frontend builds happen in parallel 2023-12-21 18:04:35 -06:00
Evan Almloff
37e9876a70 bump salvo 2023-12-20 15:18:20 -06:00
Evan Almloff
2d7d721fd6 make hydration more resilient using ids to hydrate 2023-12-19 16:02:07 -06:00
ealmloff
56478d1856
Merge branch 'DioxusLabs:master' into fix-event-bubbling 2023-12-16 06:34:00 -06:00
Evan Almloff
66e2c02bf7 Merge branch 'master' into intigrate-collect-assets 2023-12-08 08:49:17 -06:00
Evan Almloff
df57cc7d9c fix disconnects that happen while a server function is being resolved 2023-12-07 08:29:14 -06:00
Jonathan Kelley
3b63791ec1
Merge pull request #1485 from ealmloff/make-fullstack-layer-public
Make the layer module public in fullstack
2023-12-06 21:34:38 -08:00
Jonathan Kelley
ae8eaf80a2
Merge pull request #1612 from ealmloff/ssr-eval
Add a noop evaluator to the ssr renderer
2023-12-06 21:17:36 -08:00
Ben Sully
04fd2487b3
feat(fullstack): add render_handler_with_state (#1687)
* feat(fullstack): add `render_handler_with_state`

When using server functions, the current pattern to access state such as
database connections is to use `register_server_fns_with_handler` on an
Axum router and 'inject' the state into the context provided to the
server function. However, this only affects function calls which go via
the Axum router; SSR renders bypass this, and therefore don't have
access to any state.

This commit adds an alternative `render_handler` which accepts some
additional state. That state is injected into the context in a
similar manner to `register_server_fns_with_handler`. SSR renders can
then proceed to run in the same way as HTTP calls.

* Change state object to 'inject_state' callback

Also add a compiling doctest example.

* remove the explicit for<'a> lifetime

* remove unused assets_path from render_handler_with_context example

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-12-05 14:10:18 -06:00
Evan Almloff
23090cb56b optimize fullstack compile times 2023-11-21 14:46:47 -06:00
XiaoZhang
aa284d7e93
Fix grammar typo in comment (#1652) 2023-11-20 08:24:16 -06:00
Evan Almloff
a120af33ad Merge branch 'master' into fix-event-bubbling 2023-11-11 17:53:47 -06:00
Joshua Wolfe
8ea7f076e5
Updated server_fn to 0.5.2 (#1620) 2023-11-08 08:33:41 -06:00
Evan Almloff
b9554fd744 add a noop evaluator to the ssr renderer 2023-11-05 08:32:39 -06:00
Evan Almloff
d9b32afd64 add error message when overlapping fullstack features are enabled 2023-10-23 12:45:10 -05:00
Evan Almloff
9d19f4d204 fix clippy 2023-10-16 10:44:08 -05:00
Evan Almloff
3bf6d2d7cf add must use to several hooks 2023-10-14 12:08:54 -05:00
Evan Almloff
426a342700 add logs when the desktop or fullstack application is collecting assets 2023-10-10 10:26:16 -05:00
Evan Almloff
d2f0f4b4b6 document layer and service 2023-09-25 12:25:21 -05:00
Evan Almloff
d994e3e722 make the layer module public in fullstack 2023-09-23 07:57:41 -05:00
Leonard
07613c806b
Fix #1367 (#1471)
* Bump cargo_toml to 1.16.0

* Format
2023-09-18 18:51:04 -05:00
Evan Almloff
98335bd9a6 Merge branch 'master' into fix-event-bubbling 2023-09-17 20:00:22 -05:00
Evan Almloff
f976e08f71 Merge branch 'master' into intigrate-collect-assets 2023-09-17 19:40:14 -05:00
Jonathan Kelley
a7551d1e63
Merge branch 'master' into log-server-errors 2023-09-16 12:00:54 -07:00
marc2332
7f8c963cd9
fix: Update doc links from v3 to v4 2023-09-16 19:03:27 +02:00
Leonard
c866ae602b
Add system for creating component attributes + new #[component] attribute (#1448)
* Add `#[component]` attribute + system for creating component attributes + other stuff

* Delete inlineprops.rs

* Update inline_props.rs

* Cargo fmt

* Fix clippy warnings and paths in props/mods.rs

* Include where clause in `#[inline_props]` output

* Allow Clippy type complexity in `LinkProps`

* Allow the type complexity lint for the entire link.rs file

* Remove snake_case -> PascalCase converter, but rather enforce PascalCase

Also:
- Put the second function inside the main one instead of besides it.
- Simplify

* Simplify type check lints so they don't return false positives

They will not always work, but they won't return any false positives, like for aliases. This is likely going to be replaced by a more polished Clippy-backed linting system.

* Fix #583

* Cargo fmt

* Add docs for `deserialize()` and remove useless comment

* Add `#[component]` to prelude

* Merge branch 'master' of https://github.com/tigerros/dioxus

* #[inline_props] is no more. Except in the docs folder, but that's going to be removed

* Remove docs folder

* Remove docs from workspace

* Resolve `DeserializerOutput` conversation
2023-09-15 09:13:36 -05:00
Evan Almloff
bdaa284c14 fix formatting 2023-09-12 09:12:32 -05:00
Evan Almloff
6e74d08bf5 remove log from a few examples 2023-09-11 19:42:08 -05:00
Evan Almloff
c55c17cb81 switch to tracing for logging 2023-09-06 17:47:33 -05:00
Evan Almloff
c5ebdc9635 fix parents in placeholder diffing 2023-08-31 14:17:26 -05:00
Dan Lock
92a8669e14
Make launch functions pub (#1288)
* Make launch functions pub

* add docs to web, desktop, and server launch functions

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-08-09 11:26:50 -05:00
gmorenz
2a32271fa0
Set response headers from response, not request, parts (#1328) 2023-08-08 21:04:15 -05:00
Evan Almloff
65102b70c7 return more useful messages when a server function errors 2023-08-07 11:09:51 -07:00
Jonathan Kelley
88cca9c949
Merge pull request #1285 from Demonthos/flexable-server-function-features
Make server function features flexible
2023-08-03 12:16:32 -07:00
Evan Almloff
d33ea087d0 make server function features flexible 2023-08-03 11:13:43 -07:00
Evan Almloff
97eedd22c5 fix fullstack docs building 2023-08-03 10:45:50 -07:00
Jonathan Kelley
39e89c1fac
Bump crate versions, fix any publish errors 2023-07-31 18:49:54 -07:00
Jonathan Kelley
8a875acdd2
Adjust versions, add authors, move server macro to top level 2023-07-31 17:59:36 -07:00
Jonathan Kelley
09cce6bdfb
Merge pull request #1270 from Demonthos/add-authors
Add authors to all crates
2023-07-31 17:38:44 -07:00
Jonathan Kelley
59016007f2
Merge pull request #1251 from DioxusLabs/make-ssr-state-public
Make SsrState public
2023-07-31 17:37:35 -07:00
Evan Almloff
3eab363e51 Add authors to all crates 2023-07-31 17:30:18 -07:00
Jonathan Kelley
e1dcc335c0
Merge pull request #1263 from Demonthos/builder-launch-fullstack
Switch to launch builder instead of macro for fullstack
2023-07-31 11:44:36 -07:00
Evan Almloff
fcb993a2cb don't spawn a new runtime every request 2023-07-28 13:14:26 -07:00
Evan Almloff
cabeacfcee fix formatting 2023-07-28 13:04:56 -07:00
Evan Almloff
9f891f9478 switch to launch builder instead of macro for fullstack 2023-07-28 12:58:34 -07:00
Jonathan Kelley
5e3451a6f2
Quiet cargo warnings 2023-07-26 21:02:39 -07:00
Jonathan Kelley
418c03e2cd
Merge pull request #1252 from Demonthos/non-generic-link
Remove autogenerated functions/components from the routable macro
2023-07-26 18:11:32 -07:00
Evan Almloff
d2ec27e761 fix clippy 2023-07-26 11:29:34 -07:00
Evan Almloff
5f0dd3af3e it almost lives? 2023-07-25 18:14:48 -07:00
Evan Almloff
a4ed9bc0ef make ssrstate public 2023-07-25 15:29:40 -07:00
Evan Almloff
c19420cb29 fix root component suspense 2023-07-25 12:51:12 -07:00
ealmloff
d637ef187c
fix all broken examples (#1248) 2023-07-25 14:30:08 -05:00
Evan Almloff
61dc549ba1 Make new enum router less breaking 2023-07-24 11:57:56 -07:00
Miles Murgaw
6210c6fefe
Convert use_eval to use send/recv system (#1080)
* progress: reworked

don't run this, it'll kill your web browser

* feat: use_eval but with comms

* revision: async recv & recv_sync

* revision: use_eval

* revision: standard eval interface

* revision: use serde_json::Value instead of JsValue

* revision: docs

* revision: error message

* create: desktop eval (wip)

* fix: desktop eval

* revision: wrap use_eval in Rc<RefCell<_>>

* fix: fmt, clippy

* fix: desktop tests

* revision: change to channel system

- fixes clippy errors
- fixes playwright tests

* fix: tests

* fix: eval example

* fix: fmt

* fix: tests, desktop stuff

* fix: tests

* feat: drop handler

* fix: tests

* fix: rustfmt

* revision: web promise/callback system

* fix: recv error

* revision: IntoFuture, functionation

* fix: ci

* revision: playwright web

* remove: unescessary code

* remove dioxus-html from public examples

* prototype-patch

* fix web eval

* fix: rustfmt

* fix: CI

* make use_eval more efficient

* implement eval for liveview as well

* fix playwright tests

* fix clippy

* more clippy fixes

* fix clippy

* fix stack overflow

* fix desktop mock

* fix clippy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-07-21 17:36:25 -05:00
Jonathan Kelley
3af0355196
Merge pull request #1199 from Demonthos/use-server-function
Use server function hook
2023-07-20 12:49:47 -07:00
Jonathan Kelley
91d4207fa7
Merge branch 'master' into feature/use-shared-state-better-diagnostics 2023-07-20 10:51:10 -07:00
Andrea Frigido
dccad58f1d Update license field following SPDX 2.1 license expression standard 2023-07-20 18:00:07 +01:00
Evan Almloff
f55375b8ce simplify fullstack hello world examples 2023-07-19 16:57:43 -07:00
Evan Almloff
7e2ef1260f Merge branch 'master' into use-server-function 2023-07-19 14:19:03 -07:00
Jonathan Kelley
31a68a9743
Rename dioxus to dx 2023-07-18 18:33:14 -07:00
Evan Almloff
f3d1600822 fix clippy 2023-07-18 10:40:09 -07:00
Evan Almloff
8e54a89a74 fix use_server_future 2023-07-17 17:23:15 -07:00
Evan Almloff
4ab30c9e76 remove cargo cache 2023-07-17 16:50:30 -07:00
Evan Almloff
dd5d974aeb fix suspense 2023-07-17 16:48:54 -07:00
Evan Almloff
b05fb16155 fix server_cached function 2023-07-17 09:48:35 -07:00
Evan Almloff
040b9d15a8 document from_server 2023-07-14 17:39:46 -07:00
Evan Almloff
de72d85391 create server_cached function 2023-07-14 17:23:12 -07:00
Evan Almloff
128f3e4425 fix nested routers 2023-07-13 19:29:43 -07:00
Evan Almloff
c6ddee6f21 remove the extract macro 2023-07-12 16:20:44 -06:00
niedzwiedzw
f159779af4 make thiserror a workspace dependency everywhere else 2023-07-11 22:54:24 +02:00
Evan Almloff
0636e94f37 fix clippy 2023-07-10 19:34:45 -05:00
ealmloff
39ec5f498c
Merge branch 'master' into router-typesafe 2023-07-10 19:16:39 -05:00
Evan Almloff
831bcfd8e7 Fix warp fullstack adapter 2023-07-10 19:14:13 -05:00
Evan Almloff
0e83d48c04 Fix salvo fullstack builds 2023-07-10 18:48:55 -05:00
Evan Almloff
73a45fb113 fix incremental router cache 2023-07-08 12:22:54 -07:00
Evan Almloff
d94316f7dd fix formatting 2023-07-08 11:03:16 -07:00
Evan Almloff
6a3198ef85 cargo fix axum 2023-07-08 10:58:04 -07:00
Evan Almloff
1e5c57dd16 cargo fix 2023-07-08 10:57:44 -07:00
Evan Almloff
7c2bf4c5ed fix formatting 2023-07-08 10:56:10 -07:00
Evan Almloff
fd98b51dfe fix auth example 2023-07-08 10:42:15 -07:00
Evan Almloff
27b0c2683b create auth example 2023-07-08 10:37:28 -07:00
Evan Almloff
453d087ed6 fix prop serialization 2023-07-08 09:13:24 -07:00
Marc Espín
32d4472bfd
fix: Remove duplicated doc links and improved some descriptions (#1167) 2023-07-08 11:04:27 -05:00
Evan Almloff
f0d1346652 remove unsafe from fullstack and ssr 2023-07-07 19:15:25 -07:00
Evan Almloff
206ab4cdb2 fix formatting 2023-07-07 19:05:15 -07:00
Evan Almloff
576bc61855 fix playwrite tests 2023-07-07 19:03:25 -07:00
Evan Almloff
aa26c086de fix clippy 2023-07-07 18:41:22 -07:00
Evan Almloff
41f9c480c8 remove old references to server context 2023-07-07 18:39:18 -07:00
Evan Almloff
14883bb711 add server function middleware 2023-07-07 18:25:45 -07:00
Evan Almloff
c49c75cb60 remove props compression 2023-07-07 11:08:27 -07:00
Evan Almloff
7597068af6 integrate extractors with the macro 2023-07-07 11:03:59 -07:00
Evan Almloff
4f6e6a7c0d add extractors to server-fn 2023-07-06 17:54:05 -07:00
Evan Almloff
e883e8d0dd fix static generation example compiling 2023-07-06 11:24:52 -07:00
Evan Almloff
b7ea3580c2 add static generation hydrated example 2023-07-06 10:52:09 -07:00
Evan Almloff
f53dd5c181 remove logging 2023-07-04 11:54:41 -07:00
Evan Almloff
e7c3047aa1 apply headers to axum adapter 2023-07-04 09:19:22 -07:00
Evan Almloff
040055ba9d compress assets by default in the launch macro 2023-06-30 19:22:43 -07:00
Evan Almloff
b927e2fec8 change server_config -> serve_config 2023-06-30 18:48:12 -07:00
Evan Almloff
b334444711 formatting 2023-06-30 14:09:19 -07:00
Jon Kelley
86402d3e23
Merge pull request #1077 from Demonthos/end-to-end-testing
create end to end tests using playwright
2023-06-30 12:23:31 -07:00
Evan Almloff
f5c60eeb4c make fullstack helpers compatable with prerendering 2023-06-28 18:48:42 -07:00
Evan Almloff
a7f7aad947 fix errors for nested routes 2023-06-28 11:27:11 -07:00
Evan Almloff
7b1f0c9412 Merge branch 'master' into router-typesafe 2023-06-28 08:56:07 -07:00
Jon Kelley
dfa4d8d989
Merge pull request #1105 from Demonthos/workspace-dependancies
Workspace Dependancies
2023-06-27 10:17:12 -07:00
Evan Almloff
4fba279291 fix imports in the launch macro 2023-06-27 09:28:24 -07:00
Evan Almloff
6569827b97 remove debug handler 2023-06-26 12:54:04 -07:00
Evan Almloff
a165e13564 add cache headers 2023-06-24 13:21:12 -07:00
Evan Almloff
b8806b0854 remove brackets around address 2023-06-23 18:56:20 -07:00
Evan Almloff
99674fcf94 create server launch macro 2023-06-23 18:23:03 -07:00
Evan Almloff
1704ee0068 router/fullstack/ssr intigration 2023-06-22 16:51:48 -07:00
Evan Almloff
495fd22bfd Merge branch 'master' into router-typesafe 2023-06-22 12:52:11 -07:00
Evan Almloff
07215924bc WIP: fullstack router intigration 2023-06-22 12:51:10 -07:00
Evan Almloff
da44b7a3f2 fix salvo server function handler example 2023-06-19 16:11:59 -05:00
Evan Almloff
158852e5a0 make regestering server functions optional 2023-06-19 16:08:46 -05:00
Evan Almloff
5f873511c5 use workspace dependancies 2023-06-19 14:29:11 -05:00
Evan Almloff
741ff97882 create end to end tests using playwright 2023-06-05 13:48:58 -05:00
Evan Almloff
a9307e57e6 fix CI 2023-06-02 12:33:47 -05:00
Evan Almloff
07446386e6 fix external router examples 2023-06-01 14:10:33 -05:00
Nikita Pekin
71888f484e add default-tls and rustls features 2023-05-24 18:11:17 +02:00
Evan Almloff
4a8542c28e fix response spelling 2023-05-11 18:40:02 -05:00
Evan Almloff
40d30bb434 fix fullstack desktop example 2023-05-04 11:44:32 -05:00
Evan Almloff
ab1de6e53f finish server function docs 2023-05-04 09:57:11 -05:00
Evan Almloff
515aee6c3c reorganize the fullstack docs 2023-05-02 17:43:07 -05:00
Evan Almloff
a9375af2b4 remove ws message logging 2023-05-02 11:06:54 -05:00
Evan Almloff
fb6757484d pull out serve static assets methods 2023-05-02 11:05:21 -05:00
Evan Almloff
e6c540320e rename package to dioxus-fullstack 2023-05-02 10:15:34 -05:00