-
Notifications
You must be signed in to change notification settings - Fork 366
Breadcrumbs
Breadcrumbs help to expose the hierarchy, not the particular clicks of a user. Its logic is more clear and most of it is only in one Mixin, not scattered throughout the code.
- this design follows Patternfly guidelines
- First, show the path from the navigation (E.g.: Compute > Infrastructure > Providers)
- Only breadcrumbs which lead somewhere should be clickable (last breadcrumb in the menu, etc.)
- The end of the breadcrumb string should represent the page a user is currently viewing
- When using breadcrumbs, be sure to include them on every page throughout the application.
- Exception: when content is shown on in a separate window without navigation (ex. reports), breadcrumbs are not required

-
Show the tree path in the breadcrumbs includes accordion header
Default

Detail

Detail action

Action

Tagging/Ownership/etc.
- Show the item breadcrumb only when there is only one item
One item

More items

Ancestry

- only Services. Services are missing hiearchy in the tree (because of performance).
Filters
- are not a part of the hiearchy

Default

- There could be different header on the landing page, should be included in the menu part (however two controllers are using dynamic headers: hosts, clusters.)
Detail

Detail Action/Action

Tagging/Ownership/etc.
- Show item breadcrumb only when there is only one item
One item

More items

A controller should include Breadcrumbs mixins:
include Mixins::BreadcrumbMixin
and then it has to define a new method:
def breadcrumbs_options
- which returns a hash with variables depended on the controller and its type:
{
:breadcrumbs => ...,
:include_record => ...,
:record_info => ...,
:record_title => ...,
}All controllers should contain:
{
:breadcrumbs => [
{ :title => ... , :url => ?, :key => ? }
]
}-
which sets a way in the main navigation menu:
-
:title- title of the breadcrumb, eg._('Cloud Providers)' -
:url- url, eg.controller_url
A breadcrumb can have also:
-
:key- using in tree views, key for the item, eg.root -
:action- additional action for using with the key, eg.accordion_select
All variables are optional.
:record_info => @ems
- some controllers use different variables to store information about a current item. Most of them are using
@record, which is a default variable. If not, then you have to manually set which variable is used.
:record_title => :key
- Method which stores a title of the variable set in the record_info (
:title = @ems.key)
Explorer controllers
:include_record => true
- when the title of the shown item is missing, e.g. in edit actions. Mostly used when trees do not contain all nodes.
Schema of breadcrumbs flow
