Commit Graph
49 Commits
Author SHA1 Message Date
Evan Almloff 34bdcd15cf Switch to a pool of dynamic values for hot reloading (#2705)
* create the dynamic value pool

* assign ids to dynamic formatted segments

* separate the rendering and literal pools

* rsx output compiles again

* more examples compiling with new rsx expansion

* update template body explanation

* all workspace examples compile

* fix formatted segments in keys

* start hot reload diffing

* fix component literal hot reloading

* start integrate new hot reloading with the CLI

* simple hot reloads working

* Fix hot reloading blocks with components

* implement hot reloading for if chains

* Fix hot reloading after a template requires a full rebuild

* Fix hot reloading any attribute values

* remove unsafe from hot reload utils

* Fix hot reloading empty rsx

* add more hot reloading tests

* reorganize hot reload module

* fix web hydration

* fix empty rsx nodes in autoformatting

* fix tests

* remove path sorting logic from core

* make template names more consistent in debug mode

* fix quote_as_hot_reload_literal for explicitly typed literals

* fix can_be_shorthand for string literals

* fix formatted single dynamic expression

* Fix usize component properties and playwright tests

* remove default implementation for TemplateBody

* add a bunch more comments for diffing, scoring and why this scoring system is optimal
2024-07-30 17:16:27 +00:00
Miles Murgaw bd58a92441 CLI: Toasts & Tweaks (#2702)
* progress: cli toasts

* forgot the html

* progress: toasts

* revision: don't open splash on desktop

* fix: fmt, spellcheck
2024-07-25 14:38:45 -07:00
88af3e7eff Hotreloading of for/if/body, formatted strings, literals, component props, nested rsx, light CLI rewrite, cli TUI (#2258)
Hotreload the contents of for loops, if chains, component bodies, props, attributes, and any literals discovered in rsx!
Add a TUI renderer to the CLI.
Improve the CLI build system to be async and parallel.
Refactor RSX to allow partial expansion of expressions.
Merge autofmt implementations for consistency.
Merge the representation of elements and components under the hood.
Add a diagnostics system for rsx for improved error messages.
Drop interprocess and move to websockets for communication between the CLI and the server.
Assign IDs to nodes and attributes in a stable way to be used in non compiler contexts.
Add hotreloading to any body of component/for loop/if chain/etc.

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Liam Mitchell <liamkarlmitchell@gmail.com>
2024-07-17 19:11:18 -07: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
Evan Almloff e464294c66 fix hot reload on windows (#2142) 2024-03-26 00:36:11 -07:00
Jonathan Kelley 6c9f991f0b hotfix: finding hotreload path fails when not running under cargo 2024-03-20 09:54:57 -07: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
Jonathan Kelley 10d361a44e Fix proxy (#2108) 2024-03-18 22:21:07 -07:00
Jonathan Kelley be00847199 Don't squawk when running under cargo 2024-03-17 21:15:57 -07:00
Jonathan Kelley 834d490beb Fix: #2095, #1990
- Don't merge dynamic attributes together unnecessarily
- Walk the workspace until we find a target dir with the dioxusin handle
2024-03-17 21:14:26 -07:00
Jonathan Kelley fe5fc1058e Fix: cargo running desktop shouldn't panic 2024-03-14 23:13:04 -07:00
Jonathan Kelley 3d699e7a75 Match on more places for asset reloading 2024-03-13 15:10:44 -07:00
Jonathan Kelley ad7a350d2e fix hotreloading issues in the CLI 2024-03-12 13:39:42 -07:00
Evan Almloff 3865f44081 make desktop compile 2024-01-05 14:39:45 -06:00
Evan Almloff 9a13df2c73 move hot reload socket into the target directory 2023-12-07 07:00:59 -06:00
Evan Almloff b965fc23e9 use a temp directory for the hot reloading pipe on desktop, fullstack and liveview 2023-12-06 17:01:51 -06:00
Marc Espín 129d0a68ff feat: Optional web support for hot-reload crate (#1527)
* feat: Optional web support for hot-reload crate

* rename feature

* tweak

* tweak
2023-10-20 12:59:49 -05:00
Marc Espín 915e79e3be fix: Use correct cfg for file_watcher feature in dioxus-hot-reload (#1238)
* fix: Use correct cfg for file_watcher feature in dioxus-hot-reload

* Update file_watcher.rs

* Update lib.rs

* fmt
2023-07-23 09:29:59 -05:00
Evan Almloff 3d8d8a1b6f half-build-times 2023-07-19 10:19:23 -07:00
Jon Kelley 90f80e4dc2 Fix cargo doc by using a fixed variant of interprocess (#1129)
* fix docs compilation

* dont change random codeblock
2023-06-27 19:40:41 -05:00
Evan Almloff 60abafb381 fix macos hot reloading on forced exit 2023-06-02 10:30:40 -05:00
Evan Almloff 383e7e6a58 Use more precice timestamp in hot reloading 2023-05-19 12:33:07 -05:00
Evan Almloff 2c629f6d13 use namespaced path instead of local path 2023-02-23 12:05:17 -06:00
Evan Almloff c012855659 collect non-fatal errors in hot reloading 2023-02-22 09:18:12 -06:00
Evan Almloff 32dc68c539 hot reloading: filter intial read of files by excluded dirs 2023-02-09 16:37:12 -06:00
Anatolii Kurotych 624f32115b Fix release build (#802) 2023-01-27 20:07:00 -06:00
Evan Almloff 60219d3f65 formatting 2023-01-15 12:01:12 -06:00
Evan Almloff 418d8b1c30 clippy 2023-01-15 11:51:17 -06:00
Evan Almloff 893d0be1a6 add option to specify a callback to make using hot-reloading in a CLI easier 2023-01-15 11:29:51 -06:00
Evan Almloff 63840bcca4 pass clippy 2023-01-13 17:55:11 -06:00
Evan Almloff 80755e1d55 remove debug log 2023-01-13 17:32:31 -06:00
Evan Almloff 34c8ad8849 fix gitignore performance issues 2023-01-13 17:31:55 -06:00
Evan Almloff 31e21aaa79 change rebuild_handler to rebuild_command 2023-01-13 17:15:06 -06:00
Evan Almloff 22f86ed464 update docs 2023-01-13 16:57:27 -06:00
Evan Almloff d642e53a2b intigrate with .gitignore 2023-01-13 16:25:03 -06:00
Evan Almloff cc983dc091 rebuild when the cargo.toml changes 2023-01-13 16:17:25 -06:00
Evan Almloff b3d119b815 Provide option to do full rebuilds when nessisary 2023-01-13 16:13:07 -06:00
Evan Almloff 3c229b38bc make shutdown message more clear 2023-01-12 18:51:08 -06:00
Evan Almloff fc28050da6 pass clippy 2023-01-12 12:09:43 -06:00
Evan Almloff 97b9f422e1 log path errors 2023-01-12 11:10:16 -06:00
Evan Almloff 351b9fab6f allow custom namespaces 2023-01-12 10:52:24 -06:00
Evan Almloff 9be1df1451 allow disabling logging 2023-01-12 10:32:45 -06:00
Evan Almloff 82048737f4 fix the macro export and WIP hot reloading docs 2023-01-12 08:47:33 -06:00
Evan Almloff 19aaa0ee5b allow watching arbitrary paths 2023-01-11 21:06:00 -06:00
Evan Almloff ee57046b58 Merge branch 'desktop-hot-reload' of https://github.com/demonthos/dioxus into desktop-hot-reload 2023-01-11 20:05:55 -06:00
= 9e45cbe4a7 remove the hot-reload-macro crate 2023-01-11 18:51:09 -06:00
= 042b67b61b factor out a hot reloading connect function 2023-01-11 16:43:41 -06:00
Evan Almloff 1b53d4585e handle liveview sockets disconnecting 2023-01-11 14:59:00 -06:00
Evan Almloff 1073574896 implement hot reloading for desktop 2023-01-11 13:40:02 -06:00