Commit Graph
207 Commits
Author SHA1 Message Date
Evan Almloff 94c0c2e5b9 remove some old manual implementations of helpers 2024-01-23 11:29:13 -06:00
Evan Almloff 636aeb4b90 integrate liveview with the launch builder 2024-01-22 11:56:34 -06:00
Jonathan Kelley 85c7c22619 Make router work on web 2024-01-19 16:36:40 -08:00
Jonathan Kelley 337c04557b get cargo check --all --examples --tests working! 2024-01-19 15:01:01 -08: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
Evan Almloff 0c532c5e0c work on restoring fullstack 2024-01-17 14:02:49 -06:00
Evan Almloff ecf17b351c finish fixing router 2024-01-16 16:24:44 -06:00
Evan Almloff adf67b4384 fix use_router_internal 2024-01-16 16:23:38 -06:00
Evan Almloff 341bc7f6a1 remove duplicate blog in the router example 2024-01-16 15:54:09 -06:00
Evan Almloff b58eb04278 Fix basic routers 2024-01-16 14:39:48 -06:00
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
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 d9b84f9f8f Disambiguate expressions in rsx by requiring curlies 2024-01-10 19:33:34 -08:00
Jonathan Kelley 399e20fd47 Merge pull request #1622 from ealmloff/cli-config-library
Pull out CLI configs into a separate library
2024-01-08 13:33:16 -08:00
Evan Almloff cfbec8240e make the web history a higher priority than the liveview history when compiling to wasm 2024-01-08 13:50:01 -06:00
Evan Almloff 23509ada9f Merge branch 'master' into cli-config-library 2024-01-08 13:24:16 -06:00
ealmloff 08a679147f Merge branch 'master' into liveview-history-default 2024-01-08 13:11:55 -06:00
Jonathan Kelley bc857bf339 Make clippy happy 2024-01-05 12:54:39 -08:00
Jonathan Kelley 8f70509bc3 Merge pull request #1680 from ealmloff/derive-query-parsing
Automatically derive standard query parsing in the router macro
2024-01-05 12:16:37 -08: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
Evan Almloff 8a44fe8d03 derive query parsing in the router macro 2023-12-01 15:31:45 -06:00
Evan Almloff cd48b3b7f9 allow base_path in the CLI 2023-11-15 08:23:12 -06:00
Evan Almloff 109e10e406 use a default base path for the web router from the config 2023-11-14 16:49:06 -06: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
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 3bf6d2d7cf add must use to several hooks 2023-10-14 12:08:54 -05:00
Leonard 2d1234c3d1 Include README and Dioxus logo in package docs (#1536)
* Include README in docs.rs and add Dioxus logo

* Update README.md
2023-10-10 10:52:48 -05:00
Jonathan Kelley 9c300ff266 Merge pull request #1324 from ealmloff/bool-attrs-ssr
Fix boolean attribute rendering in SSR
2023-09-16 12:01:52 -07:00
Jonathan Kelley 2f1fbf3ca4 Merge pull request #1406 from DioxusLabs/fix-router-query
Fix web query segments
2023-09-16 11:55:43 -07: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
Jonathan Kelley b68a1f57e0 Merge pull request #1436 from ealmloff/tracing 2023-09-13 10:41:23 -07:00
Leonard ae5dca8f43 Routable improvements (#1461)
* Fix `SegmentType::CatchAll` `Display`

* Rename `display_route_segements` to `display_route_segments` and add dots to docs

* Fix `Routeable::static_routes` and add more route retrieval methods

* Fix Clippy and extract duplication to function

* Return route strings instead of instances

* Remove some methods

* Clippy
2023-09-13 11:55:26 -05:00
Evan Almloff c55c17cb81 switch to tracing for logging 2023-09-06 17:47:33 -05:00
ealmloff c8127e164b Url decode routes (#1407)
* fix a few new clippy lints

* url decode routes

* fix catch all segments

* fix clippy
2023-09-06 12:56:43 -05: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 0554a5db5d Merge branch 'fix-new-clippy-lints' into fix-router-query 2023-08-30 09:03:41 -05:00
Evan Almloff 2d916ef628 fix web query segments 2023-08-30 08:21:24 -05:00
Evan Almloff 3ac2346e46 fix a few new clippy lints 2023-08-25 07:54:04 -05:00
Evan Almloff e43bdd815f fix test failures 2023-08-08 11:27:29 -07:00
Evan Almloff f7eba62a5d Merge branch 'master' into update-scroll-history-lazy 2023-08-01 10:47:04 -07:00
Evan Almloff 549db35de3 update scroll history lazily when you leave a page 2023-08-01 10:45:54 -07:00
Jonathan Kelley fe1ce3bbe7 Merge pull request #1273 from Demonthos/dedup-history
Deduplicate route history
2023-08-01 10:35:20 -07:00