Commit Graph

23 Commits

Author SHA1 Message Date
Lee Dohm
640497081e 👕 2016-12-22 16:39:40 -08:00
Christopher Chedeau
a33ab44966 Add atom.tooltips.findTooltips(target)
Right now, it is not possible to hide a tooltip programatically. This is useful when we know better than the tooltip implementation that we did an action that should hide it.

After discussing with @lee-dohm, he suggested the findTooltips API that mimicks the KeyMapManager API.

Released under CC0
2016-12-23 00:01:42 +00:00
Nathan Sobo
44917fd568 Relocate/rephrase tooltip follow-through test
Also make sure it doesn't leave tooltips on the DOM, which causes
subsequent tests to fail
2016-11-01 14:13:44 -06:00
Christopher Chedeau
6f5e0ec48a Introduce follow through behavior for tooltips
Inside of Nuclide, we have multiple places where we have multiple icons close together that have a tooltip: the left toolbar, the bottom status bar, the debugger icons...

The current behavior is very frustrating as you've got to wait for the delay on every single one of them. But, we have a clear signal that the user wants a tooltip when s/he waits the time to see it and it's likely that moving the mouse over the next item quickly means that s/he wants to see it as well.

This pull request introduces the concept of follow through: if you have seen a tooltip, you're going to instantly see tooltip on the next element you mouse over within a short timer (300ms right now).

Test Plan:
Video before:
![](http://g.recordit.co/7PCg0hjohP.gif)

Video after:
![](http://g.recordit.co/9OnZCvy9oI.gif)

Released under CC0
2016-11-01 11:35:06 -07:00
Nathan Sobo
72c5fcad82 Eliminate selector option in tooltip manager API
No packages use it currently, and it's really complex to support so
we should kill it while we have the chance. When it comes time to
rewrite the tooltip code or add features, not worrying about selectors
will make it easier.
2016-10-10 14:08:51 -06:00
Nathan Sobo
e71e1f4ed1 Test custom class option 2016-10-10 14:08:51 -06:00
Nathan Sobo
718cc017e6 Hide click-triggered tooltips when clicking anywhere outside of tooltip
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Nathan Sobo
253917f007 Make tooltip accept an item option instead of tooltipElement
...and use view registry to resolve it to a view when showing the tooltip.

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Nathan Sobo
d9ee94031f Test disposal of manually-created tooltips
This also prevents subsequent tests from failing due to the manual
tooltip never being removed from document.body.
2016-03-04 13:40:16 -07:00
Johnston Jiaa
5dfd0c9102 Show tooltip immediately if the tooltip trigger is manual 2016-02-28 12:12:13 -05:00
case
8c5c795b35 Remove Duplicate Require Statements and Unify Syntax on ' 2016-01-15 14:35:28 -06:00
Nathan Sobo
5d919c89a1 Fix tooltip manager specs 2015-10-07 15:24:51 -05:00
Nathan Sobo
108b00dae0 Support jQuery wrappers being passed to tooltip manager
Not my favorite feature, but required for backward-compatibility.
2015-09-18 20:48:51 -06:00
Nathan Sobo
43de55b179 Fix delegated tooltips 2015-09-18 20:48:50 -06:00
Nathan Sobo
3c58e221a2 Add custom tooltip implementation that doesn’t depend on jQuery 2015-09-18 20:48:49 -06:00
Nathan Sobo
239da56130 Remove space-pen-extensions-spec 2015-09-18 20:48:49 -06:00
Nathan Sobo
fdfba54b43 Keep using jQuery for tooltips spec, not from atom-space-pen-extensions 2015-09-18 20:48:47 -06:00
Antonio Scandurra
8daca6a63b 🐧 💚 Humanize keystrokes in specs 2015-04-13 12:24:25 +02:00
Ben Ogle
37e6f03346 Fix tooltip command display when command has no keybinding 2014-12-02 16:31:38 -08:00
Nathan Sobo
78e61c3ff9 Remove ability to add tooltip with selector
It’s incompatible with returning a disposable because there’s no way
to distinguish multiple tooltips added to the body with different
selectors. Maybe someday.
2014-11-19 19:20:48 -07:00
Nathan Sobo
22c9a222c9 Return a Disposable from TooltipManager::add 2014-11-19 19:19:05 -07:00
Nathan Sobo
7bdf3b1719 Add support for keyBindingTarget to TooltipManager::add 2014-11-19 19:10:36 -07:00
Nathan Sobo
175d7811b4 Add TooltipManager
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-19 18:57:08 -07:00