Skip to main content
Topic: Stupidfish has teh sea lice (Read 7157 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Stupidfish has teh sea lice

Just trying out the click menu option. Seems a bit iffy.

1/ Sometimes the third levels wont open without a couple of clicks on the second level links. This doesn't seem to be consistent for all links.

2/ Too slow. Opening animation needs speeding up if using click option.

3/ Still has delay on mouseout. This is unnecessary with clickies, and is not good for usability since it would be expected that the click-anywhere-to-close would work instantly with click menus. Having it delayed is likely to confuse and annoy people.

4/ Not implemented on main menu. Working now.

5/ Opening user info droppy in Display.template sends you to profile. Needs a prevent default or whatever there.

Thought: given that Superfish really is far too bloated for a click menu system, perhaps it would be better to swap the js completely if selecting the click option (says the bloke who has already coded such js hey).

ETA: Minor css and/or js problem with second level visited links. They disappear on mouseout. :P
Last Edit: February 25, 2013, 07:17:45 pm by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #1

Quote from: Antechinus – 5/ Opening user info droppy in Display.template sends you to profile. Needs a prevent default or whatever there.
Why is this a problem? If I click on user dropdown, I expect the profile. What else, or perhaps I misunderstand?
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: Stupidfish has teh sea lice

Reply #2

Clicking on the username should open the droppy without sending you straight to profile. IOW, you should be able to just sit there reading the stuff in the droppy. Otherwise, the droppy is rather pointless. :)
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #3

Quote from: Antechinus – Thought: given that Superfish really is far too bloated for a click menu system, perhaps it would be better to swap the js completely if selecting the click option (says the bloke who has already coded such js hey).

Carrying on from this, I had an idea. A lot of the stuff that Superfish does isn't necessary any longer. For example, opening the menus by keyboard nav when using the basic hover setting (if that makes sense) isn't required if there is a separate click option (because that will be fully keyboard accessible anyway). Anyone who is using keyboard nav will want it fast, without the delays that are tied up with the hover system.

The only things that are really needed now for a hover menu are a mouseout delay to deal with possible tracking problems, and hoverIntent to stop the js opening menus too quickly.

A basic time delay on opening isn't enough, because that will just open the menus after you have gone past the tab on your way to somewhere else. When combined with mouseout delay, that can get messy. So, it will need to have hoverIntent.

Also, all the other crud that Superfish is filled with (breadcrumbs and arrows and IE6 stuff etc) is of no use to us either. I'm thinking it would make more sense to just write a basic hover menu code that does what is required, and only what is required, and have that swappable with a basic click menu code (already written and proven).

That way there would be no problems with (for example) mouseout delays for hover menus affecting closing of click menus.

I haven't looked at what is required for the basics of a hover menu system, but I'm willing to bet it is a lot smaller than the old Superfish. Given that the complete js for an infinite level click menu system with flawless behaviour is as follows, I can't see a hover system being a lot worse.

Code: [Select]
$("a.dropmenu_trigger, h6.dropmenu_trigger").live("click", function(e) {
                    e.preventDefault();
                    var $parent_li = $(this).closest("li")
                    $parent_li.find(">ul").toggle(200).end().find(">ul>li>ul").css("display","none").end().siblings().find(">ul").fadeOut(200);
                });

                // Click anywhere else to close.
                $(document).live("click", function(e) {
                    var $clicked = $(e.target);
                    if (! $clicked.parents().is("li.dropmenu"))
                        $("li.dropmenu>ul").css("display","none");
                });
Last Edit: February 25, 2013, 08:13:32 pm by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #4

Aha. Quick Google brings up this, which is basically what would be needed for a hover system: http://forum.jquery.com/topic/delay-retraction-of-jquery-menu-on-mouseout

Specifically, this post for the finished result: http://forum.jquery.com/topic/delay-retraction-of-jquery-menu-on-mouseout#14737000003447754

Code: [Select]
$(function() {
        config = {
            over: function(){$(this).children('ul').slideDown(300)},
            timeout: 700,
            out: function(){$(this).children('ul').slideUp(350)},
            sensitivity: 7, // default 7
            inteval:100  // default 100
        };
        $('#nav li ul').hide();
        $('#nav li').hoverIntent( config );
    });

Now, combine that with the click menu code already given, and then compare the two with the current state of Superfish. ;)
Last Edit: February 25, 2013, 08:11:24 pm by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #5

updated for 2,3,5 ... usual rule on a refresh


Re: Stupidfish has teh sea lice

Reply #6

Quote from: Antechinus – 1/ Sometimes the third levels wont open without a couple of clicks on the second level links. This doesn't seem to be consistent for all links.

2/ Too slow. Opening animation needs speeding up if using click option.

ETA: Minor css and/or js problem with second level visited links. They disappear on mouseout. :P
Still getting these, but the other stuff is sorted now.

The visited links display glitch seems intermittent too. Might just be trying to trigger the js too often when running through quick tests.

The second level links not functioning all the time doesn't appear to be affected by speed. It just happens, or it doesn't.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #7

Oh and it would be cool to have the click-anywhere-outside-menu-for-instant-close implemented on hover as well as click. Sometimes, despite all the js to try and control it, you can end up with one or more droppies opening accidentally, and hanging around for the mouseout delay period when you don't want them. Not critical, but an annoyance (and one of the reasons I've come to prefer click operation).

Really, the js should call the same click-anywhere-instant-close code for both hover and click settings (IMO). That would be best.

As soon as I get a break from recoding CEMB, I'll mess around with a combo code based on the stuff I posted earlier. The example hover drop code is more bloated than it needs to be. We could do everyting we need for both menu systems for about a dozen or so lines of js. Just call click or hover js based on profile options (4 or five lines each) and click-anywhere-to-close as universal.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #8

 Bump.
Is this still broken somewhere?
Bugs creator.
Features destroyer.
Template killer.

Re: Stupidfish has teh sea lice

Reply #9

The click to close still needs work. Ideally it should work anywhere. At the moment it only works inside the main wrapper div.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Stupidfish has teh sea lice

Reply #10

Oh, I found another report for the click:
http://www.elkarte.net/index.php?topic=407.0
so I'm considering that one "solved".
Bugs creator.
Features destroyer.
Template killer.