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

Add support for Component.$() as part of RFC386 #27

Merged
merged 4 commits into from
Jan 23, 2019

Conversation

simonihmig
Copy link
Contributor

No description provided.

index.js Outdated Show resolved Hide resolved
tests/integration/components/component-dot-dollar-test.js Outdated Show resolved Hide resolved
@simonihmig simonihmig changed the title [WIP] Add support for Component.$() as part of RFC386 Add support for Component.$() as part of RFC386 Jan 23, 2019
@simonihmig
Copy link
Contributor Author

@rwjblue this is ready for review now:

  • rebased
  • added assertions for not seeing deprecations. Thanks for your links, they were super helpful!
  • fixed the initial implementation, which wasn't actually working 🤦‍♂️ Uncovered by the deprecation not being silenced...
  • successfully tested on my local machine with the latest canary build. Made sure that non-silenced deprecations do make the build fail!
  • Updated the Travis config to not allow failing builds for canary (to test for no deprecations)

index.js Outdated Show resolved Hide resolved
vendor/jquery/component.dollar.js Outdated Show resolved Hide resolved
vendor/jquery/component.dollar.js Outdated Show resolved Hide resolved
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.

One minor nit, but looks good otherwise...

(function() {
Ember.Component.reopen({
$(sel) {
Ember.assert(
Copy link
Member

Choose a reason for hiding this comment

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

Now that I think about it, I think we do need to use:

import { assert } from '@ember/debug';

to get the proper stripping...

IMHO, this is safe (even when we move Ember to real modules, we would still handle this specially).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, good catch! Updated this.

Before:
image

After:
image

@rwjblue rwjblue merged commit c7e9bf4 into emberjs:master Jan 23, 2019
@rwjblue rwjblue added the enhancement New feature or request label Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants