Skip to content

Navigator component and the client-side router in side editor #37355

@ciampo

Description

@ciampo

In #37223 (comment), @kevin940726 wrote:

Not sure if you're aware of this, but we've recently done other approach to try to implement a custom client side router in the side editor. See #36488 for the basic implementation and #37314 for focus management and some refactor.

The approach we take there is to make it browser-first, and use the history package to manage the routing for most parts. We can easily switch back to in-memory router by changing createBrowserHistory to createMemoryHistory.

Even though we currently don't have the need to implement a real browser-based client side router, I think it's still good to take it into account in case we ever have the requirement to do so.

Maybe we could combine the two into this component and learn from each other?

Not sure if you're aware of this, but we've recently done other approach to try to implement a custom client side router in the side editor. See #36488 for the basic implementation and #37314 for focus management and some refactor.

And in #37223 (comment) @youknowriad answered:

@kevin940726 yeah browser navigation has actually been part of the initial implementation of the Navigator component but we felt that it's not something that is needed in all use-cases and not something that should be backed into a UI component, for this reason we decided to built a generic UI component and still have an API that allow syncing with browser history if needed for non-mobile/web apps like edit-site. The original prototype here #32923 has a mechanism to sync navigation state with history that could serve as inspiration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions