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

Fix inspector reset on client app's reset and destroy #765

Merged
merged 2 commits into from
Mar 7, 2018

Conversation

teddyzeenny
Copy link
Contributor

No description provided.

} else {
Adapter = instance.adapter;
}
register(instance, 'adapter:main', Adapter);
Copy link
Member

Choose a reason for hiding this comment

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

I know these manual registrations are not new, but I’m curious if we actually need them? I would think that putting a file at app/adapters/main.js (Or app/adapter.js) would “just work”?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I think these should be turned into services, though it's probably not as simple as putting a file in the correct place since the adapter is registered as a different class depending on the environment (Chrome/FF/bookmarklet/tests).

Copy link
Member

Choose a reason for hiding this comment

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

Are these adapters like normal adapters for ember-data in an application? If so, I would think they would be automatically registered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to merge the PR for now as we need this fix to release 3.0, we can look into refactoring this later.

/**
* We use the application's id instead of the owner's id so that we use the same inspector
* instance for the same application even if it was reset (owner changes on reset).
*
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for this write up, I was wondering why we needed it...

@teddyzeenny teddyzeenny merged commit 1aa8f03 into emberjs:master Mar 7, 2018
@teddyzeenny teddyzeenny deleted the reset-app branch March 7, 2018 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants