Commit graph

4308 commits

Author SHA1 Message Date
Evan Almloff
5494e38cf8
Fix event bubbling inside templates after a hot template reload (#2484) 2024-06-06 17:10:38 -07:00
Evan Almloff
b6cdcb4e7f
fix routers without an index route (#2477) 2024-06-06 17:03:59 -07:00
Evan Almloff
5e57779435
fix memo and resource caller information (#2443) 2024-06-06 17:01:42 -07:00
Evan Almloff
489758d5ba
remove value attribute in addition to resetting it (#2480) 2024-06-06 17:00:54 -07:00
Evan Almloff
e1044a2fa8 fix clippy 2024-06-06 15:34:52 -05:00
airblast
0eb16f27d4
chore: Remove unused dependency (#2466)
Removes the constcat dependeny from core-macro.
2024-05-31 07:06:55 -05:00
Drew Pirrone-Brusse
e1b0e0425a
Switch from an absolute ::dioxus to the relative dioxus_core (#2465) 2024-05-31 06:12:32 -05:00
Rafał Krzyważnia
54dbe6d074
Use RwLock::read in SyncStorage (#2463)
Replaces `RwLock::try_read` with `RwLock::read` in `SyncStorage`. This change prioritizes potential deadlocks over panics, as unwrapping a failed `try_read` is deemed less desirable.
2024-05-30 07:05:20 -05:00
Marc Espin
7d529cf39c
fix: Avoid cloning a provided context unnecessarily (#2458)
* fix: Avoid clonning a provided context unnecessarily

* remove another useless clone in use_context_provider

* fix formatting

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-05-29 08:53:21 -05:00
Evan Almloff
b3cd4fac10
set up example scaping for docs.rs (#2450) 2024-05-28 13:05:55 -07:00
Gino Valente
160cde7b48
Make use of #[doc] field attributes in Props derive macro (#2456)
* Support passing docs along to prop fields

* Pass along entire doc attribute
2024-05-28 11:33:51 -07:00
Evan Almloff
1eb90bf43a fix static site generation with child routers 2024-05-23 12:32:39 -05:00
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