Commit Graph
89 Commits
Author SHA1 Message Date
Evan Almloff e65c5f0eb3 depreciate the render macro 2024-01-16 13:18:46 -06:00
Evan Almloff 71a08678a6 make link extend global attributes 2024-01-16 11:10:34 -06:00
Evan Almloff d2cdcc602b impl ComponentFunction for Routes 2024-01-16 09:40:17 -06:00
Jonathan Kelley 98bd78de43 Fix issue with mutability in component macro 2024-01-15 23:57:10 -08:00
Evan Almloff af1749d7be re export renderers in dioxus 2024-01-15 19:14:11 -06:00
Jonathan Kelley fae0b08e61 Fix the router and stub out a number of crates to get compiling 2024-01-13 20:51:37 -08:00
Jonathan Kelley d9b84f9f8f Disambiguate expressions in rsx by requiring curlies 2024-01-10 19:33:34 -08:00
f5bc1a9856 Implement LiveView Router Integration (#1505)
* Fix GoForwardButton calling can_go_back instead of can_go_forward

* Add first draft of LiveviewHistory

* Add external URL redirect

* Lock evaluator channel outside loop

* Add liveview to router examples

* fixup! Add liveview to router examples

* Communicate with liveview server on page load

* Add PopState event to Liveview routing

* Call updater callback from liveview history

* Add rudimentary PopState functionality to liveview router.

* Fix linter errors

* Refactor

* Fix navigator external redirection not working.

* Add go back and go forward buttons to router examples

* Finish functionality for timeline stack in liveview router

* Add docs to LiveviewHistory

* Replace Liveview history context attachment with constructor that takes context

* Fix go forward/backward history/future shuffle

* Support history across entire liveview session, if contiguous page jumps.

* Remove unnecessary bounds

* Add query and hash to location string

* Run rustfmt

* fix: Update server function docs link (#1489)

* liveview: Add `interpreter_glue_relative_uri (#1481)

* liveview: Add `interpreter_glue_relative_uri`

By utilizing `window.location.host` in the client-side JavaScript, we can easily derive the WebSocket URI from a relative path URI. This approach obviates the need for host address retrieval on the server side, unlike the method of serving glue code in liveview using `interpreter_glue`.

* liveview: Merge `.._relative_url` functionality

- Merged `.._relative_url` to current API `interpreter_glue`.
- Edit axum example to work with new feature.

* liveview: Fix clippy warning

* Rename modules to use snake_case (#1498)

* Change Scope into &ScopeState

* Move synchronization of state into router and make it opt-in

---------

Co-authored-by: Marc Espín <mespinsanz@gmail.com>
Co-authored-by: Seungwoo Kang <ki6080@gmail.com>
Co-authored-by: Leonard <tigerros.gh@gmail.com>
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-10-26 14:19:51 -05:00
Stephen AndaryandEvan Almloff b25fada776 Add Newtype so that Rust-url can be IntoRoutable (#1579)
* add newtype so that rust-url can IntoRoutable

* add doc line

* implement From<Url> directly

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-10-25 15:36:38 -05:00
Leonard c866ae602b Add system for creating component attributes + new #[component] attribute (#1448)
* Add `#[component]` attribute + system for creating component attributes + other stuff

* Delete inlineprops.rs

* Update inline_props.rs

* Cargo fmt

* Fix clippy warnings and paths in props/mods.rs

* Include where clause in `#[inline_props]` output

* Allow Clippy type complexity in `LinkProps`

* Allow the type complexity lint for the entire link.rs file

* Remove snake_case -> PascalCase converter, but rather enforce PascalCase

Also:
- Put the second function inside the main one instead of besides it.
- Simplify

* Simplify type check lints so they don't return false positives

They will not always work, but they won't return any false positives, like for aliases. This is likely going to be replaced by a more polished Clippy-backed linting system.

* Fix #583

* Cargo fmt

* Add docs for `deserialize()` and remove useless comment

* Add `#[component]` to prelude

* Merge branch 'master' of https://github.com/tigerros/dioxus

* #[inline_props] is no more. Except in the docs folder, but that's going to be removed

* Remove docs folder

* Remove docs from workspace

* Resolve `DeserializerOutput` conversation
2023-09-15 09:13:36 -05:00
Evan Almloff c55c17cb81 switch to tracing for logging 2023-09-06 17:47:33 -05:00
ealmloff cfd62e274e Make deprecated use router (#1260)
* make router props expansion better

* fix router data fields

* make a deprecated use_router hook
2023-07-27 10:32:23 -07:00
Evan Almloff d2ec27e761 fix clippy 2023-07-26 11:29:34 -07:00
Evan Almloff 947a153347 make navigator non-generic 2023-07-26 11:08:45 -07:00
Evan Almloff e7a9161066 fix link component 2023-07-26 10:18:39 -07:00
Evan Almloff 5f0dd3af3e it almost lives? 2023-07-25 18:14:48 -07:00
Evan Almloff 61dc549ba1 Make new enum router less breaking 2023-07-24 11:57:56 -07:00
Evan Almloff 5f37dcc2ac fix layouts in child routes 2023-07-13 19:56:30 -07:00
Evan Almloff 128f3e4425 fix nested routers 2023-07-13 19:29:43 -07:00
Evan Almloff 523be82965 fix clippy 2023-07-06 12:14:40 -07:00
Evan Almloff 1110026d54 allow nested routers 2023-07-06 11:52:17 -07:00
Evan Almloff 1704ee0068 router/fullstack/ssr intigration 2023-06-22 16:51:48 -07:00
Evan Almloff bc063c58b7 throttle history updates to 100ms 2023-06-19 12:04:06 -05:00
Evan Almloff a9307e57e6 fix CI 2023-06-02 12:33:47 -05:00
Evan Almloff 07446386e6 fix external router examples 2023-06-01 14:10:33 -05:00
Evan Almloff 67992f7da9 create cfg factory 2023-06-01 13:13:50 -05:00
Evan Almloff 2f473f7c97 make serde optional 2023-06-01 11:03:44 -05:00
Evan Almloff ed0184685d fix doc links 2023-05-31 17:14:40 -05:00
Evan Almloff ece8f0fb22 general cleanup 2023-05-31 17:12:52 -05:00
Evan Almloff 09cabe4e8b update doc examples 2023-05-31 15:51:26 -05:00
Evan Almloff 35befa1784 update tests 2023-05-31 13:57:33 -05:00
Evan Almloff d3b21879fb create non generic wrappers for each route 2023-05-23 19:31:30 -05:00
Evan Almloff 3678fa1d3f create example 2023-05-23 19:09:24 -05:00
Evan Almloff 46017d5b7e fix outlets being updated out of order 2023-05-23 12:59:31 -05:00
Evan Almloff dd48c5a163 fix web history 2023-05-23 11:58:12 -05:00
Evan Almloff e4b8fbfafe Intigrate macro with router hooks and components 2023-05-22 16:42:32 -05:00
Evan Almloff 2aadeb8046 parse query strings 2023-05-12 20:55:38 -05:00
Adrian Wannenmacher 2f3bb4d6d5 make clippy happy 2023-04-12 19:48:27 +02:00
Adrian Wannenmacher 18c7f9c056 reimplement link click event handler prop 2023-04-11 20:38:39 +02:00
Adrian Wannenmacher f1cbfe0874 change router to use option again 2022-12-23 18:55:03 +01:00
Adrian Wannenmacher 96bd8b5565 fix outlet depth override 2022-12-15 21:59:18 +01:00
Adrian Wannenmacher 4677a00adc apply clippy suggestions 2022-12-13 16:19:40 +01:00
Adrian Wannenmacher 83f6984b0a change empty outlet to placeholder instead of div 2022-12-13 16:01:53 +01:00
Adrian Wannenmacher 8d52a6d208 document components 2022-12-13 12:18:54 +01:00
Adrian Wannenmacher 398043eba0 add history buttons 2022-12-13 09:10:51 +01:00
Adrian Wannenmacher 85ac35c198 update default external navigation failure component 2022-12-12 23:39:52 +01:00
Adrian Wannenmacher 780786c520 fix outlet panic 2022-12-09 03:33:12 +01:00
Adrian Wannenmacher ef76453422 fix release build 2022-12-09 01:42:30 +01:00
Adrian Wannenmacher 9f48cab9ad add comp() and default failure components 2022-12-09 01:14:54 +01:00
Adrian Wannenmacher 89ac4d51ab fix breaks from previous merge 2022-12-08 23:56:41 +01:00