-
Notifications
You must be signed in to change notification settings - Fork 27
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
SceneAppPage: preserving tabs #567
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this makes sense, tabs have urls. so if you want to change the default route/tab for page you will need to do that through some redirect.
I do not want to change the default route, I just try to change what will be rendered. So I just reused the old logic:
And now:
Hope that makes it more clear. |
that seems a bit wrong that different pages are rendered for the same url |
I agree that it is not good to have different pages render with the same url, so I tried what you suggested in the first answer. What do you think? |
@torkelo I am not sure if you looked at my other implementation but it would be really helpful if this could get resolved |
I have, the solution looks a bit complex / messy. Should be a simpler way to do this |
So after discovering #559, I thought it would be nice to have a option to preserve the tabs.
I came up with an idea.
Now the SceneAppPageRenderer always renders the first tab with two urls: the parent page url and the actual tab url.
But if we can remember the last selected tab, we can match the parent page url to any tab. This is what
_lastTabIndex
is for.And you also have an option to choose not preserving tabs with
preserveTab
property.Let me know what you think.