Commit Graph
91 Commits
Author SHA1 Message Date
Jonathan Kelley 2c20d3dc5e Remove deprecated macros: inline_props, format_args_f!, render! (#2574)
* remove deprecated macros

* Rename derive_typed_builder
2024-07-02 21:46:11 -07:00
Evan Almloff 3a4860add4 Document props and component macro (#2522)
* document prop attributes

* document children props

* fix children doc test
2024-06-18 16:06:54 -07:00
Evan Almloff 0127501dbf Improve inline docs (#2460)
Improve inline docs

* improve incorrect event handler return error message

* Improve event handler docs

* document the eval functions

* document spawn and common spawn errors

* fix event handler docs

* add notes about how you use attributes and elements in rsx

* add doc aliases for attributes and events we rename

* add some more aliases for common search terms

* don't doc ignore any public examples in core

* don't ignore public doc examples in ssr

* don't ignore examples in the dioxus package readme

* add a warning when you launch without a renderer enabled

* fix some outdated element docs

* add a bunch of examples to resource

* add notes about desktop events

* add more docs for use_resource

* add on_unimplemented hint to Dependency

* fix some unresolved links

* add examples to each of the router traits

* add not implemented errors for router traits

* add an example to the routable trait

* expand rsx macro docs

* improve memo docs

* update the dioxus readme

* mention dioxus crate features in the docs

* fix a bunch of doc tests

* fix html doc tests

* fix router doc tests

* fix dioxus signals doc tests

* fix dioxus ssr doc tests

* fix use_future example in the hooks cheat sheet

* add a javascript alias for eval

* fix hook explanation values

* remove unused embed-doc-image dependency
2024-06-06 18:15:17 -07:00
Jonathan Kelley a1c03a461d Basic docs cleanups 2024-03-27 17:06:10 -07:00
Jonathan Kelley 052fd774cf Chore #2028: radically clean up core-macro 2024-03-09 01:09:20 -08:00
Jonathan Kelley 7461a14cb4 fix 2020: return None if the root nodes are empty in rsx (#2026) 2024-03-08 15:57:46 -06:00
marc2332 97478bcb13 fix unrelated to dioxus-router 2024-02-26 21:50:16 +01:00
Evan Almloff e65c5f0eb3 depreciate the render macro 2024-01-16 13:18:46 -06:00
Jonathan Kelley 1dde044697 remove cx.render 2024-01-13 21:12:21 -08:00
Jonathan Kelley fae0b08e61 Fix the router and stub out a number of crates to get compiling 2024-01-13 20:51:37 -08:00
Jonathan Kelley 2a7f3a4164 Fix: quick tweak to allow #[component] macro working 2024-01-10 16:38:07 -08:00
Leonard cea9563e25 Improve prop docs (#1565)
* Do the stuff

* More sanitizing + fix warnings and format
2023-10-23 08:41:26 -05:00
Leonard 2d1234c3d1 Include README and Dioxus logo in package docs (#1536)
* Include README in docs.rs and add Dioxus logo

* Update README.md
2023-10-10 10:52:48 -05:00
Leonard c866ae602b Add system for creating component attributes + new #[component] attribute (#1448)
* Add `#[component]` attribute + system for creating component attributes + other stuff

* Delete inlineprops.rs

* Update inline_props.rs

* Cargo fmt

* Fix clippy warnings and paths in props/mods.rs

* Include where clause in `#[inline_props]` output

* Allow Clippy type complexity in `LinkProps`

* Allow the type complexity lint for the entire link.rs file

* Remove snake_case -> PascalCase converter, but rather enforce PascalCase

Also:
- Put the second function inside the main one instead of besides it.
- Simplify

* Simplify type check lints so they don't return false positives

They will not always work, but they won't return any false positives, like for aliases. This is likely going to be replaced by a more polished Clippy-backed linting system.

* Fix #583

* Cargo fmt

* Add docs for `deserialize()` and remove useless comment

* Add `#[component]` to prelude

* Merge branch 'master' of https://github.com/tigerros/dioxus

* #[inline_props] is no more. Except in the docs folder, but that's going to be removed

* Remove docs folder

* Remove docs from workspace

* Resolve `DeserializerOutput` conversation
2023-09-15 09:13:36 -05:00
Jonathan Kelley e7e21fa2f0 fix: errors when using render macro 2022-12-23 17:47:57 -05:00
Jonathan Kelley b254d9e761 chore: remove cross-crate doc comments 2022-12-09 15:03:56 -08:00
Jonathan Kelley c6a6c3d0f8 feat: components pass thru children 2022-11-02 17:29:18 -07:00
Jonathan Kelley 4a31b29703 feat: simple tests passing 2022-11-01 18:42:29 -07:00
Demonthos 23c48cf795 render optimizations (#585) 2022-10-08 23:24:41 -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 28fba42e7e feat: add an unhygenic render macro (#556)
* feat: add an unhygenic render macro

* chore: use render instead of rsx!(cx,
2022-09-25 01:05:16 -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
YuKun Liu 0af69f83f2 Rename hot_reload to hot-reload 2022-06-26 14:23:19 +08:00
Evan Almloff dd335cda59 use line!, col!, and row! instead of panic location 2022-06-20 15:44:10 -05:00
Evan Almloff 9e7e5b0859 Merge remote-tracking branch 'upstream/master' into jk/rsx-refactor 2022-06-16 09:17:36 -05:00
Demonthos df4ea20bb8 create serde compatible parse error 2022-06-15 12:58:08 -05:00
Evan Almloff 2a6d9ed075 handle rsx!{cx, ...} 2022-06-05 07:38:05 -05:00
Evan Almloff 8c6fceb0c7 finish desktop implementation 2022-06-04 14:26:37 -05:00
Evan Almloff 2bcaa2e43e refactor interperting macro into function and don't rely on cx being in scope 2022-06-04 12:20:56 -05:00
Muhannad Alrusayni dded91a589 doc: put docs in once place instead of two 2022-06-04 13:40:50 +03:00
Evan Almloff 0079f7d18b WIP: expose pipe for desktop 2022-06-02 13:33:08 -05:00
Evan Almloff b921dc4eec call error handler when error occurs 2022-05-31 12:06:53 -05:00
Evan Almloff 51b87dafcc derive serde for Errors and Location, and add error handler 2022-05-31 12:03:04 -05:00
Evan Almloff 94448ea4aa handle formatting options 2022-05-30 18:32:57 -05:00
Evan Almloff 2183ecf3fb better error handling 2022-05-29 08:04:08 -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 94169083f5 use __varibles 2022-05-27 13:09:29 -05:00
Evan Almloff 3c7db0631b handle iterators and nested rsx calls 2022-05-27 12:21:12 -05:00
Evan Almloff a0c7e4d78a add component support 2022-05-27 09:47:44 -05:00
Evan Almloff 5b0a60c294 handle expressions in attributes 2022-05-26 19:16:51 -05:00
Evan Almloff 62cca95905 update interperter to use CapuredContext 2022-05-26 17:02:36 -05:00
Evan Almloff 871f51f91b It compiles 2022-05-25 14:08:59 -05:00
Evan Almloff ca10d89670 add RsxTextIndex 2022-05-25 11:20:07 -05:00
Evan Almloff c7c84da8ab WIP hot reload 2022-05-25 08:58:59 -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
Jonathan Kelley 45231651dd fix: quick patch 2022-02-22 16:34:06 -05:00
Jonathan Kelley 185902f935 fix: macro compiles 2022-02-18 23:14:17 -05:00
Jonathan Kelley ca7ce46cdb Merge branch 'master' into jk/partialexpansion 2022-02-13 12:36:02 -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