Commit graph

4100 commits

Author SHA1 Message Date
Jonathan Kelley
44833c471f
Merge branch 'main' into jk/fix-form-inputs 2024-03-05 11:18:56 -08:00
Jonathan Kelley
608fec59e5
Merge pull request #1993 from DioxusLabs/fix-effect
Fix effect ordering and futures being run after scopes are dropped
2024-03-05 11:18:17 -08:00
Jonathan Kelley
b751674354
Web works with the js structure 2024-03-05 11:16:34 -08:00
Evan Almloff
287416cfa7 rename flush_sync to wait_for_next_render 2024-03-04 19:52:17 -06:00
Jonathan Kelley
16b38e339d
Merge branch 'main' into jk/fix-form-inputs 2024-03-04 17:46:38 -08:00
Jonathan Kelley
22266cc560
Switch to bun, clean up web implementation 2024-03-04 15:23:48 -08:00
Jonathan Kelley
38a2c04e38
Merge pull request #1983 from marc2332/fix/update-dioxus-router-docs
fix: Update `dioxus-router` docs
2024-03-04 14:21:52 -08:00
Jonathan Kelley
62d79747aa
Merge pull request #1987 from ealmloff/fix-fullstack-history
Fix fullstack history
2024-03-04 14:19:38 -08:00
Evan Almloff
2e3a730ed5 fix clippy 2024-03-04 16:10:04 -06:00
Evan Almloff
568631e331 test signal drops 2024-03-04 16:02:19 -06:00
Evan Almloff
8322b508a7 fix signals leaking memory 2024-03-04 15:51:14 -06:00
Evan Almloff
3827378f68 Merge branch 'main' into fix-effect 2024-03-04 15:40:37 -06:00
Evan Almloff
b42992bad1 add more internal documentation about tasks 2024-03-04 15:38:28 -06:00
Evan Almloff
fc7efd8006 test child future drop behavior 2024-03-04 15:26:16 -06:00
Evan Almloff
797feb5657 remove logging, clean up some code, and fix effect test 2024-03-04 15:09:31 -06:00
Evan Almloff
c4b8ebc1cf separate task and scope tasks 2024-03-04 13:04:22 -06:00
Evan Almloff
78b9b157dc fix formatting 2024-03-04 12:04:09 -06:00
Jonathan Kelley
199173a409
fix navigating when files are dropped 2024-03-01 23:37:46 -08:00
Jonathan Kelley
0ff0eb7846
Use the platform as the base interpreter instead of trying to extend it 2024-03-01 14:23:53 -08:00
Evan Almloff
a14e5be7ad Fix effect ordering after reruns 2024-03-01 12:46:07 -06:00
Evan Almloff
26f5fb80cb clean up the task queue 2024-03-01 12:18:42 -06:00
Jeremy Arnold
9ae3d14e67
Add tracing to virtual_dom (#1949)
Address #1161; Add tracing to virtual dom:

- Added a dependency on [tracing-fluent-assertions](https://github.com/tobz/tracing-fluent-assertions) for test cases
- Added a test case showing tracing


example log
```
2024-02-28T21:52:25.266474Z TRACE dioxus_core::scope_context: providing context alloc::rc::Rc<dioxus_core::error_boundary::ErrorBoundary> (TypeId { t: 86211292795840746005296084033382154959 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::virtual_dom::VirtualDom::new

  2024-02-28T21:52:25.266651Z TRACE dioxus_core::scope_context: looking for context generational_box::Owner<generational_box::sync::SyncStorage> (TypeId { t: 16187079142358387300491255137481079601 }) in app
    at packages/core/src/scope_context.rs:106
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266662Z TRACE dioxus_core::scope_context: context generational_box::Owner<generational_box::sync::SyncStorage> (TypeId { t: 16187079142358387300491255137481079601 }) not found
    at packages/core/src/scope_context.rs:140
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266671Z TRACE dioxus_core::scope_context: providing context generational_box::Owner<generational_box::sync::SyncStorage> (TypeId { t: 16187079142358387300491255137481079601 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266713Z TRACE dioxus_core::scope_context: providing context dioxus_signals::reactive_context::ReactiveContext (TypeId { t: 86476382904980360086558195405008306005 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266723Z TRACE dioxus_core::scope_context: looking for context generational_box::Owner (TypeId { t: 87785542931436862771411509553978749471 }) in app
    at packages/core/src/scope_context.rs:106
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266730Z TRACE dioxus_core::scope_context: context generational_box::Owner (TypeId { t: 87785542931436862771411509553978749471 }) not found
    at packages/core/src/scope_context.rs:140
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266769Z TRACE dioxus_core::scope_context: providing context generational_box::Owner (TypeId { t: 87785542931436862771411509553978749471 }) in app
    at packages/core/src/scope_context.rs:189
    in dioxus_core::scope_arena::render with scope: app
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266828Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:60:5:1728", roots: [Element { tag: "div", namespace: None, attrs: [], children: [Element { tag: "button", namespace: None, attrs: [Dynamic { id: 0 }], children: [Text { text: "+" }] }, Element { tag: "button", namespace: None, attrs: [Dynamic { id: 1 }], children: [Text { text: "-" }] }, Element { tag: "ul", namespace: None, attrs: [], children: [Dynamic { id: 0 }] }] }], node_paths: [[0, 2, 0]], attr_paths: [[0, 0], [0, 1]] } }, dynamic_nodes: [Placeholder(VPlaceholder)], dynamic_attrs: [[Attribute { name: "onclick", value: Listener, namespace: None, volatile: false }], [Attribute { name: "onclick", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(0) } }, mount: MountId(0)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::rebuild

  2024-02-28T21:52:25.266896Z TRACE dioxus_core::virtual_dom: Calling 1 listeners
    at packages/core/src/virtual_dom.rs:695
    in dioxus_core::virtual_dom::VirtualDom::handle_bubbling_event with parent: Some(ElementRef { path: ElementPath { path: [0, 0] }, mount: MountId(0) }), name: "click"
    in dioxus_core::virtual_dom::VirtualDom::handle_event with name: "click", data: Any { .. }, element: ElementId(2), bubbles: true

  2024-02-28T21:52:25.266934Z TRACE dioxus_core::virtual_dom: Marking scope ScopeId(0) (app) as dirty
    at packages/core/src/virtual_dom.rs:379
    in dioxus_core::virtual_dom::VirtualDom::process_events

  2024-02-28T21:52:25.266997Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:71:37:2059", roots: [Dynamic { id: 0 }], node_paths: [[0]], attr_paths: [] } }, dynamic_nodes: [Component(VComponent { name: "ChildExample" })], dynamic_attrs: [] }, mount: Cell { value: MountId(1) } }, mount: MountId(1)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267026Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:81:5:2238", roots: [Element { tag: "li", namespace: None, attrs: [Dynamic { id: 0 }], children: [DynamicText { id: 0 }] }], node_paths: [[0, 0]], attr_paths: [[0]] } }, dynamic_nodes: [Text(VText { value: "0" })], dynamic_attrs: [[Attribute { name: "onmouseover", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(2) } }, mount: MountId(2)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267061Z TRACE dioxus_core::virtual_dom: Calling 1 listeners
    at packages/core/src/virtual_dom.rs:695
    in dioxus_core::virtual_dom::VirtualDom::handle_bubbling_event with parent: Some(ElementRef { path: ElementPath { path: [0, 0] }, mount: MountId(0) }), name: "click"
    in dioxus_core::virtual_dom::VirtualDom::handle_event with name: "click", data: Any { .. }, element: ElementId(2), bubbles: true

  2024-02-28T21:52:25.267084Z TRACE dioxus_core::virtual_dom: Marking scope ScopeId(0) (app) as dirty
    at packages/core/src/virtual_dom.rs:379
    in dioxus_core::virtual_dom::VirtualDom::process_events

  2024-02-28T21:52:25.267131Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:71:37:2059", roots: [Dynamic { id: 0 }], node_paths: [[0]], attr_paths: [] } }, dynamic_nodes: [Component(VComponent { name: "ChildExample" })], dynamic_attrs: [] }, mount: Cell { value: MountId(3) } }, mount: MountId(3)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267157Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:81:5:2238", roots: [Element { tag: "li", namespace: None, attrs: [Dynamic { id: 0 }], children: [DynamicText { id: 0 }] }], node_paths: [[0, 0]], attr_paths: [[0]] } }, dynamic_nodes: [Text(VText { value: "1" })], dynamic_attrs: [[Attribute { name: "onmouseover", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(4) } }, mount: MountId(4)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267206Z TRACE dioxus_core::virtual_dom: Calling 1 listeners
    at packages/core/src/virtual_dom.rs:695
    in dioxus_core::virtual_dom::VirtualDom::handle_bubbling_event with parent: Some(ElementRef { path: ElementPath { path: [0, 0] }, mount: MountId(0) }), name: "click"
    in dioxus_core::virtual_dom::VirtualDom::handle_event with name: "click", data: Any { .. }, element: ElementId(2), bubbles: true

  2024-02-28T21:52:25.267229Z TRACE dioxus_core::virtual_dom: Marking scope ScopeId(0) (app) as dirty
    at packages/core/src/virtual_dom.rs:379
    in dioxus_core::virtual_dom::VirtualDom::process_events

  2024-02-28T21:52:25.267274Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:71:37:2059", roots: [Dynamic { id: 0 }], node_paths: [[0]], attr_paths: [] } }, dynamic_nodes: [Component(VComponent { name: "ChildExample" })], dynamic_attrs: [] }, mount: Cell { value: MountId(5) } }, mount: MountId(5)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate

  2024-02-28T21:52:25.267297Z  INFO dioxus_core::diff::node: creating template, self: VNode { vnode: VNodeInner { key: None, template: Cell { value: Template { name: "packages/core/tests/tracing.rs:81:5:2238", roots: [Element { tag: "li", namespace: None, attrs: [Dynamic { id: 0 }], children: [DynamicText { id: 0 }] }], node_paths: [[0, 0]], attr_paths: [[0]] } }, dynamic_nodes: [Text(VText { value: "2" })], dynamic_attrs: [[Attribute { name: "onmouseover", value: Listener, namespace: None, volatile: false }]] }, mount: Cell { value: MountId(6) } }, mount: MountId(6)
    at packages/core/src/diff/node.rs:547
    in dioxus_core::virtual_dom::VirtualDom::render_immediate
```
2024-02-29 17:49:35 -06:00
Jonathan Kelley
d9cb6dd1ec
Merge pull request #1985 from fdgStilla/fix-svg-image
Restore image element under svg element
2024-02-29 12:31:59 -08:00
Jonathan Kelley
d61c3fab20
Merge branch 'main' into debug-subscriptions 2024-02-29 12:30:27 -08:00
Evan Almloff
c7ffdc7b29 rerun tasks in the same order as components 2024-02-29 11:43:07 -06:00
Evan Almloff
55f308363d expose non-blocking functions to read and write to the fullstack request 2024-02-29 10:39:02 -06:00
Evan Almloff
8a969a26dc make interpreter extend the interpreter core class 2024-02-28 11:22:15 -06:00
Evan Almloff
b58a3bb759
Merge pull request #1984 from agreyyy/main
Add better documentation to use_future, use_resource, use_effect and use_context
2024-02-28 08:55:38 -06:00
Andrey
1404009edc
touchups 2024-02-28 03:48:52 +00:00
andrey
70136b22ea Fix error in examples/future.rs comments, use_futures inline docs comments, also added clarification that Signal<T>.read() and Singal<T>() are the same thing 2024-02-28 11:42:04 +08:00
Jonathan Kelley
f196514b4f
change serialization 2024-02-27 19:23:36 -08:00
Jonathan Kelley
925d0617da
add glue to webonly interpreter 2024-02-27 16:39:40 -08:00
Jonathan Kelley
774fba85e4
track the configs too 2024-02-27 16:36:25 -08:00
Jonathan Kelley
f447f01403
Commit js 2024-02-27 16:33:34 -08:00
Jonathan Kelley
4b64894fc5
Add proper bundling to tsc 2024-02-27 16:33:18 -08:00
Evan Almloff
fe839ab347 Move some global variables in the interpreter into locals in the interpreter 2024-02-27 15:15:12 -06:00
Jonathan Kelley
bdacca0dfb
use this. on the unified bindings 2024-02-27 12:55:47 -08:00
Jonathan Kelley
206a48257b
Merge branch 'main' into jk/fix-form-inputs 2024-02-27 12:50:57 -08:00
Jonathan Kelley
0c4c0e70e5
Merge pull request #1986 from ealmloff/bump-sledgehammer-bindgen
Bump the sledgehammer bindgen version
2024-02-27 12:33:10 -08:00
Jonathan Kelley
b5447c162f
extend interpreter base class with platform methods 2024-02-27 12:31:11 -08:00
Evan Almloff
acbc1f6a47 fix headless tests on desktop 2024-02-27 12:19:34 -06:00
Evan Almloff
271b53e866 Update the liveview renderer to the new sledgehammer version 2024-02-27 11:46:40 -06:00
Evan Almloff
f7209e123f
restore the docs for the image element 2024-02-27 10:36:45 -06:00
Evan Almloff
93ee53454f bump the sledgehammer bindgen version 2024-02-27 10:35:16 -06:00
Florian de Gaulejac
5dad13ac74 Restore image element under svg element 2024-02-27 09:18:18 +01:00
andrey
5a73147d69 added better documentation and code snipppets for the use_resource, use_future, use_effect and use_context hooks 2024-02-27 10:36:05 +08:00
andrey
24ebc1e628 added better documentation and code snipppets for the use_resource, use_future, use_effect and use_context hooks 2024-02-27 10:32:55 +08:00
andrey
df0d45be48 added better documentation and code snipppets for the use_resource, use_future, use_effect and use_context hooks 2024-02-27 10:15:38 +08:00
marc2332
97478bcb13
fix unrelated to dioxus-router 2024-02-26 21:50:16 +01:00
marc2332
d3b9b764e0
fix: Update dioxus-router docs 2024-02-26 21:46:00 +01:00
Evan Almloff
277e4677e9 fix clippy 2024-02-26 11:49:05 -06:00
Evan Almloff
f539698963 add debug information for signal subscriptions 2024-02-26 11:46:01 -06:00
tigerros
e217a957dc fix 2024-02-24 14:36:02 +01:00
tigerros
24e8ac2ad3 fix warning 2024-02-24 13:30:50 +01:00
Jonathan Kelley
7f60010c1e
set up a typescript pipeline for interpreter 2024-02-23 18:52:21 -08:00
Jonathan Kelley
53cafefdef
wip: add tests and slightly refactor interpreter code 2024-02-23 17:38:04 -08:00
Jonathan Kelley
e0b0afc0a9
remove unsafe from tests in core 2024-02-22 17:46:51 -08:00
Jonathan Kelley
48d6a9acbb
Add logging to event checker 2024-02-22 13:55:29 -08:00
Jonathan Kelley
2ead6c6074
give longer window for events 2024-02-22 12:33:58 -08:00
Jonathan Kelley
8f70f8936f
wip: consolidate release 2024-02-21 19:36:33 -08:00
Jonathan Kelley
37b8fd0135
Merge branch 'main' into jk/05-pre 2024-02-21 16:15:33 -08:00
Jonathan Kelley
0ae0929691
fix: some simple formatting and version numbers 2024-02-21 14:32:19 -08:00
Jonathan Kelley
be29c1fdaa
chore: move all packages onto workspace versions 2024-02-21 14:30:13 -08:00
Jonathan Kelley
36fe5e30cb
chore: clean up cargo.tomls to enable releasing 2024-02-21 14:16:01 -08:00
Florian de Gaulejac
83cd04fd17 Fix name for SVG attribute "type" 2024-02-21 15:31:10 +01:00
Evan Almloff
36ae7ec12e wrap fullstack rebuilds in block in place 2024-02-19 14:59:58 -06:00
Evan Almloff
c4a4a31eec Merge branch 'master' into pr/atty303/1948 2024-02-19 08:35:31 -06:00
Evan Almloff
6724847685 swap out web-time for chrono 2024-02-19 08:03:29 -06:00
Jonathan Kelley
ebdb98bff2
Make clippy happy, pass tests 2024-02-18 21:08:48 -08:00
Jonathan Kelley
d732269b8f
backend proxy tests almost work! 2024-02-18 09:45:27 -08:00
Evan Almloff
14b4af4bbc fix cargo check all features except the router 2024-02-16 16:22:13 -06:00
Evan Almloff
2952578a2e add a streaming example 2024-02-16 16:04:12 -06:00
Evan Almloff
31a7d2ac04 remove the nightly feature from the server macro crate 2024-02-16 15:27:48 -06:00
Evan Almloff
e7d8a25d17 get the dioxus CLI compiling 2024-02-16 14:55:44 -06:00
Evan Almloff
30af559275 add tracing to server function registration 2024-02-16 14:19:36 -06:00
Koji AGAWA
1f0e03ca19 feat(fullstack): support wasm target 2024-02-17 05:12:33 +09:00
Evan Almloff
194d90e66f fix a few CLI errors 2024-02-16 12:39:36 -06:00
Evan Almloff
e745212157 bump server functions 2024-02-16 12:17:01 -06:00
Evan Almloff
6879507652 fix a few warnings when checking with all features 2024-02-16 09:09:35 -06:00
Evan Almloff
0ef29b7d75 reorganize fullstack 2024-02-16 09:03:35 -06:00
Jonathan Kelley
2763adb2d3
clean up workflow, fix some more axum stuff 2024-02-15 19:03:46 -08:00
Jonathan Kelley
64a321eacc
Get more axum stuff upgraded to 0.7 2024-02-15 18:59:57 -08:00
Jonathan Kelley
214a907adc
Upgrade to axum 0.7, drop 3rd party adapters 2024-02-15 18:05:30 -08:00
Jonathan Kelley
ea34eee20a
Remove ssr eval from fullstack 2024-02-14 17:00:12 -08:00
Jonathan Kelley
d1d70995c4
Remove eval from incremental 2024-02-14 16:51:05 -08:00
Jonathan Kelley
22a5acfcb8
Remove SSR evalulator 2024-02-14 16:38:05 -08:00
Jonathan Kelley
cbadea022a
Eval should never return an error
Only awaiting eval should error.
Eval should always be available, even if using its methods returns errors.
2024-02-14 15:13:15 -08:00
Jonathan Kelley
1145ed7534
Merge pull request #1933 from ealmloff/restore-rendering-check
Only subscribe scopes to signals when rendering
2024-02-14 14:29:08 -08:00
Jonathan Kelley
77c80ea715
Merge pull request #1939 from DioxusLabs/jk/examples-overhaul
Add more examples, document examples, add css to most examples
2024-02-14 14:28:56 -08:00
Evan Almloff
d1c0e0a5e0 comment out the memo tests for now 2024-02-14 15:55:19 -06:00
Jonathan Kelley
60b78668ac
Merge branch 'master' into jk/examples-overhaul 2024-02-14 12:33:27 -08:00
Jonathan Kelley
bdbae8ccb0
Update examples, add css 2024-02-14 12:33:07 -08:00
Evan Almloff
05a6dda89c fix formatting 2024-02-14 12:13:54 -06:00
Evan Almloff
649d264a38 fix clippy 2024-02-14 12:13:21 -06:00
Evan Almloff
78ef453888 simplify memo test failure 2024-02-14 11:38:09 -06:00
Evan Almloff
5f8d0f6c40 add a third party feature for freya 2024-02-14 09:56:29 -06:00
Evan Almloff
f42bc61288 warn the user if they try to launch without a renderer selected 2024-02-14 09:50:55 -06:00
Evan Almloff
48751d2f98 only subscribe scopes to signals when rendering 2024-02-14 09:33:22 -06:00
Evan Almloff
476b2ac88a fix client side suspense 2024-02-12 08:56:27 -06:00
Evan Almloff
8e007cc137 fix the web renderer panicing when the hot reload connection fails 2024-02-11 13:35:34 -06:00