Commit Graph
258 Commits
Author SHA1 Message Date
Evan Almloff a09548d80e Remove implicit optional dependency features (#2512)
* remove implicit optional dependency features

* switch to new features in desktop, router and signals crates
2024-06-18 18:39:15 -05:00
Evan Almloff 3a4860add4 Document props and component macro (#2522)
* document prop attributes

* document children props

* fix children doc test
2024-06-18 16:06:54 -07:00
Evan Almloff 2f387604a8 remove double braces in shorthand children error message 2024-06-12 14:45:17 -05:00
Evan Almloff d795995e20 Create closure type; allow async event handlers in props; allow short hand event handlers (#2437)
* create closure type; allow async event handlers in props; allow shorthand event handlers

* test forwarding event handlers with the shorthand syntax

* fix clippy

* fix imports in spawn async doctest
2024-06-10 18:47:07 -07:00
Evan Almloff b3cd4fac10 set up example scaping for docs.rs (#2450) 2024-05-28 13:05:55 -07:00
Evan AlmloffandJonathan Kelley 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 194899c73783e0f9b5d601d53365746d838f2048.

* 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 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
Jonathan Kelley be99e29e5f Fixes to autofmt, make it more aggressive (#2230)
* fix: fmt unterminated if, be more aggressive with line splits

* Fix: Handle long exprs in for/if statements
2024-04-03 15:27:36 -07:00
Miles MurgawandJonathan Kelley 3cbe6ff96e Fix Outdated README.md (#2147)
* fix: outdated readme

* Fix missing readme

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-03-26 19:17:02 -07:00
Jonathan Kelley eb79e61642 Add a ton of comments to rsx/hotreload, add snapshot testing, refactor a bit to simplify the crate (#2130)
Merge dynamic context and dynamic mapping, clean up the rsx hotreload logic, and add location data to the Rsx objects
2024-03-24 13:31:26 -07:00
Evan Almloff 58f7efafea Make EventHandler copy (#2112)
* implement Copy for EventHandler
* implement from closure for event handler and remove special on prefix
* fix props implementation of EventHandler
2024-03-19 19:48:53 -07:00
Jonathan Kelley 2dc6cecf2e Fix #2043: use formvalue instead of String for forms (#2103)
Fix #2043: use formvalue instead of String for forms
2024-03-18 18:21:08 -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 9474ad54cc Make clippy happy 2024-03-14 22:40:23 -07:00
Jonathan Kelley 3d699e7a75 Match on more places for asset reloading 2024-03-13 15:10:44 -07:00
Jonathan Kelley 1bdc9d132e Load tracked assets 2024-03-13 14:35:28 -07:00
Jonathan Kelley e4f65b7260 Tests: add tests for hotreload and recurse into children 2024-03-13 14:15:34 -07:00
Jonathan Kelley 982b96074a Add basic hotreload test samples 2024-03-13 13:07:15 -07:00
Jonathan Kelley bca5335f31 fix: hotreloading files with multiple templates, asset hotreloading 2024-03-13 02:13:37 -07:00
Jonathan Kelley ad7a350d2e fix hotreloading issues in the CLI 2024-03-12 13:39:42 -07:00
Evan Almloff b2607a5b35 Fix temporary reads within rsx 2024-03-12 15:15:36 -05:00
Konstantin Kostiuk a4de322821 fix typo varient -> variant (#2056) 2024-03-11 17:03:34 -05:00
Jonathan Kelley 7461a14cb4 fix 2020: return None if the root nodes are empty in rsx (#2026) 2024-03-08 15:57:46 -06:00
Jonathan Kelley 22e82fc140 undo >=1 check on roots 2024-03-07 16:11:44 -08:00
Jonathan Kelley ae352f8958 Feat: reject invalid keys 2024-03-07 16:03:00 -08:00
Jonathan Kelley 8f07d881a6 Switch todo!() to unreachable!/unimplemented! where it matters 2024-01-31 16:26:20 -08:00
Evan Almloff a7a3513b3f fix ifmt spans 2024-01-31 12:41:35 -06:00
Evan Almloff af75fb855f wrap the result of render_with_location in an option 2024-01-31 12:24:36 -06:00
Evan Almloff 913ed0cfe3 fix outputting rsx with a manual location 2024-01-31 12:22:56 -06:00
Jonathan Kelley 0bd9692e45 Fix cargo test and a number of little cleanup bugs 2024-01-30 17:33:14 -08:00
Evan Almloff 300a7dc12b Create a new function for dioxus-rsx Element 2024-01-30 11:10:45 -06:00
Evan Almloff 50e3216d8b convert T into signals automatically 2024-01-29 13:36:39 -06:00
Evan Almloff c83ca7b15f fix raw expressions in the format macro 2024-01-23 10:09:14 -06:00
Evan Almloff 27f8377ea5 fix try to string in ifmt 2024-01-22 17:25:49 -06:00
Jonathan Kelley 337c04557b get cargo check --all --examples --tests working! 2024-01-19 15:01:01 -08:00
Jonathan Kelley 6ed3aafb2f Get cargo check --all working 2024-01-18 19:27:55 -08:00
Jonathan Kelley d8af9b7ed1 Fix compile checks on numerous packages using --all --all-features 2024-01-18 16:27:43 -08:00
Evan Almloff ad01a45f3b restore core tests 2024-01-16 15:51:02 -06:00
Evan Almloff 918d09b516 fix merging attributes 2024-01-16 14:20:51 -06:00
Evan Almloff 90d0164b9e fix formatted strings in components 2024-01-16 12:47:23 -06:00
Evan Almloff 8d14671520 fix spreading attributes 2024-01-16 11:04:37 -06:00
Evan Almloff af1749d7be re export renderers in dioxus 2024-01-15 19:14:11 -06:00
Evan Almloff 36e9eb1160 partially restore spreading attributes 2024-01-14 15:21:19 -06:00
Jonathan Kelley e801007698 Clean up some bits 2024-01-11 17:36:00 -08:00
Jonathan Kelley 3f15612c8e Fix remaining issues to get desktop running 2024-01-11 17:30:50 -08:00
Jonathan Kelley 8c94f0bc4a get compiling 2024-01-11 16:51:18 -08:00
Jonathan Kelley 2ae3241cc0 Merge branch 'master' into jk/breaking-merged 2024-01-11 16:04:36 -08:00
Jonathan Kelley 4f077ec664 Merge pull request #1812 from ealmloff/duplicate-event-listener-rsx
check for duplicate event listeners in the rsx macro
2024-01-11 14:34:01 -08:00
Jonathan Kelley 8ff13c3c1b Fix some basic clippy stuff 2024-01-11 12:13:38 -08:00
Jonathan Kelley 1527b81e02 Components participate in event handlers 2024-01-11 12:11:27 -08:00