Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate from tree - Select node #56

Open
eden-jh opened this issue Apr 8, 2022 · 2 comments
Open

Populate from tree - Select node #56

eden-jh opened this issue Apr 8, 2022 · 2 comments

Comments

@eden-jh
Copy link

eden-jh commented Apr 8, 2022

Let me know if you'd like me to split this up into separate issues. Somewhat related to #55

Problem

The Populate from tree option in the property actions only populates from direct children of the current content node (the one containing that property). It always adds all children of that node. This creates a problem if:

  • The current content node doesn't have children
  • You want to include deeper descendants, not just direct children
  • You just added a new branch of content to the tree (a new page with its own set of descendants) and you only want to add that new branch without having to re-add everything else

Proposed solution

  • Populate descendants and not just direct children (or let editors choose whether to include descendants, maybe with a setting for the level of depth?)
  • Allow editors to select a specific node to populate from, possibly with an option for whether or not the selected node should itself be added as a menu item (or alternately being able to populate items under a specific parent menu item, since either gives an option to avoid having to drag all the individually added child items)
@callumbwhyte
Copy link
Owner

Hey @eden-jh,

I've been thinking about this one a bit and agree the current "populate from tree" implementation isn't great...

As you point out, the most obvious flaws are:

  • It doesn't make sense when there are no children
  • It can result in duplicates, there is currently no check if an item already exists
  • There might be 1000's of children (it's unlikely a user will ever want more than say 10?)

I think the best and most "Umbraco way" of doing this is to present the user with a multiple content picker dialog, allowing them to choose which nodes (at any level) should be included. This gets around the need for configuration options etc too.

I feel sacrificing a tiny bit of the autonomy for better control is a good trade off. What do you think?

I've got a prototype working in the feature/populate-tree branch - will do some testing and get some opinions before looking at a release.

Cheers,
Callum

@eden-jh
Copy link
Author

eden-jh commented Jun 23, 2022

@callumbwhyte I think that could work, though the usability of the multiple-select will be important (like the ability to select all children of a specific node without manually clicking on each one).

I can't seem to find a feature/populate-tree branch. Am I looking in the wrong place, or has it not been pushed to Github yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants