callumbwhyte / meganav

A flexible, draggable link picker for constructing site navigation menus in Umbraco
MIT License
35 stars 34 forks source link

Suggestions/ideas #62

Open patrickdemooij9 opened 2 years ago

patrickdemooij9 commented 2 years ago

Hi,

We've started using this package for one of our clients and I wanted to share some feedback about it. But as there is no discussion tab, I think this is probably the best place for it. You can always move it if that is easier!

I think the overall package is great. Love the way you can create multiple levels of navigation while still easily showing the layout. The suggestions/ideas are as follows:

Allow setting max depth level Most of our navigations only go x levels deep. The user could still put items in deeper levels, but they won't get rendered. Would be nice if we could restrict this. Should probably be a configuration field on the datatype itself, so developers can set it for each of their projects.

Add and create new It might be nice to have an "Add and create new" button that would instantly allow you to add another item. Especially in larger navigations, opening up each dialog takes a bit of time. If it could be easier then that would be great.

Allow setting max childs Some of our multiple level navigations have some restrictions on the amount of items that you can chose. I think the configuration option that is currently in place is only for the root right? Would be nice if we could also have that for each parent type.

Option to start collapsed Especially with bigger navigations, it would be nice if the whole navigation datatype could start collapsed.

Remove "Populate from tree" action I think it would also be nice for the option to remove the "Populate from tree" action. In some of the cases we have such a custom navigation so we already know that we won't use this feature for that website. Would be nice if we could turn it off in the appsettings/web.config

Allow showing generated items This is one that is probably a lot of work to do, but think it would still be good to list. The way that we usually do navigations is to iterate through the whole root and then through the first children (for dropdowns). This usually works fine except for the times when the user wants to have more control over it.

We could then use this package ofcourse, but then the user has to set up a lot more configuration instead of letting it be handled automatically. So, what I am suggesting is, is that developers are able to hook into the navigation generation of your data type and inject so called "locked" items in there. These are items that cannot be updated/changed/deleted. There are simply there to give a illustration to the user what his navigation would look like. This way, they can add extra links wherever they want with the benefits of the automated setup.

If there is anything that I can help you with, just let me know! Thanks for making the package

callumbwhyte commented 2 years ago

Hey @patrickdemooij9,

Thanks so much for your enthusiasm and ideas to make Meganav better! H5YR!

Max depth level / max children

In my opinion these are one and the same. It would be cool if it was possible to set a maximum number of child items per item type, whilst the existing "max items" feature at the root achieves the same. This allows super granular control at different levels of the nav; e.g. 5 top level items, one branch that's max 1 level deep, one that is max 3 levels for a different type of dropdown.

Add and create new

How do you imagine this working in the UI? Would it be another button in the dialog when creating? Perhaps this could be a keyboard shortcut instead? (we have been discussing ways to improve this over on #50)

Option to start collapsed

I'm not sure about collapsing by default, as for unfamiliar editors it may be unclear how to expand items. But I have been playing with the editor remembering which items were collapsed (in localstorage), so that state is retained between sessions. Would love your ideas on this.

Remove "Populate from tree" action

As mentioned in #56 I don't think this is implemented well currently. My proposed rework includes presenting users with a content picker here instead. Would you still want to turn this feature off if that were implemented?

Allow showing generated items

I believe this could be achieved with a custom view on an item type right now? You would need to fetch the content nodes you wish to render a preview for in JavaScript of course. If there's something in the logic that prevents this from being possible or I've misunderstood your request please let me know 😄!

Cheers, Callum

afabri73 commented 1 year ago

Hi callumbwhyte, It could be very useful to have: a separator type

a label type (simple text)

the Id (or Guid) of the selected node To retrieve the Content and its properties