Skip to end of metadata
Go to start of metadata

NOTE

Icon

All infromation on this page is combined and expanded up on in its child page https://wiki.kuali.org/display/KULRICE/Breadcrumb+and+History+Design+-+Jerry

Breadcrumb rework

Full Control

Ability to define Location-based breadcrumbs

List of defined breadcrumbs PER PAGE

properties of breadcrumbOptions object for page (breadcrumbOptions property):

  • breadcrumbTitle - defaults to page title if not set - if neither exist breadcrumbTitle for page is not shown
  • condition - only set when using conditional breadcrumbs
  • showPageBreadcrumbLink - whether or not to show the page breadcrumbTitle (default true)
  • showViewBreadcrumbLink (this is the explicit for this page do you want to show a link to the View) - when true, show the view breadcrumbTitle if set, otherwise use the view title (else nothing).  When false, omit this breadcrumb from the trail.
  • pageBreadcrumbClickable - default false
  • viewBreadcrumbClickable - default true?
  • preViewBreadcrumbs (List<BreadcrumbObject>) - list of all breadcrumbs that must appear before the view breadcrumb
  • prePageBreadcrumbs (List<BreadcrumbObject>) - list of all breadcrumbs that must appear before the page breadcrumb
  • List<BreadcrumbOptions> conditionalBreadcrumbs - list of breadCrumbOptions that will apply when different conditions (defined in springEl are satisfied - scenario: I want to change the breadcrumb for this view/page based on a certain
  • property - ie, edit, class type etc)
  • breadcrumbListOverride (List<BreadcrumbObject>)- list of breadcrumbItems for the page, when explicitly set, ignore all other options (except conditional breadcrumbs) set and use this

View will have its own breadcrumbOptions and breadcrumbTitle
if breadcrumbOptions are not set at the page level, the page will inherit these options (other than the breadcrumbTitle property)

BreadcrumbObject

  • breadcrumbTitle - title of the link
  • breadcrumbLocation (optional, if none supplied not clickable) - href of the link

In usage:

Default (made up scenario - lets say I have a component library view, with an Input Field page. Maybe we have a Components page that is a page of the view that also has links to the components too in this scenario)

preViewBreadcrumbs [Home, Sample App] > View Breadcrumb > prePageBreadcrumbs [Components - link to components page] > Page Breadcrumb

Home > Sample App > Component Library > Components > Input Field

No preBreadcrumbs

View Breadcrumb > Page Breadcrumb

With only preViewBreadcrumbs (this is our current KRAD functionality with homeward path)
Home > Sample App > Component Library > Input Field

showPageBreadcrumbLink false
Home > Sample App > Component Library

showViewBreadcrumbLink false

Home > Sample App > Input Field

both false

Home > Sample App

Directly linked views

Suppose we have a view that ALWAYS appears before another maybe there is a way to retain this relationship by having an option
parentBreadcrumbView/page (its trail would become the current pages preViewBreadcrumb list)

This would take the breadcrumb information from the view being linked - needs to be aware of url/controller name.  If it needs to use a conditional breadcrumb from the parentBreadcrumbView/page this needs to be set too somehow.

Path-based (history based) breadcrumbs

Concrete scenario: inquiry trail

Need the ability to switch to path based breadcrumbs which retain the trail of breadcrumbs for views/pages you have visited.  This has to be pushed forward or retained somewhere in history and the title has to come from somewhere
(breadcrumbOptions for the page).

Propose that we move to a cookie based approach for this because the html parameter approach gets increasingly horrendous and hard to maintain.  We need a push pop system maintained in the js for this.  Difficult part is when to enter path-based breadcrumb retention and how to keep this unique across multiple windows - taking ideas.  A the very least views/pages will have the option to turn on path based breadcrumbs in the breadcrumbOptions to turn on toggle it (it will fallback to normal breadcrumbs if the next page visited does not have this option on though).

Lightbox will likely force this option on and ignore the breadcrumbOptions setting for it.

Breadcrumb generation

Breadcrumbs need to be closely tied to the page render and NOT the view render - updatable on page change, refreshed by page interactions etc.  Therefore they view should output a placeholder
and the page that will hold the content to apply into the placeholder when rendered (transferred by the js).  This will get around strange missing and omitted breadcrumb issues we were having.

Breadcrumbs also need to have a set length and style (I believe we have options for both of these currently)  When it exceeds max length put a ... that is clickable that will pop in the omitted content when clicked (common pattern, actually seen on here on confluence also).

  • No labels