Commit Graph
35 Commits
Author SHA1 Message Date
Evan Almloff 60a84956d1 restore lifetime checking for signals 2024-03-08 10:32:57 -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 94c0c2e5b9 remove some old manual implementations of helpers 2024-01-23 11:29:13 -06:00
Evan Almloff 08475af221 fix some unused items 2024-01-19 15:38:51 -06:00
Evan Almloff a0f1b1fc3e make the router and navigator Copy 2024-01-18 12:02:38 -06:00
Jonathan Kelley 14651a3573 Change context api to panic with nice error message 2024-01-15 18:02:58 -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 799be5e4e3 Merge branch 'master' into jk/global-window-fun 2024-01-04 10:22:10 -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
Jonathan Kelley dd4547d753 Feat: add global context functions
Add functions like window() and router() to
allow dynamically grabbing global contexts
without have to use the hook variants.

Deprecates the existing hook variants to
discourage folks from adding more noise
to their codebases.
2023-10-23 16:26:10 -04:00
StygmatesandEvan Almloff 1b977fdce9 Add query segment example and documentation (#1417)
* fix a few new clippy lints

* Add query segment example

* Add trait documentation

* Change core package to root package

The core package contains the virtual dom implementation ([here](https://github.com/DioxusLabs/dioxus/tree/master/packages/core)). Root package might be a more clear way to refer to the main directory

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2023-09-02 10:24:30 -05:00
Evan Almloff 4062e232d9 fix navigator 2023-08-01 10:21:16 -07: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 cc94711d62 rename generic navigator to navigator 2023-07-26 11:09:40 -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 1dac04ba8a fix with_initial_path 2023-07-14 08:22:31 -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 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 fe601e2a48 restore navigator 2023-06-01 09:45:31 -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 d3b21879fb create non generic wrappers for each route 2023-05-23 19:31:30 -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
Adrian Wannenmacher 00174d4f46 switch router to async-lock 2023-04-11 19:58:07 +02:00
Adrian Wannenmacher 89ac4d51ab fix breaks from previous merge 2022-12-08 23:56:41 +01:00
Adrian Wannenmacher 3b088be9a6 add use_router hook 2022-12-06 11:03:01 +01:00