EMBL Breadcrumbs lookup utility

This requires and builds atop the vf-breadcrumbs and embl-content-meta-properties components for EMBL pages.

github location npm version

Usage

This component reads meta properties and then performs a lookup to the EMBL contentHub. Returned are appropriate primary and secondary breadcrumbs.

Notes:

  • If a non-primary breadcrumb value is "notSet", a value will be inferred from the primary breadcrumb's respective who, what or where
  • Matching is performed on internal names first, display names second.
    • UUID matching is still to be implemented
  • If no URL for a term is found a search link will be generated
  • If no primary facet is provided, no breadcrumbs will be generated

Variants

HTML
<nav class="vf-breadcrumbs embl-breadcrumbs-lookup" aria-label="Breadcrumb" data-embl-js-breadcrumbs-lookup>
  <div class="vf-list vf-list--inline | vf-breadcrumbs__list | embl-breadcrumbs-lookup--ghosting"></div>
</nav>
              
HTML
<!-- Content descriptors -->
<meta name="embl:who" content=""> <!-- the people, groups and teams involved -->
<meta name="embl:where" content="EMBL Heidelberg"> <!-- at which EMBL sites the content applies -->
<meta name="embl:what" content="Cuylen Group"> <!-- the activities covered -->
<meta name="embl:active" content="what"> <!-- which of the who/what/where is active -->

<!-- Content role -->
<meta name="embl:utility" content="-8"> <!-- if content is task and work based or if is meant to inspire -->
<meta name="embl:reach" content="-5"> <!-- if content is externally (public) or internally focused (those that work at EMBL) -->

<!-- Page infromation -->
<meta name="embl:maintainer" content=""> <!-- the contact person or group responsible for the page -->
<meta name="embl:last-review" content="NaN"> <!-- the last time the page was reviewed or updated -->
<meta name="embl:review-cycle" content=""> <!-- how long in days before the page should be checked -->
<meta name="embl:expiry" content=""> <!-- if there is a fixed point in time when the page is no longer relevant -->

<nav class="vf-breadcrumbs embl-breadcrumbs-lookup" aria-label="Breadcrumb" data-embl-js-breadcrumbs-lookup>
  <div class="vf-list vf-list--inline | vf-breadcrumbs__list | embl-breadcrumbs-lookup--ghosting"></div>
</nav>
              

Examples

Changelog

Changelog

1.2.0

  • Improve breadcrumb behaviour to correctly show the active page.
  • More robust detection of current url by trying with and without a trailing /
  • If the active facet (breadcrumb) is the current url, don't link it
  • https://github.com/visual-framework/vf-core/issues/1604

1.1.1

  • Fix: Breadcrumbs repeat if init method is repeatedly called on same page.
  • https://github.com/visual-framework/vf-core/issues/1593

1.1.0

  • Remove diacritics for name processing into people page URLs.
  • Correct "breadcumbs" typos.
  • Finish conversion of emblGetTaxonomy into a standalone function and export it.

1.0.4

  • Improve JS module import support.
  • https://github.com/visual-framework/vf-core/pull/1476/

1.0.3

  • changes any set- style functions to cleaner version

1.0.2

  • adds aria role detection of current page

1.0.1

  • JS linting

1.0.0

  • prevent recursive breadcrumb lookup: it can occur for the EMBL taxonomy to have recursive parents, this present direct recursion

1.0.0-rc.1

  • embl-breadcrumbs-lookup inference uses wrong label
  • https://github.com/visual-framework/vf-core/pull/867

1.0.0-beta.5

  • Njk template was loading demo embl-content-meta-properties that were only needed for an example
  • https://github.com/visual-framework/vf-core/pull/838

1.0.0-beta.3

  • Better handles non-entries for parent terms
  • Better handling of non-entry "none"
  • Handles when breadcrumb container is present but no primary term is set
  • Cleaner URL generation
  • Matches a terms internal names or display names as a last resort

1.0.0-beta.2

  • Prefers "EMBL.org profile" matches to taxonomy entries
  • If no related breadcrumbs are found, the label will be hidden
  • Do not display "notSet" as a breadcrumb
  • If a non-primairy breadcrumb value is "notSet", a value will be inferred from the primairy breadcrumb's respective who, what or where
  • If no match is found a search is performed
  • Handle non-26 character names (Spaßß => spass) for URLs
  • If no match is found generate a "smart URL" for people
  • Switches to use the production contentHub

1.0.0-alpha.3 (2019-07-25)

  • don't insert a root term as a crumb (003d88c)
  • embl-grid-and-breadcrumbs (68676a6)
  • only insert crumb if it respects the original term context of who/what/where (2159778)

Assets



File system location: components/embl-breadcrumbs-lookup

Find an issue on this page? Propose a change or discuss it.