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

loading subroute in conjunction with equilevel index route produce incorrect entries in the browser history #282

Open
azhiv opened this issue Jan 22, 2024 · 1 comment
Labels

Comments

@azhiv
Copy link

azhiv commented Jan 22, 2024

Checkout this routes structure:
Screenshot 2024-01-22 at 17 32 28

When I navigate from the root app route down to Project down to Store, then back up to Project and finally find myself on the app route again, I would expect this full path reflected in the browser history. However, this is what I see there:

Screenshot 2024-01-22 at 17 35 03

Here's how the picture starts looking different (and correct) when I delete the loading.hbs subroute highlighted green in the first screenshot:
Screenshot 2024-01-22 at 17 37 39

I can also confirm that deleting the index subroute (without touching the loading one) also produces the correct history:
Screenshot 2024-01-22 at 17 43 39

So to conclude, having both index and loading subroutes make the framework generate incorrect entries in the browser history while removing either of them makes things look correct. Here's the reproduction repo.

@azhiv azhiv changed the title Loading subroute in conjunction with equilevel index route produce incorrect entries in the browser history loading subroute in conjunction with equilevel index route produce incorrect entries in the browser history Jan 29, 2024
@sergekoval
Copy link

noticed the same behavior as well. We've been trying to replace our custom page title implementation with this addon to have more clean solution but unfortunately it creates incorrect history in browser.

Original implementation:

image

Using this addon:

image

Basically as mentioned before, loading transitions reset the tab title with default app name which registers in the history instead of actual following sub route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants