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(major): ES6 classes, legacy build support, linting, only yield actions #28

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

kybishop
Copy link
Owner

Fixes #20

@@ -0,0 +1,10 @@
{{yield (hash
popper=(hash
Copy link
Owner Author

Choose a reason for hiding this comment

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

@pzuraq you open to dropping the nested popper hash once able? I'm down to keep it in for now, but would love to see the yielded hash simplified in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah, definitely agree that it would be ideal to drop these. We can even drop them now if you're ok with the breaking changes (there are others like the class one) and only have them for the 1.11 version

Copy link
Owner Author

@kybishop kybishop left a comment

Choose a reason for hiding this comment

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

Pushed a single commit to fix the dummy app to use class over popperClass. A few minor comments, but otherwise looks good. Feel free to merge after addressed


// ================== PRIVATE IMPLEMENTATION DETAILS ==================

_addPopper(target, element, options) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

as discussed on slack, would love to see the coupling torched

let popperContainer;

if (renderInPlace) {
popperContainer = this.element.parentNode;
Copy link
Owner Author

Choose a reason for hiding this comment

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

This borks fastboot since it doesn't have access to this.element. Previously we did this.

As long as we have a similar check for self.document and bail early, we should be good.

Copy link
Owner Author

Choose a reason for hiding this comment

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

If you want a way to sanity check, the dummy app is set up to use fastboot. In the long run, we should probably add some tests for this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah, for sure, makes sense. I figured we could get a two-for-one by having renderInPlace to the document check for us as well, but I guess not. Will add an additional check.

@kybishop kybishop changed the title [WIP] feat(legacy support) support ember >= 2.4 feat(legacy support) support ember >= 1.13 (and special-case support for 1.11) Jul 20, 2017
Copy link
Owner Author

@kybishop kybishop left a comment

Choose a reason for hiding this comment

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

one last comment, I'd also love to get this whole kaboodle rebased into something akin to your initial commit:

refactor(major): ES6 classes, legacy build support, linting, only yield actions

Edit message as you see fit

let popperContainer;

if (renderInPlace) {
popperContainer = this.element ? this.element.parentNode : '';
Copy link
Owner Author

Choose a reason for hiding this comment

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

This still goes 💥 in fastboot (all access to this.element is denied). self.document should do the trick.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah, for sure. Was thinking it would look more consistent, but yeah that's probably safer

@kybishop kybishop changed the title feat(legacy support) support ember >= 1.13 (and special-case support for 1.11) refactor(major): ES6 classes, legacy build support, linting, yield pure actions Jul 20, 2017
@kybishop kybishop changed the title refactor(major): ES6 classes, legacy build support, linting, yield pure actions refactor(major): ES6 classes, legacy build support, linting, only yield actions Jul 20, 2017
…re actions

Changes everything to ES6 classes, adds legacy build support all the way
back to Ember 1.11, adds stricter linting rules, yields only actions
@kybishop kybishop merged commit b073df5 into master Jul 20, 2017
@kybishop kybishop deleted the legacy-support branch August 26, 2017 08:21
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.

2 participants