Commit Graph
42 Commits
Author SHA1 Message Date
Evan AlmloffandJonathan Kelley 2523581cf4 Autocomplete rsx (#2421)
* autocomplete rsx

* hide the completions module

* fix autocomplete for identifiers that start with a raw identifier

* add field completion hints for props

* remove extra import

* Revert "add field completion hints for props"

This reverts commit 194899c73783e0f9b5d601d53365746d838f2048.

* fix autocomplete inside raw expressions

* fix autofmt

* feat: just use regular ifmt if it's compatible

reuses the tokens for ifmt so RA provides its HIR lowering on simple formatted strings

* fix merging ifmt strings

* add a better error message for components called like functions

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-05-22 07:24:50 -05:00
Evan Almloff 245003a5d4 Create a Static Site Generation platform; Deduplicate hot reloading code (#2226)
* create static site generation helpers in the router crate

* work on integrating static site generation into fullstack

* move ssg into a separate crate

* integrate ssg with the launch builder

* simplify ssg example

* fix static_routes for child routes

* move CLI hot reloading websocket code into dioxus-hot-reload

* fix some unused imports

* use the same hot reloading websocket code for fullstack

* fix fullstack hot reloading

* move cli hot reloading logic into the hot reload crate

* ssg example working with dx serve

* add more examples

* fix clippy

* fix formatting

* fix hot reload doctest imports

* fix axum imports

* don't run server doc tests

* Fix hot reload websocket doc examples
2024-05-22 07:24:15 -05:00
Marc Espin 44471f4918 fix: Hide launch mod when disabled (#2171) 2024-03-28 16:58:58 -05: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 AlmloffandJonathan Kelley d442dac168 Add a menu bar option to the desktop config (#2107)
* add an option to set a custom menu in the desktop config

* Fix rename issue

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-03-18 22:36:47 -07:00
Jonathan Kelley 7cc3264881 Move TUI renderer into blitz repo 2024-03-14 18:54:46 -07:00
Jonathan Kelley 214a907adc Upgrade to axum 0.7, drop 3rd party adapters 2024-02-15 18:05:30 -08:00
Evan Almloff 162b033c36 provide feature hints for the dioxus crate as well 2024-02-09 12:23:57 -06:00
Evan Almloff 13b6f3b9e7 re export the dioxus router prelude 2024-01-31 16:16:07 -06:00
Jonathan Kelley 0bd9692e45 Fix cargo test and a number of little cleanup bugs 2024-01-30 17:33:14 -08:00
Evan Almloff 636aeb4b90 integrate liveview with the launch builder 2024-01-22 11:56:34 -06:00
Evan Almloff 0932130e87 include more platforms in the launch builder 2024-01-22 08:58:35 -06:00
Jonathan Kelley 85c7c22619 Make router work on web 2024-01-19 16:36:40 -08:00
Jonathan Kelley d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 2024-01-18 16:27:43 -08:00
Evan Almloff ae3e167cfe make fullstack hello world compile 2024-01-17 16:58:03 -06:00
Evan Almloff b58eb04278 Fix basic routers 2024-01-16 14:39:48 -06:00
Evan Almloff b3cf9374f8 re export renderers in dioxus 2024-01-16 09:53:46 -06:00
Evan Almloff 7e4d2debe0 implement launch builder for the desktop and web platforms 2024-01-16 08:42:16 -06:00
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 3bde429619 Export signals from dioxus prelude 2024-01-10 16:57:21 -08:00
Jonathan Kelley 28a9dc6805 Pin assets sha to keep CI in check 2024-01-08 14:54:02 -08:00
Evan Almloff d627153ccc show off the new asset system in the examples 2023-12-17 11:45:27 -06: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
Evan Almloff f71ab650e8 don't include inteprocess in wasm builds 2023-01-12 11:41:46 -06:00
Evan Almloff 351b9fab6f allow custom namespaces 2023-01-12 10:52:24 -06:00
Evan Almloff 82048737f4 fix the macro export and WIP hot reloading docs 2023-01-12 08:47:33 -06:00
Jonathan Kelley b254d9e761 chore: remove cross-crate doc comments 2022-12-09 15:03:56 -08:00
Jonathan Kelley 8caabb97d8 wip: more work on html 2022-11-15 16:51:22 -08:00
Jonathan Kelley 0dad91bc08 wip: pass more events 2022-11-15 16:37:23 -08:00
Jonathan Kelley 47d0f51e00 wip: overhaul event system 2022-11-15 16:05:22 -08: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
Jonathan Kelley 36ea39ae30 Feat: rename recoil to atoms 2021-06-16 11:19:37 -04:00
Jonathan Kelley 92d9521a73 WIP: remove FC 2021-03-07 21:28:20 -05:00
Jonathan Kelley f47651b32a Feat: overall API updates 2021-02-12 00:29:46 -05:00
Jonathan Kelley 65d0d611ea Feat: add webview example 2021-01-22 15:50:16 -05:00
Jonathan Kelley 28ac37a8b2 Feat: update fc_macro 2021-01-21 02:25:44 -05:00
Jonathan Kelley 6aeea9b790 Feat: add router 2021-01-20 17:48:58 -05:00
Jonathan Kelley 4d7ac5bb5d Feat: dioxus frontend crate 2021-01-20 12:04:27 -05:00