Commit Graph
46 Commits
Author SHA1 Message Date
Evan Almloff af1749d7be re export renderers in dioxus 2024-01-15 19:14:11 -06:00
Jonathan Kelley 2ae3241cc0 Merge branch 'master' into jk/breaking-merged 2024-01-11 16:04:36 -08:00
Jonathan Kelley 4f077ec664 Merge pull request #1812 from ealmloff/duplicate-event-listener-rsx
check for duplicate event listeners in the rsx macro
2024-01-11 14:34:01 -08:00
Jonathan Kelley 8ff13c3c1b Fix some basic clippy stuff 2024-01-11 12:13:38 -08:00
Jonathan Kelley 8881b8a473 Use error instead of panic for span location in rsx macro shorthand 2024-01-11 11:37:12 -08:00
Evan Almloff 9b5a797008 check for duplicate event listeners in the rsx macro 2024-01-11 10:34:08 -06:00
Jonathan Kelley 8a77d2560e fix tests around children elements 2024-01-10 23:42:36 -08:00
Jonathan Kelley f1e8faffb5 fix tests 2024-01-10 23:17:01 -08:00
Evan Almloff 4013341b6c hello world example working 2024-01-05 18:01:05 -06:00
Evan Almloff 5b65c4cfb4 implement spreading props in the rsx macro 2023-09-22 10:04:34 -05:00
Evan Almloff 9e167dfdb7 Merge branch 'many_optional_attributes' into pr/atty303/1349 2023-09-22 09:32:05 -05:00
Evan Almloff fc8c25280a allow many attributes to be attached to one element 2023-09-20 16:02:04 -05:00
Evan Almloff ab2b9fb34e fix autoformatting 2023-09-19 09:39:53 -05:00
Evan Almloff d297e2baa2 Add optional attributes 2023-09-18 19:50:02 -05:00
Evan Almloff 9f1c735cf1 combine style and class attributes when there are multiple 2023-09-14 16:40:49 -05:00
Evan Almloff 8c47dfaf78 clean up attribute parsing 2023-09-14 14:08:39 -05:00
Koji AGAWA d573f5dfd5 feat: props spread 2023-08-13 16:45:17 +09:00
Evan Almloff 05fb8c1e91 Merge branch 'master' into router-typesafe 2023-07-07 18:31:48 -07:00
Torstein Grindvik a3169ac17b Change missing trailing comma span to point to span where comma is missing from
Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
2023-07-02 15:19:03 +02:00
Evan Almloff 8f67d0aafd make creating rsx nodes from macros possible 2023-06-29 12:52:27 -07:00
Evan Almloff f74854b38c fix formatting with raw elements 2023-03-20 07:21:31 -05:00
Evan Almloff 03413a68ab fix formatting 2023-03-19 20:47:16 -05:00
Evan Almloff 209a55da69 allow raw elements if they include a dash 2023-03-19 20:37:40 -05:00
Jonathan Kelley 1940855e39 feat: implement comments in zero children nodes 2023-01-10 17:47:58 -08:00
Evan Almloff c5672650f1 use the namespace and volitity defined in the html crate 2023-01-03 09:03:20 -06:00
Jonathan Kelley 4aac2cdae1 fix: raw attr names 2022-12-26 22:57:45 -05:00
Jonathan Kelley c240aebfa1 chore: start instead of flart 2022-12-26 09:58:41 -05:00
Jonathan Kelley 8b854963e9 fix: serialize custom attrs properly 2022-12-25 23:58:31 -05:00
Jonathan Kelley d160f38bc2 fix: parsing of attributes without trailing commas 2022-12-12 11:18:36 -08:00
Jonathan Kelley 0bf4725639 fix: namespacing of dynamic attributes 2022-12-07 15:11:51 -08:00
Jonathan Kelley 47d0f51e00 wip: overhaul event system 2022-11-15 16:05:22 -08:00
Jonathan Kelley 7cbb4d52dd wip: more modifications to templates 2022-10-21 18:54:14 -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 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
Jonathan Kelley 4471ccba49 fix: even better comment handling 2022-07-05 01:53:08 -04:00
Jonathan Kelley d70b436157 wip: more cleanup, more tests 2022-06-27 16:24:36 -04:00
Evan Almloff 94448ea4aa handle formatting options 2022-05-30 18:32:57 -05:00
Evan Almloff 06390b9be5 allow rsx to be used outside of a proc_macro context 2022-05-28 12:10:32 -05:00
Evan Almloff a0c7e4d78a add component support 2022-05-27 09:47:44 -05:00
Jonathan Kelley 2a1970b3a9 feat: add prettyplease vendored and get basic test working 2022-04-24 02:55:20 -04:00
Jonathan Kelley 794f43ffee concept: move rsx out to its own crate 2022-04-24 02:35:52 -04:00
Ilya Maximov b8573bc4dd refactor: remove the rsx folder
it doesn't seem to be published anywhere or used at all
2022-03-19 20:35:53 +01:00
Ilya Maximov 0be88d20ee docs: remove capitals and periods from errors 2022-03-19 19:29:57 +01:00
Jonathan Kelley 5d56326f74 feat: collapse rsx 2022-02-18 23:18:52 -05:00
Jonathan Kelley 9438cc14bc fix: make listeners up to date 2022-02-18 23:17:33 -05:00
Jonathan Kelley b93487282d feat: move files around 2022-02-18 20:54:30 -05:00