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

Allow zeroElement parent to be configurable. #374

Merged
merged 1 commit into from Nov 7, 2019
Merged

Allow zeroElement parent to be configurable. #374

merged 1 commit into from Nov 7, 2019

Conversation

deanmarano
Copy link
Contributor

The body element is configurable, but the zeroElement gets placed on the body by default. This brings the zeroElement in line with the option to pass the body element.

Copy link
Member

@RobbieTheWagner RobbieTheWagner 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 the PR! I am in favor of this in general. We need to fix the test failures, and possibly support passing both selectors and HTMLElement instances to bodyElement. Thoughts on that?

@deanmarano
Copy link
Contributor Author

Definitely! I'll work on that. What would be some good tests to add?

@RobbieTheWagner
Copy link
Member

@deanmarano the main thing is we need to fix the existing tests. The build is currently failing. Adding additional tests for the functionality would be great too though.

@deanmarano
Copy link
Contributor Author

Build passing!

@deanmarano
Copy link
Contributor Author

deanmarano commented Nov 6, 2019

I realized that this is on the beta 2 version, and there hasn't been an official release of that. Should I also do this on the 1.4.6 version?

For context, I'm trying to get this into ember-tether to fix yapplabs/ember-tether#33. ember-tether is currently on the 1.4 version.

@RobbieTheWagner
Copy link
Member

@deanmarano the v2 betas have been officially released, check https://www.npmjs.com/package/tether/v/2.0.0-beta.4

v2 is all we are working on. We're not back porting fixes to v1. ember-tether will need to update to the v2 beta. I don't think there are any API changes, the breaking change is dropping IE 9 support, which Ember only supports IE11, I think, so we should be okay.

@@ -1,7 +1,6 @@
import { getClass, updateClasses } from './utils/classes';
import { defer } from './utils/deferred';
import { extend } from './utils/general';
import { getBounds } from './utils/bounds';
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend we keep the bounds utils as utils, and import them. I think the reason you are doing tether.bounds is for the this context, correct? I would pass this.bodyElement as a param, rather than making these utils need to be tied to tether. Does that make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup! will refactor.

Copy link
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@chuckcarpenter chuckcarpenter left a comment

Choose a reason for hiding this comment

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

@deanmarano
Copy link
Contributor Author

Could you do a release with this in it? Thanks! 🙏

@RobbieTheWagner
Copy link
Member

@deanmarano yeah, sure thing! I will cut a new beta

@deanmarano
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants