Commit graph

4296 commits

Author SHA1 Message Date
ASR-ASU
9f670e1eb0
Fix value returned by get_scroll_size (#2445)
The scroll position was returned instead.
2024-05-23 11:12:47 -05:00
luveti
d3f96ec323
Improved fullstack reload_upon_connect timeout (#2436)
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-05-22 07:35:07 -05:00
Evan Almloff
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 194899c737.

* 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
ASR-ASU
460b70e0f0
Add access to the Element attributes related to scrolling (#2338)
* Add access to the Element attributes related to scrolling

* Fix clippy warnings

* Restore interpreter/src/js/hash.txt content

* Update generated interpreter files

* Use euclid types as return types

* Remove redundant functions

* It's not necessary for PixelsSize to be in 3D

* Rename PixelsVector to PixelsVector3D and add a PixelsVector2D type

* Remove unused PixelsLength type
2024-05-21 12:56:49 -05:00
Sam Tay
e51d0d6983
Fix default launcher for web targets (#2431) 2024-05-20 06:55:12 -05:00
Andrew Voynov
e69c69abd7
chore(cli): optimized args handling for init & new (#2418) 2024-05-15 13:29:50 -05:00
Andrew Voynov
16313894da
feat(cli): init cmd can now skip user interaction (#2412)
Previously only `dx new` had this ability, now `dx init` has it, too.
2024-05-15 12:13:36 -05:00
Andrew Voynov
720899e19e
feat(cli): now user interaction can be skipped (#1872)
when creating a new project
2024-05-14 09:39:56 -05:00
Evan Almloff
40df088b7d
Make use_server_future accept FnMut (#2387) 2024-05-04 15:30:25 +01:00
Evan Almloff
5290b658fd
Fix effects triggered from async tasks; improve work scheduling docs (#2370)
* outline work scheduling

* move scheduling code from dirty_scope to scheduler

* introduce queue_effect

* Run effects after all tasks are polled if there are no components rerendered

* add a new test for async effects
2024-05-04 15:30:13 +01:00
Evan Almloff
05eaca320f fix empty docs clippy warning 2024-05-03 13:41:48 -05:00
Drew Pirrone-Brusse
010dcf9533
Improve the base_path story (#2381)
* Improve the base_path story

* allow base path routes without trailing slash

* remove note about trailing /

* fix clippy empty docs

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-05-03 13:38:07 -05:00
Wojciech Niedźwiedź
1b82ad4ddd
cli: disable opening the tab by default, add some trace logging for config resolution (#2377) 2024-05-01 08:32:04 -05:00
Evan Almloff
74352f2f61
Fix desktop effect race condition (#2313)
* don't poll desktop before the render has been applied

* fix desktop headless tests

* move edit queued code into the edit channel and add more comments
2024-04-26 12:52:33 -04:00
Jonathan Kelley
a0e06271dd
Fix: flaky CI by correcting autofmt to match proper spacing (#2369) 2024-04-26 12:04:56 -04:00
Evan Almloff
cbeda0af76
Refactor and fix eval channels (#2302)
* wip

* pull out eval into the interpreter

* fix web eval

* fix DioxusChannel name

* properly drop dioxus channel

* use typescript dioxus chanel in desktop

* add more comments to native eval

* add desktop headless eval tests

* expand web playwright eval tests

* fix web headless tests

* fix default hasher path

* run eval tests on windows

* restore desktop query drop code

* remove data from drop desktop query message

* catch syntax errors in desktop eval

* catch js runtime errors in desktop

* fix typo interprerter -> interpreter

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-04-26 11:55:48 -04:00
Evan Almloff
1d72ef16c4
Restore set compare hook (#2287)
* restore set compare hook

* fix use_set_compare doc example

* add a hook to compare a value with a set

* implement partialeq for SetCompare

* export the new hook

* fix the use_set_compare hook
2024-04-26 11:55:11 -04:00
Evan Almloff
fc2b441ee1
Fix memorization for the fragment component (#2360) 2024-04-26 00:48:06 -04:00
Evan Almloff
47c87568e1
Fix event handler memory leak (#2298)
* fix event handler memory leak and double drops

* Prevent double dropping generational boxes

* recycle instead of dropping
2024-04-26 00:47:22 -04:00
Evan Almloff
a27d4e71ed
Only compress web assets in the CLI (#2329)
* only compress web assets in the CLI

* precompressed -> pre-compressed

* only enable pre-compression in release builds
2024-04-26 00:47:04 -04:00
Chris Rogus
b147f5a737
impl HasFileData for FormData (#2346) 2024-04-25 14:31:50 -04:00
Evan Almloff
08da9a1253
Implement hash fragments in the router (#2320)
* implement hash fragments in the router

* clean up query and search example

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-04-25 14:30:25 -04:00
Evan Almloff
dd8e69635b
Fix calling server functions on desktop (#2357) 2024-04-25 14:24:46 -04:00
Evan Almloff
b30b363460
remove unused once-cell in memo (#2311) 2024-04-25 13:58:42 -04:00
Evan Almloff
cf6998b5ba
Warnings for signal writes that may cause infinite loops (#2277)
* warnings for signal writes that may cause infinite loops

* improve debugging output for reactive contexts on scopes

* expand help message
2024-04-25 13:58:25 -04:00
Evan Almloff
61360ea05f
extend the subscriber list instead of overriding it; fixes subscribers added in mark_dirty (#2319) 2024-04-25 13:57:46 -04:00
Evan Almloff
88f3558419
Fix reclaim element when hot reloading (#2361)
* Fix reclaim element when hot reloading

* Just disable headless tests on windows
2024-04-25 13:36:43 -04:00
Evan Almloff
39cef8fe42
fix out of order fields in route definitions (#2356) 2024-04-25 13:36:04 -04:00
Evan Almloff
6234f60b0e
Fix desktop drag events that don't have associated files (#2358) 2024-04-25 13:34:21 -04:00
Evan Almloff
72ef58b95e
Create use_muda_event_handler hook (#2367)
* create use_muda_event_handler hook

* fix use_muda_event_handler re-export
2024-04-25 13:32:34 -04:00
Jonathan Kelley
790b984e61
bump extension version 2024-04-24 22:41:31 -04:00
Alexander
1ec6819ac8
enables ability to turn off hot reloading (#2351) 2024-04-24 08:02:57 -05:00
Miles Murgaw
4e0c7940cc
revision: cli help docs (#2349) 2024-04-22 09:57:56 -05:00
alongdate
a5b4ceed39
chore: fix some typos in comments (#2340)
Signed-off-by: alongdate <alongyear@outlook.com>
2024-04-19 08:29:22 -05:00
Evan Almloff
5ce91e1bfc
Fix flakey windows tests (#2332) 2024-04-17 15:08:38 -07:00
Chung
c9ab09b348
fix path of set_server_url (#2314)
Co-authored-by: =Chung Wong <=wch705@gmail.com>
2024-04-16 09:18:50 -05:00
Marc Espin
b6d3da2b31
fix: Update use_resource docs (#2303)
* fix: Update `use_resource` docs

* Fix use_recourse docs; match ref instead of deref because WeatherLocation isn't copy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-04-15 08:28:12 -05:00
Miles Murgaw
05b662ee2d
fix: cli spam when build (#2300) 2024-04-13 18:16:13 -05:00
Marc Espin
29f69fa145
fix: Update use_hook docs (#2296)
* fix: Update `use_hook` docs

* rust

* fixes
2024-04-11 15:43:58 -05:00
Matt Hunzinger
96b9baafff
Fix event handler drops (#2288)
* Try to fix event handler drops

* fix Option<EventHandler> parsing logic

* only move over props if both event handlers are some

* fix owner forwarding with props(extends)

* fix clippy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-04-10 11:23:45 -05:00
Jonathan Kelley
994056e16d
Don't eat keys (#2280) 2024-04-08 22:31:58 -07:00
Jonathan Kelley
67af2d89dd
Autofmt nested rsx using syn::Visitor (#2279)
* Nested macros using visitor pattern
2024-04-08 22:15:52 -07:00
Jonathan Kelley
0b7c7701a3
fmt 2024-04-08 19:24:49 -07:00
Evan Almloff
af524d979b
Fix empty for loop, if statements and children (#2275)
* fix empty for loop, if statements and children

* fix clippy
2024-04-08 19:23:55 -07:00
Evan Almloff
40b576894f
fix the assets head path (#2267) 2024-04-08 19:23:11 -07:00
Evan Almloff
a012fb57ab
poll tasks in the same order they are queued (#2273) 2024-04-08 18:44:43 -07:00
Evan Almloff
26c109f661
fix volatile attributes (#2278) 2024-04-08 18:42:48 -07:00
Aron Puddy
c799168666
pass features thru to cargo on dx bundle (#2271) 2024-04-08 08:52:04 -05:00
Ahmet Kaan GÜMÜŞ
e03593cff7
docs: ✏️ unnecessary need to in global_context.rs (#2268) 2024-04-08 08:51:14 -05:00