Skip to content

Commit

Permalink
Use component wrapper on contextual footer
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGDS committed Jan 17, 2025
1 parent f8fac6c commit 2eccb7a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
useful summary for people upgrading their application, not a replication
of the commit log.

## Unreleased

* Use component wrapper on contextual footer ([PR #4562](https://github.com/alphagov/govuk_publishing_components/pull/4562))

## 49.1.0

* Use component wrapper on contextual breadcrumbs ([PR #4560](https://github.com/alphagov/govuk_publishing_components/pull/4560))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<% navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request) %>
<% disable_ga4 ||= false %>
<%
navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request)
disable_ga4 ||= false

component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
component_helper.add_class("gem-c-contextual-footer govuk-!-display-none-print")
%>

<% unless navigation.content_tagged_to_current_step_by_step? %>
<div class="gem-c-contextual-footer govuk-!-display-none-print">
<%= tag.div(**component_helper.all_attributes) do %>
<%# Rendering related navigation because no step by step list %>
<%= render 'govuk_publishing_components/components/related_navigation',
content_item: content_item,
disable_ga4: disable_ga4,
context: :footer %>
</div>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ body: |
[contextual_breadcrumbs]: /component-guide/contextual_breadcrumbs
accessibility_criteria: |
Components called by this component must be accessible
uses_component_wrapper_helper: true
examples:
default:
description: Displays contacts, external links, statistical datasets, topical events, topics and world locations.
Expand Down

0 comments on commit 2eccb7a

Please sign in to comment.