redmine_planning icon indicating copy to clipboard operation
redmine_planning copied to clipboard

Problem with tooltop

Open alterdaemon opened this issue 10 years ago • 6 comments

I am not able to use the plugin (it's very frustrating) because the tooltop opens immediately, I am not even able to click on the isssue because of the tooltip.

What about setting a delay before the toolop open, like 500ms? (possibly configurable in the admin panel)

other, additional option could be possibility to close the tooltip with exit button or esc button.

alterdaemon avatar Jun 10 '14 11:06 alterdaemon

Great suggestion. It bugged me occasionally, too, but was able to work around it by moving the mouse a bit. The timeout is a great solution to this problem. I just updated the stable branch to implement this. No setting yet, I may consider adding that but I doubt that many people will want to change it.

I'll think about the close button in the tooltip, I haven't felt the need for that so far. I think that moving the mouse outside of the tooltip will work faster than aiming and clicking a button.

EgbertW avatar Jun 10 '14 11:06 EgbertW

all right, I'll try it out. thx for the effort, it certainly has it's potential.

alterdaemon avatar Jun 10 '14 11:06 alterdaemon

It seems that 500 ms it's too fast, maybe 800 ms would be better...

what's about option to show the tooltip always on fixed position, like above the toolbar with buttons - this kind of quick fix could make the plugin usable for the time being.

alterdaemon avatar Jun 10 '14 12:06 alterdaemon

Maybe related: the tooltip won't go away sometimes (debian, firefox 31, redmine 2.5.2, stable branch), many times just a random tooltip pops up (not the one I'm hovering over..), sometimes instead of the tooltips of the relation buttons the issues tooltips reappear

Recommendation: immediately remove the tooltip onMouseLeave (no delay)

RafiKueng avatar Aug 18 '14 23:08 RafiKueng

Not that I know, I did only report the annoying thing, but not try to fix it.. ;) I have no idea about ruby and redmine plugin development unfortunately..

... But if you know your way around from how to get the plugin from the checked out source code, I guess you could change the following values:

// file: assets/javascripts/planning.js
// around line 2381 (search for "PlanningIssue.prototype.closeTooltip")
PlanningIssue.prototype.closeTooltip = function (e)
{
    var tt = jQuery('.planning_tooltip');
    if (!tt.data('timeout'))
    {
        var to = setTimeout(function ()
        {
            tt.fadeOut( /*"fast", */ function ()   /* this might or might not work: 
            how fast the actual process of the fading out is happening */
            {
                jQuery(this).remove();
            });
        }, 1000); /* <--- this pretty sure is the timeout / delay value until the fadeout starts, 1000ms = 1sec, decrease it to 100 = 0.1 sec or even less*/
        tt.data('timeout', to);
    }
};

Beware, I'm a bit rusty in javascript atm, this might or might not work..

Cheers Rafael

On 18.12.2014 13:28, Jan Breuer wrote:

@RafiKueng https://github.com/RafiKueng is there a more detailed way on how to remove onMouseLevae delay? It is very frustrating and I'm not familiar with ruby.

— Reply to this email directly or view it on GitHub https://github.com/MadEgg/redmine_planning/issues/20#issuecomment-67479468.

RafiKueng avatar Dec 18 '14 15:12 RafiKueng

Thank you Rafael. I have made similar change, but it is now impossible to click on anything on tooltip. It needs to use completely different algorithm to show and hide tooltip then current one

  • hovering over issue - show tooltip after some time
  • fast move over issue - after some timeout, mouse is elsewhere, so don't show anything
  • move mouse from issue to tooltip - leave tooltip showing for unlimited time to allow click
  • move out from issue or its tooltip - immediately hide tooltip

Now I know where is the problem and it is just JavaScript (no ruby) so I think I can solve it by myself and lately propose it to the main line.

Cheers, Jan

j123b567 avatar Dec 18 '14 16:12 j123b567