From acd01ccf0ba1ece4d17ceef47e2611aa671527b7 Mon Sep 17 00:00:00 2001 From: Robbond-GDS Date: Mon, 17 Feb 2020 10:25:20 +0000 Subject: [PATCH] Updated Guidance and useage of breadcrumb component - Added instructions to specify behaviour on devices less than "tablet" width - Removed Collapse on Mobile, Highlight current page and last breadcrumb - Removed is_current_page flag - Removed all reference to request_path - Update change log --- CHANGELOG.md | 4 +++ .../components/_breadcrumbs.html.erb | 2 +- .../_step_by_step_nav_header.html.erb | 2 +- .../components/docs/breadcrumbs.yml | 29 ++++--------------- .../presenters/breadcrumbs.rb | 21 +++++++------- spec/components/breadcrumbs_spec.rb | 6 ++-- 6 files changed, 25 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c4efaf4c..815b10c3ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ useful summary for people upgrading their application, not a replication of the commit log. +## Unreleased + +* Mobile breadcrumb update guidance [PR #1298](https://github.com/alphagov/govuk_publishing_components/pull/1298) + ## 21.23.1 * Change attachment request format text to match Whitehall ([PR #1306](https://github.com/alphagov/govuk_publishing_components/pull/1306)) diff --git a/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb b/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb index 5ebbcff6db..cd9ae8f32d 100644 --- a/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +++ b/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb @@ -2,7 +2,7 @@ breadcrumbs ||= [] inverse ||= false invert_class = inverse ? "gem-c-breadcrumbs--inverse" : "" - breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs, request.path) + breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs) %>