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

Refactor router: remove owner presence checks #19458

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

sly7-7
Copy link
Contributor

@sly7-7 sly7-7 commented Mar 12, 2021

@rwjblue This follows the discussion we had about this.
That way, I think it removes a useless small mental overhead.
Also as it was a concern only in tests, I think it's better.

Feedback welcome :)

To go a little further, I was wondering if the setupRouter() thing could be removed too ?
Maybe it's by design, but usually it feels wrong to me when there is such a 'two steps construction' before we can actually interact with an instance.

@sly7-7
Copy link
Contributor Author

sly7-7 commented Mar 12, 2021

🤔 Unless I miss somehing, fhe failing browserstack tests do not seem related to this.

@rwjblue
Copy link
Member

rwjblue commented Mar 12, 2021

I was wondering if the setupRouter() thing could be removed too ?

Ya, this is intentional. There are a number of scenarios where we only want to do partial setup. For example, in rendering tests (for a normal ember-cli project) we might want to render <a href= content but not perform initial routing (since you aren't on any specific route in that scenario).

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up! I restarted CI (the failure in IE11 was unrelated).

Comment on lines -45 to -49
['@test can create a router without an owner'](assert) {
createRouter(undefined, { disableSetup: true, skipOwner: true });

assert.ok(true, 'no errors were thrown when creating without a container');
}
Copy link
Member

Choose a reason for hiding this comment

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

This test is very odd, 👍 on removing

@rwjblue
Copy link
Member

rwjblue commented Mar 12, 2021

@sly7-7 - I've made a merge conflict by landing #19405 first, would you mind resolving?

@rwjblue rwjblue merged commit d414901 into emberjs:master Mar 12, 2021
@rwjblue
Copy link
Member

rwjblue commented Mar 12, 2021

Thanks!

@sly7-7 sly7-7 deleted the remove-router-owner-check branch March 12, 2021 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants