-
Notifications
You must be signed in to change notification settings - Fork 141
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
ember-popovers #92
ember-popovers #92
Conversation
even with the "initial commit" commit the tests are failing... https://travis-ci.org/sir-dunxalot/ember-tooltips/jobs/156037676 |
@@ -0,0 +1,3 @@ | |||
{{yield (hash | |||
hide=(action "hide") |
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.
minor: indent
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 is a github display issue. It is correctly indented in my IDE
"ember-cli-sass": "5.3.1" | ||
"ember-cli-htmlbars": "^1.1.0", | ||
"ember-cli-sass": "5.3.1", | ||
"ember-hash-helper-polyfill": "^0.1.1" |
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.
we need ember-hash-helper-polyfill
and ember-cli-htmlbars
because of the template that passes the hide
closure action to the yield via the hash
helper
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.
ember-hash-helper-polyfill is only needed till Ember 2.3
Hey @a15n - any idea why the tests are failing on the initial commit? Could it be as simple as merging with |
@sir-dunxalot I made sure to use the most up to date version before I started. I'm checking my
|
Hmm, ok. I think either you or I will have to work on this branch and get it passing before merging in. With a PR this big I'd rather not merge onto master and then get things to pass (incase others are pulling down master into their projects directly). I could pull down from your branch if preferred. Alternatively, we could reissue this PR to a Let me know how you would like to proceed. I know you've done tons of work on this so I don't want to have you to put in more work especially if it's unrelated to this feature. |
Agreed. If you were able to pull down this branch and investigate that would be great. There are popover tests failing right now but I am in the process of fixing those. Thanks |
@sir-dunxalot regarding class name structure I have |
@@ -40,25 +40,28 @@ export default TooltipAndPopoverComponent.extend({ | |||
|
|||
} else if (_showOn === 'click') { | |||
|
|||
$target.on(_showOn, (event) => { | |||
$(document).on('click', (event) => { |
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.
Lets make sure you unsubscribe from all events, but specially this one.
return; | ||
} | ||
|
||
if (_showOn === 'mouseenter') { |
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.
I think I'll be able to simplify the _showOn == 'mouseenter'
case now that I only use _isMouseInside for that approach.
Yes the code portion is all set now. Things have gotten rather busy for me at work so I don't think I'll be able to help with updating the resources. We are good to wait till this weekend. Thanks! |
Ok, great. I'll wait to merge this in until I have the documentation in place. I don't mind a 10-minute overlap of merging without the docs updated so I'll do it on the fly. I'll also do a QA run through - will keep you updated. |
Well done, gents! Looking forward to trying this out. |
@sir-dunxalot you'll notice in this latest PR that I have improved the jQuery checks to determine if an element is inside the popover or elsewhere. I tested out the new popovers in our code base and learned that sometimes all of the tethers are contained within a div at the bottom, rather than within the target. For this reason the following code didn't work and this fix was necessary..
|
hideDelay: '250', | ||
|
||
layout, | ||
classNames: ['ember-popover'], |
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.
nit/personal preference: put classNames
at top (above hideDelay
)
@sir-dunxalot, @MiguelMadero you'll notice in the last commit I've triggered every |
How's this going guys? Anxious to give it a shot! |
@sir-dunxalot is there anything I can do to help this land? |
Hey Andrew, it's honestly just documentation in the README. I've worked 14 days straight and still haven't gotten to it. My apologies. Let me know if you're able to push this over the line. |
@sir-dunxalot I'm glad I was able to work on this some more. I added backwards compatibility for I have also updated the readme to include popovers. I believe this is ready to merge, BUT it still has flaky tests in |
@sir-dunxalot I've addressed some of the failing tests here. #97 Let me know if I can help in any other way to land this. |
Andrew, I'm finally getting around to this. This has been an immense effort - great work, truly. #97 is now on master. It looks like that has caused merge conflicts. If we can fix those so that there's only the one test failure (the |
@sir-dunxalot I have merged with the newest master, resolved conflicts, and all tests are passing except the |
Alright, I'm merging and pulling down now. I will try and get those last two test passing before releasing. |
I've got four tests failing locally with the following error:
I'm attempting to fix these before fixing the remaining two |
ember-popovers
This PR addresses the need for a popover expressed here (#77) and implied here (#51)
popover-on-element
andpopover-on-component
components which extend their tooltip counterpartshideDelay
param which defines the milliseconds a user may hover outside of the popover before it hides. This is necessary because popovers can be spaced N pixels away from their target elementtests/integration/components/popover/
directoryhide
action for use within the popover's block (ie clicking an interior close button)Exhaustive list of changes made to tooltip-on-element
git mv tooltip-on-element.js tooltip-and-popover.js
(c5da8b7)classPrefix
instead of one-off strings. Change classPrefix totooltip-and-popover
(9dc2fc7)classPrefix: 'ember-tooltip-or-popover',
(1e9cef2 and 5045c4c)tooltipIsVisible
in favor ofisShown
(110c0fa)onTooltipShow
in favor ofonShow
, etc (5993997)tooltipCounterId
withtooltipOrPopoverCounterId
(26fcdd4)Popover event="click"
Popover event="hover" (not suitable for mobile)
hideDelay
milliseconds (default 250)hideDelay
Popover focus (available when event="focus", "click", or "hover"
Popover hide API
hide
actionTODO (Blocking)
isVisible
{{action popover.hide}}
works and why the package.json changes were neededevent='focus'
handlingtooltipIsVisible
with something more generic (not isVisible, maybe isShown or visible)