Commit graph

132 commits

Author SHA1 Message Date
Jonathan Kelley
a81bbb83d6 fix: removed files 2022-12-15 20:24:30 -08:00
Jonathan Kelley
fc2aaa7df5 fix: cargo check 2022-12-13 15:54:59 -08:00
Jonathan Kelley
7beb7f0ee4 fix: use and_then 2022-12-13 15:30:40 -08:00
Evan Almloff
129a67cdc6 fix mouse interaction with widgets 2022-12-08 06:40:00 -06:00
Evan Almloff
15701d1c87 make clippy happy 2022-12-07 23:05:00 -06:00
Evan Almloff
bbd49bb37c cleanup code and examples 2022-12-07 23:01:13 -06:00
Evan Almloff
029255c7ac widgets 2022-12-07 20:28:01 -06:00
Jonathan Kelley
db5b65b6cb chore: make cargo check happy with new apis 2022-12-07 14:51:14 -08:00
Jonathan Kelley
a252774226 chore: clean up docs with changes to templates 2022-12-07 13:39:22 -08:00
Jonathan Kelley
4eefc3f854 chore: rename all &cx to cx, make clipppy happy 2022-12-07 13:11:40 -08:00
Demonthos
67a6fa9eb8
Implement new mutations with native core (#630)
* work on seperating tree struture from realdom

* intial update to new mutations

* handle height

* update to taffy 0.2

* add as_varient functions to OwnedAttributeValue

* make get node parent mut optionally return a parent

* work on upward pass

* add more code for parrellel passes

* make resolve passes public

* more work on parallel passes

* fix deadlock and add more tests

* move height into the tree instead of the realdom

* make passes exicute in parallel instead of executing invidual passes in parellel

* fix some warnings

* add up dependant test

* clean up examples

* work on intigrating state with passes

* update to new mutations

* work on implementing macro

* make the macro compile

* more progress on macro

* mark cloned nodes as dirty

* update persistant_iterator utility

* fix mask generation

* update tui with new mutations

* more progress updating tui

* some basic tui examples working

* don't push template nodes onto the stack

* update hover example

* update benchmark

* update more examples

* fix root node layout

* ignore out of bounds renders

* update color picker example

* update all events example

* update remaining examples

* update tests

* tests passing

* move persistant iterator test

* update examples

* fix gaps in layout

* fix formatting

* fix memory leak
2022-12-06 15:38:04 -08:00
Jonathan Kelley
85657d3906 feat: rip out mutations for templates 2022-12-01 00:46:15 -05:00
Jonathan Kelley
3b166c9edd wip: clean up some things 2022-11-30 23:54:30 -05:00
Demonthos
f89cd20455
fix tui example links (#607) 2022-10-28 18:06:39 -07:00
Demonthos
3b7b503333
Refactor Mutations and simplify Templates (#578)
* update mutations to be path based rather than renderer integrated
2022-10-18 14:42:45 -07:00
saicu
e8c48d46cf
replace fxhash crate with rustc-hash (#588) 2022-10-12 18:27:26 -07:00
Demonthos
daeffd4149
pass clippy (#575) 2022-10-02 14:12:24 -07:00
Demonthos
047ed1e553
Subtree memorization / reactive templates (#488)
This commit adds subtree memoization to Dioxus.

Subtree memoization is basically a compile-time step that drastically 
reduces the amount of work the diffing engine needs to do at runtime by
extracting non-changing nodes out into a static "template." Templates 
are then understood by the various renderers in the ecosystem as a 
faster way of rendering the same items. 

For example, in the web, templates are simply a set of DOM Nodes created 
once and then cloned later. This is the same pattern frameworks like Lithtml
and SolidJS use to achieve near-perfect performance. 

Subtree memoization adds an additional level of complexity to Dioxus. The RSX
macro needs to be much smarter to identify changing/nonchanging nodes and
generate a mapping between the Template and its runtime counterparts.

This commit represents a working starter point for this work, adding support 
for templates for the web, desktop, liveview, ssr, and native-core renderers.
In the future we will try to shrink code generation, generally improve 
performance, and simplify our implementation.
2022-09-30 12:03:06 -07:00
Jon Kelley
540e785d8b
Less clumsy configuration for desktop and mobile (#553)
* chore: dont use prebuilt builder pattern for configuring desktop

* chore: use regular config pattern for web

* Chore: update docs too

* chore: clean up some warnings
2022-09-13 16:22:27 -07:00
Demonthos
39cbc82107
update tui to use taffy dimention directly (#501) 2022-07-19 09:27:19 -07:00
Jon Kelley
d9546d9504
Renderers are now packages, not features. (#387)
* feat: use synchronous router design

* feat: function to get router out of dom

* chore: restructure workspace to use renderers as packages, not features
2022-07-09 15:15:20 -04:00
Demonthos
4a5ae758ee
Allow Multiple dependencies for states in the RealDom (native core) (#412)
* WIP multable deps

* WIP: refactor and genralize state macro

* add traversable trait

* update tui to use elementid to index dom
2022-07-07 00:50:22 -04:00
Demonthos
baaa1752d3
add query context (#400) 2022-07-05 19:44:54 -05:00
Reinis Mazeiks
a9f286c52b Fix bug in TUI key repeat handling 2022-06-29 07:44:19 +03:00
Reinis Mazeiks
0777437243 Merge branch 'master' of https://github.com/DioxusLabs/dioxus into rusty-events
 Conflicts:
	packages/tui/tests/events.rs
2022-06-29 02:18:57 +03:00
Reinis Mazeiks
cae0c1409d Fix some warnings: avoid deprecated fields 2022-06-29 02:13:01 +03:00
Reinis Mazeiks
bfcfe2ca5f Remove use of deprecated functions 2022-06-28 23:10:44 +03:00
Reinis Mazeiks
6932924f57 Comment on crossterm key event conversion 2022-06-28 21:17:46 +03:00
Reinis Mazeiks
f3fcec2bdf Merge branch 'master' of https://github.com/DioxusLabs/dioxus into rusty-events
 Conflicts:
	packages/html/src/events.rs
	packages/tui/src/hooks.rs
2022-06-28 21:09:20 +03:00
Evan Almloff
ef4ece42b3 Merge remote-tracking branch 'upstream/master' into clean_up_rsx_imports 2022-06-25 08:27:32 -05:00
Evan Almloff
fbf8e13b8d clean up imports 2022-06-25 08:27:10 -05:00
Jon Kelley
83288e274f
Merge pull request #452 from Demonthos/fix_nonbubbling_web_events
Fix nonbubbling web events
2022-06-24 17:05:32 -04:00
Evan Almloff
c52a9334cb fix tui tests 2022-06-24 14:05:19 -05:00
Evan Almloff
2d45e1dc8d add bubbling data to events after merge 2022-06-22 14:24:03 -05:00
Evan Almloff
11d9a7d013 Merge remote-tracking branch 'upstream/master' into fix_nonbubbling_web_events 2022-06-22 13:59:10 -05:00
Evan Almloff
61b4bb2f19 handle bubbling events 2022-06-22 13:57:05 -05:00
Jonathan Kelley
8be66bd34d fix: apply some clippy lints and rename the liveview methods to not intersect 2022-06-20 02:24:39 -04:00
Jon Kelley
c3e573b7cb
Merge pull request #445 from Demonthos/test_tui_events
test tui events
2022-06-19 22:10:10 -04:00
Evan Almloff
8670f05968 Merge branch 'tui_mouse_events_fix' into tui_focus 2022-06-15 08:31:04 -05:00
Evan Almloff
8e6b56c636 remove outdated comment 2022-06-14 20:57:43 -05:00
Evan Almloff
3dc68ffd76 add tests 2022-06-13 19:55:57 -05:00
Evan Almloff
1d699b0b6e fix absolute position for mouse events 2022-06-13 19:42:03 -05:00
Evan Almloff
5d323cae78 Merge remote-tracking branch 'upstream/master' into tui_focus 2022-06-13 17:55:18 -05:00
Evan Almloff
ce385965a7 Merge branch 'master' into tui_focus 2022-06-13 17:37:40 -05:00
Jon Kelley
d9e14db434
Merge pull request #417 from Demonthos/master
handle backtab for tui
2022-06-13 11:13:00 -04:00
Evan Almloff
29b3503da8 fmt 2022-06-10 17:49:04 -05:00
Evan Almloff
69ecc9caaf update tui tests 2022-06-10 17:47:43 -05:00
Demonthos
c1112cfd3a
Merge branch 'master' into stretch2_relative_layout 2022-06-10 17:41:51 -05:00
Evan Almloff
dcfe60c164 use taffy instead of stretch2 2022-06-10 17:23:30 -05:00
Evan Almloff
d6eaf8778f handle backtab 2022-05-21 18:08:52 -05:00