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
Feature: Workspace breadcrumbs #1429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested out (with the corresponding backend API branch), overall it's working as expected.
A few of things I picked up on...
- Tiny cosmetic issue, the breadcrumb looks like it needs more padding-left.
- In Languages, the breadcrumb doesn't display the current language name, (for reference, I'm using Kenn's test database).
- When an entity is inside a folder, (e.g. DocumentType, DataType), the breadcrumb item for the folder has the
href
set as#
. Which when clicked will reload the browser on the root/#
(then shows the Content/Welcome dashboard).
I can see in the UUI Library where the #
is set. I'm unsure what we'd need to do to workaround this yet.
https://github.com/umbraco/Umbraco.UI/blob/v1.7.1/packages/uui-breadcrumbs/lib/uui-breadcrumb-item.element.ts#L26
Apart from that, it's working well, great work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-tested, all working as expected! Super Tak! 🎉
Just adding a little question here as it seems that this might be something that is related to this issue: #1011 Maybe we can make sure that the underlying infrastructure can facilitate for both? |
Hi @enkelmedia Thanks for mentioning the related issue 👍
|
Thanks for the clarification @madsrasmussen! 🚀 |
Important
Merges together with PR: umbraco/Umbraco-CMS#15746
This PR introduces a breadcrumb for workspaces opened from a menu item/tree item.
The general concept is that a workspace doesn't know anything about its structure and where the data precisely lives in a menu. It is only the menu that knows the structure. The menu provides a new MenuStructureWorkspaceContext that collects all information about the structure of the current workspace. It can be a relatively simple structure (collections) or more complex (trees). The menu structure context is provided as part of the workspace context and therefore available for anyone that needs this information. We use the information ourselves to set up the breadcrumbs.
The PR implements two types of menu structures/breadcrumbs, one for variant items and one for items with a name.
The breadcrumb will show the path to the currently opened entity and observe the name. That means that the current item in the breadcrumb will update when the name changes.
The variant breadcrumb shows the name matching the active variant in the workspace. If a variant doesn't have a name, it will fall back to the default application language (like a document tree item).
The breadcrumbs are currently implemented for:
Example of breadcrumb in Data Types:
Known issues:
*
uui-breadcrumb-item
should display text instead of a link if a href attribute is not added. I have added a task for this.Caution
Breaking Changes:
UmbTreeRepository
interface requires an implementation of arequestTreeItemAncestors
method.UmbTreeDataSource
interface requires an implementation of agetAncestorsOf
method.