SchabanBo / qlevar_router

Manage you project Routes. Create nested routes. Simply navigation without context to your pages. Change only one sub widget in your page when navigating to new route.
MIT License
86 stars 22 forks source link

Parallel load of multiple subroutes #123

Closed Zekfad closed 1 year ago

Zekfad commented 1 year ago

Hello, I'm looking forward to use this routing library to create subroutes out of TabBarView children. The problem is that I need to be able to render at least 2 (or 3) routes at the same time, to allow horizontal scroll between them, is there any solution for this case in qlevar_router?

Concrete example: We have person's content page with 3 sorting options (votes, recent and views) and want to implement them via TabBarView, so user could swap between sort options preserving scroll state (meaning, that page must remain in stack or at least state must remain). We also want to be able to deeplink into any of this tabs.

SchabanBo commented 1 year ago

Hi @Zekfad,

What do you mean exactly with I need to be able to render at least 2 (or 3) routes at the same time? Do you want to show the three page at the same time, or just one page and the other two pages must just be in the stack with their state? Did you take a look at this example, where switching between pages will remain the state of each page?

Zekfad commented 1 year ago

Generally speaking all children of TabBarView creates single scrollable panel with children in it, so it's more likely that I need to render all tabs simultaneously, while only one of them are selected, so I could drag left-right and preview content of the tab without actually switching to it.

SchabanBo commented 1 year ago

@Zekfad Loading them all simultaneously will not be possible, you can render only what the user open and when he leaves the page state will be saved as it is when he returns to it, so he could pick up where he left.