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

Display parent of container when moving an object #4264

Closed
1 task done
matthias4217 opened this issue May 24, 2023 · 2 comments
Closed
1 task done

Display parent of container when moving an object #4264

matthias4217 opened this issue May 24, 2023 · 2 comments

Comments

@matthias4217
Copy link

Describe the feature you'd like

When moving a book into a shelf, there could be list of the current shelves the book belong to.

When moving a chapter or page, there is a searchable list of potential new parents for this object. Below each of them could be shown the parent of each parent.

For exemple, if chapter foo is contained in book bar, bar would be shown below foo, as it is already done in the search page.

Describe the benefits this would bring to existing BookStack users

Several pages, chapters or even books can have the same name. When navigating via their parent objects, there is no risk of confusing them, neither are there when doing a search as the parents are shown in the search result. However, there is no such indicator when moving an object, which may lead to some confusion.

Can the goal of this request already be achieved via other means?

Not really, except by having a unique name policy, where the name of an object couldn’t be used by any other. However, this would not fit all use cases.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

No response

@ssddanbrown
Copy link
Member

Thanks for the request @matthias4217.
I agree that we should show the parent book for chapters during move/copy operations.
However, Books do not belong to anything, or have a designated parent, like chapters/pages do so I wouldn't look to add parent context for books.

When navigating via their parent objects, there is no risk of confusing them

Technically, you could use the same name for a couple of books and chapters within them, confusing matters, but that will always be the case unless we start exposing system unique elements (IDs/slugs) which I'm not keep on displaying in such lists, and I think it'd generally be bad practice for an instance to have duplicate book names anyway.

@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Jun 7, 2023
ssddanbrown added a commit that referenced this issue Jun 10, 2023
Primarily intended to show parent book for chapters when moving/copying
pages, since the default parent selector interfaces, which used the
entity-selector search endpoint, would run this popular query when no
term was present as a default backup.

For #4264
@ssddanbrown
Copy link
Member

It turns out then when moving/copy a page, you would see the parent chapter book context but only when starting a search. By default it shows the most popular items, and that would not include the parent context.
Have now applied af0b4fa to show chapter parent book in these default lists.
Will be part of the next feature release.

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

No branches or pull requests

2 participants