Code Monkey home page Code Monkey logo

Comments (3)

joeldbirch avatar joeldbirch commented on August 29, 2024

Can you suggest reasons why this would be worthwhile? Thanks.

from superfish.

OxyFuse avatar OxyFuse commented on August 29, 2024
  1. Users can go to the links less than one click/tap, i.e. going to the main parent link is just one tap or going to the 3rd level link is only 3 taps instead of 4 with the current implementation.

  2. The "arrow' would allow to open / close the submenus, for example on screens where it's small enough to click outside of the menus.

  3. Related to number 2 above, the "arrow" helps to open/close submenus for links that don't point to actual URLs (only href="#"). For example I have a list of shirts content and I have a "filter menu" such as:

    Color
        Black
        White
    

    All of it's links will point to "#". So when I tap "Color > White", I have a script that filters out White Shirts. But what happens is that the "Color" menu with its submenu opened is still there and blocking my content. If my screen is also small, i.e. 320 and the menu fill 100% its width, there's also no way now to close the submenu because multiple-tapping either the menus does nothing.

from superfish.

joeldbirch avatar joeldbirch commented on August 29, 2024

The arrow is not a large enough hit-area to be a suitable as a button. This feature would require additional button elements to be injected into the HTML in place of the existing arrows, which is something I want to steer away from with Superfish (even the arrow spans are about to be removed in favour of pseudo-elements) as that kind of DOM manipulation can be costly, performance-wise. I also need to limit the scope of what Superfish does so it doesn't become too hard to maintain. It began as a hover-menu only and now supports touch, which is already enough to keep me busy.

I think this should be a separate plugin. Years ago, I created an (unreleased) experimental plugin based on the behaviour of the old Digg menu, which behaved as you describe. Maybe I'll dig it out and see if it is worth uploading to GitHub.

from superfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.