Commit Graph
4950 Commits
Author SHA1 Message Date
Evan Almloff eccd75a1fe Switch the default server function codec to json (#3602)
* Switch the default server function codec to json

* test both input and output encoding
2025-03-04 14:20:56 -06:00
Jim 9967118784 Make GenericRouterContext pub (#3812) 2025-03-04 14:11:12 -06:00
Sabin Regmi 6a0ae17d56 Expose Outlet Context (#3788)
* Expose Outlet Context

* feat(router): expose OutletContext and use_outlet_context for improved accessibility

* Hide OutletContext properties

* Starts from 0 ?

* Clippy fix with Default
2025-03-04 12:34:22 -06:00
Evan Almloff f4c59e1188 Fix span locations in ifmt and components (#3823)
* Fix span locations in ifmt

* Fix component spans

* Blame extra children on the first child element

* fix clippy
2025-03-04 12:25:07 -06:00
Evan Almloff 0251221c69 Fix the typo checking CI (#3824) 2025-03-03 21:32:59 -06:00
David Tolnay 9361c3ecd9 Support concat! and other macros in asset path (#3809) 2025-03-03 12:55:59 -06:00
wdcocq 062ea02e07 Fix opened browser blocking dx serve (#3818) 2025-03-03 12:53:20 -06:00
Marco BergaminandMiles Murgaw b5381e748c Fix --target flag not passed to cargo when Platform == Server (#3595)
* Fix --target flag not passed to cargo when Platform == Server

* revision: use --server-target flag

---------

Co-authored-by: Miles Murgaw <milesmurgaw@gmail.com>
2025-02-27 16:14:10 -08:00
Evan Almloff 1fa172486b Add helper methods to provide a single clone server only context (#3483)
* Add helper methods to provide a single clone server only context

* fix clippy
2025-02-27 10:19:16 -08:00
Miles Murgaw b91d374479 Revision: Open Browser With Localhost (#3776)
* revision: open browser in localhost

* revision: use displayed address
2025-02-27 10:11:17 -08:00
Miles Murgaw 9c5f9882d9 Feat: CLI Debug Warning (#3779)
* feat: cli debug warning

* fix: fmt
2025-02-27 10:08:59 -08:00
Evan Almloff ceb1a0e796 Prevent default if an onclick event is triggered on a button under a form (#3804) 2025-02-27 10:08:26 -08:00
Evan Almloff 797e7492a1 Fix hot reloading component removal with formatted attribute values (#3559)
* Fix hot reloading component removal with formatted attribute values

* fix semvar
2025-02-24 13:18:21 -08:00
Klemen eff2e5d18e fixed wix assets path (#3763) 2025-02-24 12:08:48 -08:00
Jonathan Kelley bdeedc13eb feat: router-based wasm bundle splitting (#3683)
* feat: wasm-split base implementation

* kinda sorta works with the cli

* okay great it actually works

* fix: cache busting for chunks

* cleaned up version

* it works with the router

* wip: migrate to a faster linear solution using id remapping

* add a good harness

* it works completely on the docsite

* the super tight build works too

* make parallelizable

* works on the docsite but not the harness

* light cleanups, fix for both harness and docsite

* make codegen smaller by extract some shared functions to prevent monos

* chunking works, but tbd on tuning heuristics

* extract used module

* wip: cleaning up module

* wip: much better understanding of how imports work

* fix the call graph

* working again...

* wip: thinking about ifuncs

* ifunc approach works

* yes the ifunc approach works!!

* it all works completely even with chunks

* small cleanups

* comments

* actually locate all of the symbols

* clean up final implementation

* clean up tomls, revert some mono changs

* clean up, add some more comments / docs in places

* hoist more packages

* clean up impl a bit more

* clean cli

* move harness to playwright

* update playwright

* extract codgen

* add lazy to components

* Add docs to split loader

* clippy

* typos

* clippy, don't generate splits if not on wasm

* whoops, const

* Typos and docs

* enable optimizations in ci

* add optimizations to ci

* add wasm-split router feature

* parallel playwright?

* fix no case check

* disable pre-compress... think that might be the issue

* better logging, no default pre-compress, caching of shared symbols
* Fix: compressing assets

* fix non-interactive logging for serve

* cache playwright even on failure, use the cli with optimizations

* fix prebuild

* fix playwright webserver
2025-02-13 18:54:38 -08:00
Youn Mélois c13fb06bfa fix(interpreter): missing scrollTo boolean return value (#3734)
* fix(interpreter): missing scrollTo boolean return value

* docs(examples): unwrap scroll_to instead of discarding result values
2025-02-13 11:37:13 -08:00
Evan Almloff b443309f6e Hash and compare templates by value in debug mode (#3630)
* Hash and compare templates by value in debug mode

* add a regression test for layout state persisting after navigation

* More reliable static item merged detection
2025-02-07 16:35:32 -08:00
Miles Murgaw 18feb0b38d feat: disable drop handler (#3680) 2025-02-07 16:10:05 -08:00
Miles Murgaw 8b9e246044 fix: stop failing silently (#3682) 2025-02-07 16:09:25 -08:00
Miles MurgawandJonathan Kelley 4199d545fe Allow Missing Prop Docs (#3692)
* revision: allow missing prop docs

* fix: link

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-02-07 16:09:08 -08:00
oletf f594a65b7e use main exe name without extension for bundler (#3696) 2025-02-07 16:08:23 -08:00
Youn Mélois ab91965cc0 fix onload and onerror parsing error (#3707)
regression error induced by 299b123 where serde default got removed from `load_error` attribute of `ImageData`.

```diff
pub struct ImageData {
-     #[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
-     pub load_error: bool,
+     inner: Box<dyn HasImageData>,
}

// ...

+ struct SerializedImageData {
+     load_error: bool,
+ }
```
2025-02-07 16:08:00 -08:00
Evan Almloff 1c902ab729 Fix serving desktop+fullstack apps that have not set a server url (#3701)
* Fix serving desktop+fullstack apps that have not set a server url

* revert fullstack desktop example changes
2025-02-07 16:07:06 -08:00
Evan AlmloffandJonathan Kelley 5bb7f51cba Remove the stylesheet component (#3176)
* Remove the stylesheet component

* add props to style component

* don't remove stylesheet

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-01-31 15:06:14 -08:00
Vishwanath Martur 2fd7684a93 Add examples for LaunchBuilder methods (#3629)
Related to #3530

Add examples for `with_cfg`, `with_context`, and `with_context_provider` methods in the `LaunchBuilder` documentation.

* **with_context_provider**: Add an example demonstrating how to inject state into the root component's context created on the thread that the app is launched on.
* **with_context**: Add an example demonstrating how to inject state into the root component's context.
* **with_cfg**: Add an example demonstrating how to provide a platform-specific config to the builder.
2025-01-31 14:34:45 -08:00
Evan Almloff 2d188452ae Fix additional attributes for js renderers (#3625) 2025-01-31 14:31:31 -08:00
Andrew Voynov 67515ce812 Allow to connect to the dev server from a physical Android device (#3634)
* fix(android): now dev server just works on devices

* fix: allow custom port for Android app development

* refactor: simplified URL creation in LaunchBuilder
2025-01-31 14:29:54 -08:00
Jonathan Kelley 202f2e81d7 use apt-caching, don't cargo install during test 2025-01-30 15:55:35 -08:00
Marc Espin c5f43dd13e feat: Allow using NavigationTarget outside router (#3633)
* feat: Allow using `NavigationTarget` outside of router

* chore: Update import

* chore: Update imports

* fmt
2025-01-28 10:52:48 -08:00
Jonas Pleyer 4e955d0e3b remove html! macro mentioning (#3654) 2025-01-28 10:40:16 -08:00
Jonathan Kelley 155a2467be fix: don't emit hash fragment for internal links if hash is empty (#3660)
* fix: don't emit hash fragment for internal links if hash is empty

* add test
2025-01-28 10:09:27 -08:00
Evan Almloff c85018300b Ignore write while rendering warning in memo lazy recompute (#3647) 2025-01-27 14:33:15 -08:00
Evan Almloff bd30516490 Fix web eval return (#3656)
* Fix web eval return

* add regression test to playwright
2025-01-27 12:57:20 -08:00
Jonathan Kelley 5d4893493b revert ring pr 2025-01-21 18:55:15 -08:00
Jonathan Kelley 03c2d6711d fix: pass off env vars to android apps (#3621)
* fix: pass off env vars to android apps

* move to jni_onload

* fix clippy
2025-01-21 18:52:56 -08:00
Vinicius Gobbo Antunes de Oliveira ce2b223af9 CryptoProvider error. (#3619) 2025-01-21 18:46:59 -08:00
Jonathan Kelley 08f2180bbd fix: use a different temp path to not confuse image opt (#3620) 2025-01-21 18:33:43 -08:00
Evan Almloff 13dcd80fbf Optimize wasm bindgen asset with manganis (#3531) 2025-01-21 15:14:45 -08:00
Jonathan Kelley d8850c7666 fix: don't have Rc cycles in DioxusElement or Queries (#3618) 2025-01-21 14:57:31 -08:00
Jonathan Kelley d42b1d5146 fix: too much padding for small frames (#3616) 2025-01-21 11:33:00 -08:00
Evan Almloff f99e50b0aa Fix hot reload diffing to empty rsx (#3567)
* Fix hot reloading to empty rsx

* Only normalize the template when hot reloading and rendering

* add a test for emptying out an rsx block in hot reloading
2025-01-21 00:33:29 -08:00
Jonathan Kelley 2c6a5212fc fix: loop panic on process exit in serve 2025-01-21 00:32:39 -08:00
Jonathan Kelley 439e3e7723 fix: dont unwrap as much in desktop (#3609) 2025-01-21 00:13:05 -08:00
Miles Murgaw 4342ca92a3 Fix: always-on-top setting (#3347)
* fix: always-on-top

* revision: remove setting override
2025-01-20 23:34:30 -08:00
Jonathan Kelley d342630a0a feat: android bundling, red/blue exe names, session cache (#3608)
* feat: android bundling

* fix: add hashing to exe names for red/blue exes

* feat: implement session cache for window restoration
2025-01-20 21:16:55 -08:00
Jonathan Kelley 024285c548 fix: don't send hot-reload if app is building (#3607) 2025-01-20 18:58:50 -08:00
Jonathan Kelley 6c907b1c20 fix: restore file in release mode 2025-01-20 18:36:17 -08:00
Jonathan Kelley b6475bdc0a fix: don't ignore manganis assets (#3606) 2025-01-20 18:35:41 -08:00
Jonathan Kelley c2ad99406d Fix: don't overwrite pos/size when dx-rebuilding 2025-01-20 18:02:59 -08:00
Jonathan Kelley 8334f7fbaa feat: device hot-reload, tools-relative adb, auto port bind (#3586)
* wip: bind to 0.0.0.0 instead of 127.0.0.1

* dont hang in background - ignore suspend commands when tty is disabled

* use system adb

* pass configs through to android mobile launch

* fix: line sizes + clear pushes frame

* dont resume window state on mobile

* fix screen sizing for ipad

* attempt and fail to implement codesigning

* Clippy and note about safety in android bindings
2025-01-20 17:42:13 -08:00