-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
@@ -0,0 +1,10 @@ | |||
{{yield (hash | |||
popper=(hash |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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 : ''; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
…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
Fixes #20