npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@myriadicity/volto-navigation-dropdown

v0.3.10

Published

Volto website navigation dropdown menu

Downloads

9

Readme

volto-navigation-dropdown

Plone 6 Volto website navigation menubar with dropdown menus for nested folders.

Site navigation with automatically populated nested menus that open on hover. Entries on the currently visited path are highlighted, updating as you select new locations.

Available:

I posted some discussion about my reasons for developing this to the Plone community: Work On Plone 6 Navigation Menus - Development / Plone 6 UI (Volto).

Further work needed:

  • Does not respect Volto control panel Navigation depth setting.
    • It doesn't make sense to prevent navigation by menu beyond some arbitrary depth.
  • Screen boundaries are not handled well, so that entries in hierarchies that stretch to the edge of the screen could be unreachable and unselectable. This is a problem in the underlying React libraries but could be handled with edge detection and menu-opening changes. I haven't hit up against the limits in practical applications.
  • The styling is irregular and needs rationalizing.
    • In general the layout provisions are just expedient. They need to be thoroughly thought through and implemented by someone with ui design and styling expertise.
    • There's unintended and ragged indentation of entries for containers.
    • Excessive right justification for folder icons in entries whose titles are wrapped.
  • General parameterization is needed for layout parameters like menu minimum and maximum width.

Version 0.3 introduces a configurable menu layout change, governed by a setting variable:

  • config.settings.dropdownmenu.selfInContents true (the default) causes the first entry in the container's submenu to be for the container itself. Setting it to false inhibits that, so visitors would have to know that they can click on the container entry outside of the submenu to visit its page.

    The redundant inclusion of the container entry is default because some visitors might not realize that they can click on the superior entry. The redundant entry won't prevent anything, and anyone who is surprised by it will be able to easily figure it out and get used to it.

    To inhibit the redundant entry include:

    if (config.settings.dropdownmenu) {
      config.settings.dropdownmenu.selfInContents = false;
    }

    in your instance configuration.

Try volto-navigation-dropdown with Docker

  git clone https://github.com/kenmanheimer/volto-navigation-dropdown.git
  cd volto-navigation-dropdown
  make
  make start

Go to http://localhost:3000

Add volto-navigation-dropdown to your Volto project

  1. Make sure you have a Plone backend up-and-running at http://localhost:8080/Plone

    docker compose up backend
  2. Start Volto frontend

  • If you already have a volto project, just update package.json:

    "addons": [
        "@kenmanheimer/volto-navigation-dropdown"
    ],
    
    "dependencies": {
        "@kenmanheimer/volto-navigation-dropdown": "*"
    }
  • If not, create one:

    npm install -g yo @plone/generator-volto
    yo @plone/volto my-volto-project --canary --addon @kenmanheimer/volto-navigation-dropdown
    cd my-volto-project
  1. Install new add-ons and restart Volto:

    yarn
    yarn start
  2. Go to http://localhost:3000

  3. Happy editing!

How to contribute

See DEVELOP.md.

Copyright and license

See LICENSE for details.