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

avoid loading of lazy engines when generating linkto urls for routes #1945

Merged
merged 2 commits into from
May 29, 2024

Conversation

void-mAlex
Copy link
Collaborator

this came up when adding embroider scenarios to the ember-engines repo
there we test the same engine mounted at on different paths that can link between each other
this causes router_js implementation to generate url links from LinkTo component
in the current implementation the queryparam hydration for non visited routes would cause the lazy engines to load eagerly upon encountering a link to that lazy engine even if it was never visited

it also has the sideeffect of firing off initializers and instance initializers out of order from classic builds

this change implements the same query param handling logic that the ember-engines repo was doing in its own router extension

engines repo has tests to verify that the qp's are correctly maintained with this implementation

@void-mAlex void-mAlex added the bug Something isn't working label May 28, 2024
@void-mAlex
Copy link
Collaborator Author

tested and seems to pass the ember-engines tests, so it's a go from me

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :shipit:

@mansona mansona merged commit 9bb4fa0 into stable May 29, 2024
201 checks passed
@mansona mansona deleted the bugfix-router-handling-of-link-generation branch May 29, 2024 09:05
@github-actions github-actions bot mentioned this pull request May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants