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

Pass in style attribute to style attachment #136

Merged
merged 1 commit into from
May 17, 2018

Conversation

jrjohnson
Copy link
Contributor

Allows passing in a safe string as a style which will be applied to the
tooltip or attachment element.

Fixes #135

@jrjohnson jrjohnson mentioned this pull request May 17, 2018
Copy link
Collaborator

@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.

Thanks @jrjohnson! This is looking great, just a few minor comments.

@@ -39,6 +40,7 @@ export default Component.extend({
}
}),
class: DEFAULTS.class,
style: DEFAULTS.style,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Bikeshed: Let's keep these alphabetized by moving this to the bottom of this property list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem, done.

_style: computed('style', '_transitionDuration', function () {
const style = this.get('style');
const transitionDuration = this.get('_transitionDuration');
assert(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't ember normally warn when we pass a style that wasn't marked with htmlSafe? If so, I think we should follow suit over asserting.

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 call. I thought it was an error, but it is, in fact, just a warning. Fixed

@@ -2,6 +2,7 @@ export default {
animation: 'fill',
arrow: false,
class: null,
style: null,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's alphabetize this, too.

Allows passing in a safe string as a style which will be applied to the
tooltip or attachment element.
@kybishop kybishop merged commit c6cc99f into tylerturdenpants:master May 17, 2018
@jrjohnson jrjohnson deleted the 135-dynamic-styles branch May 17, 2018 22:41
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