Fix/router child dynamic prefix 0.7#5683
Open
rjharmon wants to merge 7 commits into
Open
Conversation
…Labs#5613) * fix(router): preserve query and hash segments on child routes * fix double encoding --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* widen ChildRouteMapping.format_route_as_root_route to Arc<dyn Fn> * add parse_route_via_chain helper for depth-2+ child router chains * add format_route_via_chain helper, symmetric to parse_route_via_chain, so format-side closure composition walks through multiple outer ChildRouteMapping<R> mappings at depth 3 or more * walk parent dynamic segments before delegating to child::from_str, preserving DioxusLabs#5613's raw_query and raw_hash forwarding * emit catch-all writes through a Display wrapper so composes with children that have only query or hash specs * drain catch-all without consuming the source segments iterator
* parsing: dynamic-prefix child round-trip via to_string, including a percent-encoded value subcase * parsing: dynamic-prefix child preserves the query channel * parsing: dynamic-prefix child preserves the hash channel * parsing: catch-all parent composes with query-only child * parsing: catch-all parent with typed element type round-trips * parsing: typed parent dynamic segment surfaces parent parse error * via_ssr: render under dynamic parent prefix * via_ssr: depth-2 chain preserves the deepest dynamic, and Link href captures parent dynamic at depth 2 * via_ssr: depth-3 chain preserves the deepest dynamic two hops down * via_ssr: depth-3 Link href captures both parent dynamics
…le derive
Given [#nest("/with/:param")]... #[end_nest] when a layout opened inside
the nest is still open; requires explicit #[end_layout] before a
following variant.
- #[end_layout]/#[end_nest] aren't needed unless there's another variant
- a following variant was generated with the nesting parameter expected,
producing a unbound-identifier E0425 (mysterious looking because it's
in generated code)
- gives a direct diagnostic instead of the mystery error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same as #5655 but on main branch
Includes a resync of the Cargo.lock that seems like it was misplaced during the path to 0.7.9