Commit graph

4439 commits

Author SHA1 Message Date
Miles Murgaw
e0bb67b476
Support Optional Read Signals (#2761)
* progress: add test

* feat: optional read signals

* revision: doc

* fix: fmt

* revision: imports

* fix: return type only if option

* add a few more compile tests for optional props

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-08-01 19:22:35 +00:00
Jonathan Kelley
c5fb69f9f1
release: 0.6.0-alpha.1 (improve docs.rs for fullstack, dioxus) (#2760) 2024-07-31 21:43:13 -07:00
Jonathan Kelley
0cbcef735f
Pre-release 0.6.0-alpha.0 (#2755)
* CI: add docsrs to ci

* add env vars

* no need for tokio things

* whoops, wrong rust nightly

* add swc

* bump crate versions to 0.6.0-alpha.0

* hoist up warnings and shuffle cargo.toml

* update cargos and disable warnings from ci

* attempt fix of aws

* attempt disabling aws_lc_sys globally

* pull in lc-sys

* add fips feature to fix docs

* turn on features for aws-lc-sys on cargo-doc-all

* pass along more args

* fix cfg docs

* fix: flakey gen box test

* fix: doc_cfg in static gen

* dont include readme

* fix error on static gen

* remove random line

* temporarily disable warnings

* simplify axum desktop so it doesnt count as a lib

* fix binstall link

* bump locks

* lock fixes

* revert axum desktop

* dont publish some crates
2024-07-31 22:37:39 -05:00
Miles Murgaw
4ffcef16af
Feat: Auto Default Into (#2757)
* feat: auto default into

* fix: fmt

* fix: type infer

* feat: text auto into
2024-07-31 20:14:43 -04:00
Evan Almloff
b8565e6de0
Fix the base path in the CLI (#2756) 2024-07-31 15:54:39 -07:00
Matt Hunzinger
4bf71111c8
Refactor WebEventExt (#2707)
* Create WebEventExt::try_as_web_event and refactor
* Inline and adjust error message
* Inline downcast methods
2024-07-31 13:01:25 -07:00
Jonathan Kelley
63e7aab4e8
Fix 2265: close tui on success, custom tui subscriber (#2734) 2024-07-31 10:49:51 -07:00
Jonathan Kelley
189772a17b
Use the correct to-static impl for sending escaped strings via hotreload (#2753) 2024-07-30 23:06:44 -05:00
Jonathan Kelley
828cc502f1
Fix: #2604, Fix: #2240, Fix: #2341, Fix #1355 - Better error handling and and spaces handling in autofmt (#2736)
* add new autofmt sample
* Feat: implement rustfmt::skip support for rsx
* generally improve error handling with better expect messages
* wip: nested rsx formatting and expression formatting
* nested rsx formatting works
* collapse autofmt crate
* cast indent through macros
* use proper whitespace
* no more eating comments!
* Use proper error handling
2024-07-30 18:36:13 -07:00
Matt Hunzinger
ef0202f999
Workspace support for dx fmt (#2745) 2024-07-30 16:57:43 -07:00
Evan Almloff
74e51b7e0d
Fix hot reloading spreads (#2750) 2024-07-30 15:34:27 -07:00
Evan Almloff
1b0d089d19
Fix list diffing with root dynamic nodes (#2749) 2024-07-30 15:16:42 -07:00
Evan Almloff
df8c7e1872
don't print the asset path on desktop (#2748) 2024-07-30 20:31:03 +00:00
Evan Almloff
33f3d40a49
Fix diffing Option<String> (#2746) 2024-07-30 13:05:56 -07:00
Evan Almloff
115cc0ad42
Fix component names when they are re-exported (#2744)
* Fix component names when they are re-exported
* Fix read only signal props expansion
2024-07-30 12:28:19 -07:00
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
Matt Hunzinger
f3ca1484a1
Pass --package to Cargo #1547 (#2740)
* Fix tests

* Pass package argument to Cargo

* Fix git rev
2024-07-29 23:11:24 -04:00
Matt Hunzinger
e12acb417e
Add short p option for package to match cargo (#2738)
* Add short package CLI option
2024-07-29 18:37:12 -07:00
Miles Murgaw
67c0f1c5f0
fix: enable/disable hot reload (#2737) 2024-07-29 14:52:04 -07:00
Jonathan Kelley
0e84d00d9c
Fix #2309: rfd doesn't need async-std (#2712)
* Fix #2309: rfd doesn't need to be async
* just use tokio instead of async std
2024-07-29 15:24:31 -05:00
Jonathan Kelley
8aa07b0a75
speed up incremental cli builds by making wasm-opt optional (#2720)
* speed up incremental builds by making wasm-opt optional
2024-07-29 13:20:46 -07:00
Matt Hunzinger
6558fd95a2
Follow-up for error messages in core (#2719)
* Fix tests

* Replace unwraps on RuntimeError with panics and add track_caller for better error output

* Convert more unwraps

* Fix git
2024-07-29 13:15:06 -07:00
Adam Kundrát
a1dfc4b4f0
fix issue 1586 followup (#2733) 2024-07-29 13:00:59 -07:00
Miles Murgaw
b7127ad6ae
Fix WSL Hot Reload (#2721)
* feat: poll watcher
* progress: wsl hot reload setting
* feat: wsl poll setting
2024-07-29 12:33:03 -07:00
Adam Kundrát
4e338accad
implement HasMouseData for WheelEvent (#2728) 2024-07-29 12:28:06 -07:00
Adam Kundrát
23dfe39bdf
desktop app saves window position fix (#2730)
* desktop app saves window position fix

* debug cfg

* cargo fmt
2024-07-29 12:25:34 -07:00
Adam Kundrát
3db24934d6
fix issue 1586 (#2725) 2024-07-28 23:48:49 -07:00
opensource-inemar-net
e73484795a
This fixes issue (#2724) 2024-07-28 12:06:09 -07:00
Jonathan Kelley
c4e55c7fb6
Fix #2378: CLI MSRV and add MSRV to CI (#2716)
* Fix: bump msrv up to be valid for cli
* add binstall check to ci
* adjust msrv of tomls
2024-07-26 19:24:40 -05:00
Matt Hunzinger
c48232f386
TUI tweaks (#2685)
* Clear builds logs on clear screen key event and fix keybinds rendering
* Clear the currently selected build logs
* Add placeholder for / screen
* Change tabs to be 1-indexed
* Redirect build errors to build tab
* Open the running app with 'o'
2024-07-26 17:12:54 -07:00
Jonathan Kelley
1a66987245
Fix: enable dangerous_inner_html for svgs (#2717) 2024-07-26 23:29:24 +00:00
Miles Murgaw
810f8bbfb8
Feat: always_on_top CLI Setting (#2715)
* feat: always_on_top cli setting

* revision: add user message for configuring settings
2024-07-26 16:27:56 -07:00
Jonathan Kelley
e42b71b1ba
Fix #2612: adjust readable trait to allow try_peek (#2714)
* Fix #2612: adjust readable trait to allow try_peek

Our implementation for Readable was inconsistent.
We had a try_unchecked variant for read but not for peek.
This resolves that by making a breaking change to the
Readable interface.

* fix doctests too
2024-07-26 18:20:16 -05:00
Evan Almloff
443b9a4af6
Parse redirects in the same order they appear in (#2650)
* Parse redirects in the same order they appear in
2024-07-25 17:47:38 -07:00
Evan Almloff
c6a2e5b6c8
Use head elements and new manganis syntax in examples (#2688)
* use head elements and new manganis syntax in examples
* only enable desktop workspace example scraping during a dioxus release

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-25 21:58:00 +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
Matt Hunzinger
beeee0dda1
Update tasks.rs (#2703) 2024-07-25 12:37:49 -05:00
Evan Almloff
163586c3ff
Make the web config optional in dioxus.toml (#2700) 2024-07-24 19:23:09 -07:00
Evan Almloff
7f210633eb
fix formatting and merging if chains in attributes (#2697)
* fix formatting and merging if chains in attributes

* fix autoformat if attribute chains

* Fix IfAttributeValue ToTokens implementation

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-24 18:56:21 -07:00
Evan Almloff
a6e41e9d68
Make dioxus-cli a binary - not a library (#2698) 2024-07-24 18:09:57 -07:00
Evan Almloff
942e701f02 Fix signal warnings in release mode 2024-07-24 17:55:57 -07:00
Evan Almloff
8636ada3a4
Add a deprecation warning for the resource option in dioxus.toml (#2642)
* Add a deprecation warning for the resource option in dioxus.toml

* fix name of resource config

* fix tab spacing issue

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-24 17:52:28 -07:00
Evan Almloff
a6c025c8ef
Unify the warning system (#2649)
* unify the warning system

* fix VirtualDom::new warning with a component

* move warnings to dioxuslabs

* also allow writes in the component body when converting from T -> ReadOnlySignal<T>

* fix clippy from merge conflict

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-24 15:50:36 -07:00
Andrew Voynov
f8cb07e673
feat(cli): added git commit hash to version output (#2696) 2024-07-24 13:44:45 -07:00
Evan Almloff
bd484842bd
Fix playwright tests (#2695) 2024-07-24 12:48:30 -07:00
Evan Almloff
9479d2376d fix RuntimeError message formatting 2024-07-24 11:33:28 -07:00
Matt Hunzinger
d07e81005f
Better expect error messages (#2629)
* Replace expect error messages

* Change message

* Create RuntimeError struct

* Pass error through core methods

* Fix use of Runtime::current in signals package

* Fix tests

* Add #[track_caller] for better error output and fix maybe_with_rt

* provide a help message along with RuntimeError

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2024-07-24 13:31:56 -05:00
Tristan F.
9167cd9dec
fix most typos, add crate-ci/typos to CI (#2653)
* fix most typos, add crate-ci/typos to CI

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-23 17:49:33 -07:00
Evan Almloff
841b447d2a
improve error message when the CLI and dioxus versions don't match (#2683) 2024-07-23 17:27:52 -07:00
Evan Almloff
ea3d88c1dd
Fix spread props diffing (#2679)
* Fix spread props diffing

* Add a regression test for extends prop diffing
2024-07-23 16:57:05 -07:00