Commit graph

70 commits

Author SHA1 Message Date
Jonathan Kelley
d9b84f9f8f
Disambiguate expressions in rsx by requiring curlies 2024-01-10 19:33:34 -08:00
ealmloff
08a679147f
Merge branch 'master' into liveview-history-default 2024-01-08 13:11:55 -06:00
Evan Almloff
0388a5c1f4 fix formatting 2024-01-04 19:21:06 -06:00
Evan Almloff
dccfba12d8 Merge branch 'master' into events-2 2024-01-04 19:02:00 -06:00
Jonathan Kelley
799be5e4e3
Merge branch 'master' into jk/global-window-fun 2024-01-04 10:22:10 -08:00
Evan Almloff
3feee729bc enabled the liveview history by default if the liveview feature is enabled in the router 2023-12-20 09:53:41 -06:00
ealmloff
5bb06b9719
Merge branch 'master' into events-2 2023-10-30 15:37:29 -05:00
Emil Boman
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
Evan Almloff
219c068283 Merge branch 'master' into events-2 2023-09-17 20:01:21 -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
baf36ab9ec Merge branch 'master' into events-2 2023-09-02 18:14:36 -05:00
Evan Almloff
df222c121a port examples to new events 2023-09-01 15:38:55 -05:00
Luca
37eb929d69
Explain features necessary for the pre_cache_static_routes function. (#1401) 2023-08-25 14:00:38 -05:00
Evan Almloff
947a153347 make navigator non-generic 2023-07-26 11:08:45 -07:00
Evan Almloff
0ebcb5f1be remove some logging 2023-07-26 10:28:49 -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
d19a33d59c fix reversed nests 2023-07-14 11:40:38 -07:00
Evan Almloff
0600a1bb49 simpilify static generation example 2023-06-27 16:06:44 -07:00
Evan Almloff
2da1f7faa7 allow nested routes 2023-06-26 16:08:53 -07:00
Evan Almloff
e83866b986 fix router examples 2023-06-24 13:44:22 -07:00
Evan Almloff
1704ee0068 router/fullstack/ssr intigration 2023-06-22 16:51:48 -07:00
Evan Almloff
28f875857e add timestamps to incremental rendering 2023-06-22 12:13:51 -07:00
Evan Almloff
3d41dd95c9 remove logging 2023-06-21 18:51:40 -07:00
Evan Almloff
3a690877d1 basic incremental renderer 2023-06-21 18:36:32 -07:00
Evan Almloff
bc99d9b01a fix formatting 2023-06-01 17:48:43 -05:00
Evan Almloff
b5a2f0d6cb finish router refrence 2023-06-01 17:31:13 -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
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
35befa1784 update tests 2023-05-31 13:57:33 -05:00
Evan Almloff
58b74c1155 create redirects 2023-05-31 12:11:11 -05:00
Evan Almloff
ecc99cd013 format example 2023-05-23 19:39:18 -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
b91fb39142 Merge branch 'upstream' into router-typesafe 2023-05-23 11:24:31 -05:00
Evan Almloff
ed4709101c fix duplicate example names 2023-05-02 09:38:58 -05:00
Adrian Wannenmacher
90c7e22f8b
actually make clippy happy 2023-04-12 20:19:01 +02:00
Adrian Wannenmacher
10c2abf0d8
implement scroll restoration 2022-12-15 20:09:53 +01:00
Adrian Wannenmacher
53d97755fd
add web history integration 2022-12-15 14:46:40 +01:00
Adrian Wannenmacher
e26e44fbc5
fix router example indentation 2022-12-14 18:10:36 +01:00
Adrian Wannenmacher
41bcc1e1f8
remove unneeded code from simple router example 2022-12-14 18:09:37 +01:00
Adrian Wannenmacher
d866f6782e
add a bit more content to the router example 2022-12-14 18:07:04 +01:00
Jonathan Kelley
5c20e651da fix: get rollover working 2022-12-13 14:44:47 -08:00
Jonathan Kelley
d4b6bb8a7b feat: fix the scope rollover bug 2022-12-12 18:31:30 -08:00
Adrian Wannenmacher
3d752e31ec
add a fixed route to example 2022-12-09 04:11:31 +01:00
Adrian Wannenmacher
a170aa76e0
add simple example 2022-12-09 01:15:04 +01:00
Jonathan Kelley
a252774226 chore: clean up docs with changes to templates 2022-12-07 13:39:22 -08:00