Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(leptos_marco): enhancement of document generation #1768

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

fundon
Copy link
Contributor

@fundon fundon commented Sep 22, 2023

Use expand to show result

$ cd router
$ cargo expand ::components::redirect

before

    ///Props for the [`Redirect`] component.
    ///
    /// Redirects the user to a new URL, whether on the client side or on the server
    /// side. If rendered on the server, this sets a `302` status code and sets a `Location`
    /// header. If rendered in the browser, it uses client-side navigation to redirect.
    /// In either case, it resolves the route relative to the current route. (To use
    /// an absolute path, prefix it with `/`).
    /// **Note**: Support for server-side redirects is provided by the server framework
    /// integrations ([`leptos_actix`], [`leptos_axum`], and [`leptos_viz`]). If you’re not using one of those
    /// integrations, you should manually provide a way of redirecting on the server
    /// using [`provide_server_redirect`].
    /// [`leptos_actix`]: <https://docs.rs/leptos_actix/>
    /// [`leptos_axum`]: <https://docs.rs/leptos_axum/>
    /// [`leptos_viz`]: <https://docs.rs/leptos_viz/>
    ///# Required Props
    ///- **path**: [`P`]
    ///    -  The relative path to which the user should be redirected.
    ///# Optional Props
    ///- **options**: [`NavigateOptions`]
    ///    -  Navigation options to be used on the client side.
    #[builder(crate_module_path = ::leptos::typed_builder)]
    pub struct RedirectProps<P>

after

    /// Props for the [`Redirect`] component.
    ///
    /// Redirects the user to a new URL, whether on the client side or on the server
    /// side. If rendered on the server, this sets a `302` status code and sets a `Location`
    /// header. If rendered in the browser, it uses client-side navigation to redirect.
    /// In either case, it resolves the route relative to the current route. (To use
    /// an absolute path, prefix it with `/`).
    ///
    /// **Note**: Support for server-side redirects is provided by the server framework
    /// integrations ([`leptos_actix`], [`leptos_axum`], and [`leptos_viz`]). If you’re not using one of those
    /// integrations, you should manually provide a way of redirecting on the server
    /// using [`provide_server_redirect`].
    ///
    /// [`leptos_actix`]: <https://docs.rs/leptos_actix/>
    /// [`leptos_axum`]: <https://docs.rs/leptos_axum/>
    /// [`leptos_viz`]: <https://docs.rs/leptos_viz/>
    ///
    /// # Required Props
    /// - **path**: [`P`]
    ///    -  The relative path to which the user should be redirected.
    /// # Optional Props
    /// - **options**: [`NavigateOptions`]
    ///    -  Navigation options to be used on the client side.
    #[builder(crate_module_path = ::leptos::typed_builder)]
    pub struct RedirectProps<P>

@gbj
Copy link
Collaborator

gbj commented Sep 22, 2023

Beautiful! Thank you!

@gbj gbj merged commit 1d39248 into leptos-rs:main Sep 22, 2023
@fundon fundon deleted the fix-generate-docs-in-marco branch September 22, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants