Commit graph

216 commits

Author SHA1 Message Date
Jonathan Kelley
493591400f wip: pre any props 2022-11-19 17:07:29 -08:00
Jonathan Kelley
30ef225812 feat: event handling on desktop 2022-11-17 20:00:39 -08:00
Jonathan Kelley
04bc635ac5 wip: prep to fix bug in create 2022-11-15 23:22:41 -08:00
Jonathan Kelley
e8ae830cf2 feat: get desktop working with just creation 2022-11-15 18:32:48 -08:00
Jonathan Kelley
47d0f51e00 wip: overhaul event system 2022-11-15 16:05:22 -08:00
Jonathan Kelley
f5bc137f01 chore: clean up scheduler code 2022-11-09 10:58:11 -08:00
Jonathan Kelley
203935834d feat: suspense! 2022-11-07 22:55:22 -08:00
Jonathan Kelley
e6c53803a6 feat: abstract to rc wake 2022-11-06 14:28:41 -08:00
Jonathan Kelley
aec1b326ba wip: so much suspense code 2022-11-03 22:30:26 -07:00
Jonathan Kelley
94601ccd1f feat: async components! 2022-11-03 17:34:42 -07:00
Jonathan Kelley
591674f701 wip: allow async into component 2022-11-03 02:11:04 -07:00
Jonathan Kelley
584504feb7 feat: keys 2022-11-03 01:24:20 -07:00
Jonathan Kelley
c6a6c3d0f8 feat: components pass thru children 2022-11-02 17:29:18 -07:00
Jonathan Kelley
b6c0bce89c feat: support cached ssr 2022-11-02 01:00:37 -07:00
Jonathan Kelley
4a31b29703 feat: simple tests passing 2022-11-01 18:42:29 -07:00
Jonathan Kelley
23603aaaf5 wip: rewrite core to be template focused 2022-10-27 21:58:47 -07:00
Jonathan Kelley
90982e0ccb wip: start to refactor out hot reloading from packages
Also implement alternative simpler template system
2022-10-20 09:56:09 -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
Demonthos
ab10d327ac
Fix attribute value in macro (#577)
* create into AttributeValue trait to allow arbitraty attribute values

* allow attributevalue in non-template macro
2022-10-12 20:43:37 -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
67dc6e6017
feat: implement type magic to allow strings, format args, and other types directly in rsx (#550)
* feat: implement type magic

* chore: undo example

* fix: let tests pass

* chore: add generic to allow any nesting of iterators

* Chore: remove comments

* chore: update rsx usage

* chore: use cleaner version of generic IntoVnode

* chore: don't derive default for lfietimed thing

* chore: remove latent comment

* fix: accept a third parameter
2022-09-12 22:49:04 -07:00
Evan Almloff
db1866090a fix broken doc links 2022-05-22 20:44:32 -05:00
Jonathan Kelley
03110b85cd fix: cargo fmt 2022-05-06 20:46:33 -04:00
Jonathan Kelley
356f37e9ee feat: arbitrary attributes 2022-05-05 16:50:33 -04:00
Dave Rolsky
69752313eb
Fix typo in docs for NodeFactory.bump 2022-04-11 10:33:06 -05:00
Jonathan Kelley
0e09dda1be chore: add additional debugging to VNode fields 2022-03-04 13:13:29 -05:00
Jonathan Kelley
62df5f7097 docs: document the entire core crate 2022-02-20 17:37:46 -05:00
Jonathan Kelley
c4e6496d9d chore: enable a pedantic clippy on the diffing algorithm 2022-01-31 12:49:21 -05:00
Jonathan Kelley
00aa0e5e86 fmt: apply formatting just to tests 2022-01-31 02:44:16 -05:00
Jonathan Kelley
5bffbba682 fmt: apply cargofmt with new rules for lit structs 2022-01-31 02:40:12 -05:00
Jonathan Kelley
11f6b93889 fix: remove nodes is in a happier state 2022-01-31 02:33:16 -05:00
Jonathan Kelley
cbd471fa46 debugging: add some more debug tooling 2022-01-31 01:24:11 -05:00
Jonathan Kelley
3bb5c8142c fix: switch to future based diffing
this commit removes the old manual fiber implementation in favor of a
traditional recursion based approach. This should make the diffing
algorithm easier to work on and eliminate various stack-based bugs in.
2022-01-30 17:47:58 -05:00
Jonathan Kelley
3edf3e367f wip: debugging 2022-01-30 14:08:03 -05:00
Jonathan Kelley
578c1dc069 fix: enable default for any eventhandler 2022-01-29 10:42:06 -05:00
Jonathan Kelley
8056138f86 fix: explicit default for event handler
rust derives default of T: Default, even when that's not a necessary requirement

This fixes that
2022-01-29 10:27:40 -05:00
Dave Rolsky
9e4ec43b1e Fix various typos and grammar nits
I also removed all trailing whitespace from lines since I have Emacs
configured to highlight this.
2022-01-21 21:43:43 -06:00
Jonathan Kelley
036a0ff49a docs: add comments for the Handler 2022-01-16 15:13:31 -05:00
Jonathan Kelley
e47ead5347 fix: allow eventhandler to derive default 2022-01-15 20:17:48 -05:00
Jonathan Kelley
d11f322f55 docs: add title to doc comment 2022-01-07 12:12:33 -05:00
Jonathan Kelley
be9f1a52ad docs: better document the EventHandler type 2022-01-07 12:12:13 -05:00
Jonathan Kelley
c439b0ac7e fix: component pass thru events 2022-01-07 11:51:25 -05:00
Jonathan Kelley
427b126bc1 feat: add prevent default attribute and upgrade router 2022-01-05 16:34:24 -05:00
Jonathan Kelley
cb2782b4bb wip: memoize dom in the prescence of identical components 2022-01-05 00:27:22 -05:00
Jonathan Kelley
4f92ba4160 wip: bump all versions 2022-01-03 19:32:27 -05:00
Jonathan Kelley
2481cd05c2 fix: attempt to fix ice 2022-01-03 17:20:22 -05:00
Jonathan Kelley
d84fc05386 feat: plug in bubbling 2022-01-03 02:06:42 -05:00
Jonathan Kelley
4c85bcfdc8 awesome: arbitrary expressions excepted without braces 2021-12-30 03:14:47 -05:00
Jonathan Kelley
14961023f9 wip: polish some more things 2021-12-29 21:28:28 -05:00