Commit graph

124 commits

Author SHA1 Message Date
Evan Almloff
4a622348f2
Fix the mobile feature on the dioxus crate (#2185) 2024-03-29 18:22:41 -07:00
David McNeil
d16ac4e736
Bump rfd to version 0.14 fixing 2149 (#2161) 2024-03-29 18:05:14 -07:00
Jonathan Kelley
f6c3b2745e
Release v0.5.0 2024-03-27 18:25:52 -07:00
Jonathan Kelley
41c3967052
use docfix interprocess 2024-03-27 16:57:24 -07:00
Miles Murgaw
44f3047780
Revision: Change Default Logging In CLI (#2157)
* revision: filter to warn logs

* revision: change to use DIOXUS_LOG
2024-03-27 12:07:44 -07:00
Jonathan Kelley
fd64d1a419
use vendored ssl on mac 2024-03-26 22:26:54 -07:00
Jonathan Kelley
d988ccc369
Cargo.lock 2024-03-26 19:22:57 -07:00
Evan Almloff
dadbab5d72
make some enums non-exhaustive (#2140) 2024-03-26 19:14:48 -07:00
Evan Almloff
1b03bed20a
Provide a better error message for wasm bindgen version mismatches (#2136)
* provide a better error message for wasm bindgen version mismatches

* fix clippy

* only rerun wasm bindgen if the first run fails

* remove old logs
2024-03-26 19:08:12 -07:00
Evan Almloff
2ac4bdb673
Switch to tracing for the cli (#2137)
* switch to tracing in the dioxus-cli

* bump manganis

* fix manganis features

* only print processing assets if skip assets is disabled

* switch all logs to tracing

* switch to published version of manganis

* undo all changes to cargo.toml

* remove reference to log
2024-03-25 15:21:51 -05:00
Evan Almloff
da3b066934 Revert "switch to tracing"
This reverts commit 6608f73a2e.
2024-03-25 10:09:53 -05:00
Evan Almloff
6608f73a2e switch to tracing 2024-03-25 10:07:31 -05:00
Jonathan Kelley
eb79e61642
Add a ton of comments to rsx/hotreload, add snapshot testing, refactor a bit to simplify the crate (#2130)
Merge dynamic context and dynamic mapping, clean up the rsx hotreload logic, and add location data to the Rsx objects
2024-03-24 13:31:26 -07:00
Miles Murgaw
acbf7dfc4f
fix: hot reload blocking (#2127) 2024-03-22 14:36:49 -07:00
Jonathan Kelley
e923c6462c
Resume window position/size, watch cargo/dioxus tomls, fix css reverting during hotreloading, allow menubar events to be captured from within dioxus (#2116)
* Fix: css hotreloading being invalidated, watcher not watching cargo/dioxus tomls, add feature to restore window state

* Make clappy hippier

* remove console log

* use simpler css invalidator

* Less flash, remove log on web hotreload

* Fix floating window managed behavior on mac

* clippy...
2024-03-20 09:16:18 -07:00
Evan Almloff
58f7efafea
Make EventHandler copy (#2112)
* implement Copy for EventHandler
* implement from closure for event handler and remove special on prefix
* fix props implementation of EventHandler
2024-03-19 19:48:53 -07:00
Jonathan Kelley
d8942a255b
Fix #2104: fmt incorrectly using 1-indexing for columns (#2106)
* Fix #2104: fmt incorrectly using 1-indexing for columns

* Clippy...
2024-03-18 18:23:45 -07:00
Jonathan Kelley
9c64fc4769
Fix #1938, allow explicit props 2024-03-18 15:34:46 -07:00
Jonathan Kelley
f266213618
Bump to 0.5.0-alpha.2 2024-03-18 02:02:31 -07:00
Jonathan Kelley
7d11984a0e
Chore: bump wry + tao 2024-03-14 23:11:25 -07:00
Jonathan Kelley
58233c6a3b
Merge branch 'main' into jk/fix-hotreloading-issues 2024-03-14 22:31:22 -07:00
Miles Murgaw
cfe412a3d5 update: fix cargo lock 2024-03-14 23:05:50 -04:00
Miles Murgaw
ab2e2c63d5 feat: fix unknown imports 2024-03-14 23:01:14 -04:00
Jonathan Kelley
7cc3264881
Move TUI renderer into blitz repo 2024-03-14 18:54:46 -07:00
Jonathan Kelley
c532d3ec1a
Merge branch 'main' into jk/fix-hotreloading-issues 2024-03-13 15:11:41 -07:00
Jonathan Kelley
982b96074a
Add basic hotreload test samples 2024-03-13 13:07:15 -07:00
Jonathan Kelley
bca5335f31
fix: hotreloading files with multiple templates, asset hotreloading 2024-03-13 02:13:37 -07:00
Evan Almloff
82ab212414 don't quit serving early if builds fail 2024-03-12 16:37:20 -05:00
Jonathan Kelley
b35f74e9d6
Merge pull request #2029 from ealmloff/isomorphic-spawn
Fix memos in children; introduce isomorphic spawn
2024-03-12 13:32:22 -07:00
Evan Almloff
6b84f284c9 fix manganis assets overlapping between examples 2024-03-11 17:11:52 -05:00
Evan Almloff
bbc81b8f9c fix memos in children; introduce isomorphic spawn 2024-03-08 16:40:31 -06:00
Evan Almloff
ffc49530f6 implement readable and callable for all structs in the hooks crate 2024-03-08 11:17:28 -06:00
Jonathan Kelley
295c29db5d
Merge pull request #2005 from ealmloff/fix-suspense
Only poll suspended futures, lazy memos
2024-03-07 23:43:52 -08:00
Jonathan Kelley
f073322bb3
use md5 instead 2024-03-06 18:43:07 -08:00
Jonathan Kelley
08d054f5c8
Merge branch 'main' into jk/fix-form-inputs 2024-03-06 16:43:33 -08:00
Jonathan Kelley
81f38a0bc5
cfg out globalhotkey 2024-03-06 16:42:45 -08:00
rtretter
f62c81ea0d added automatic platform detection to cli if none is passed 2024-03-06 21:16:51 +01:00
Evan Almloff
492f0329bf remove flume, implement lazier memos 2024-03-06 11:38:28 -06:00
Jonathan Kelley
34b5bc927d
fix sledgehammer bindings on web 2024-03-06 02:04:56 -08:00
Jonathan Kelley
95d7012c8d
fix hashing system, bump wasm-bindgen 2024-03-06 02:00:24 -08:00
Jonathan Kelley
4b2e426958
clippy, and don't hash invisible files for ts generation 2024-03-05 22:38:38 -08:00
Jonathan Kelley
39d6580eca
use git version of sledgehammer 2024-03-05 15:14:07 -08:00
Jonathan Kelley
403e8e2f49
Clean up file uploads in desktop/liveview, remove minify 2024-03-05 13:00:27 -08:00
Jonathan Kelley
b751674354
Web works with the js structure 2024-03-05 11:16:34 -08:00
Jonathan Kelley
16b38e339d
Merge branch 'main' into jk/fix-form-inputs 2024-03-04 17:46:38 -08:00
dependabot[bot]
f39a2e5f98
Bump mio from 0.8.10 to 0.8.11 (#2001)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 16:24:29 -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
Evan Almloff
8a969a26dc make interpreter extend the interpreter core class 2024-02-28 11:22:15 -06: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
Evan Almloff
93ee53454f bump the sledgehammer bindgen version 2024-02-27 10:35:16 -06:00