Skip to content

Commit

Permalink
Make Product name customisable
Browse files Browse the repository at this point in the history
This is to allow Signon to be called "Signon" again. We'll still use
"Publishing" as the default.

Follow up to
#557.

https://trello.com/c/05wMNlxg
  • Loading branch information
tijmenb committed Oct 4, 2018
1 parent 5514d0d commit b79edce
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,9 @@
## Unreleased

* Fix toggle behaviour in related navigation and taxonomy navigation when JS disabled (PR #551)
* Make "GOV.UK Publishing" the default product name (PR #557 #561)
* Change the colour of production to red (PR #557)
* Add environment tag in the header for all environments (PR #557)

## 11.1.0

Expand Down
@@ -1,4 +1,5 @@
<%
product_name ||= "Publishing"
navigation_items ||= []
%>
<header class="gem-c-layout-header govuk-header gem-c-layout-header--<%= environment %>" role="banner" data-module="header">
Expand All @@ -19,7 +20,7 @@
</span>

<span class="govuk-header__product-name">
Publishing
<%= product_name %>
</span>

<span class="gem-c-environment-tag govuk-tag gem-c-environment-tag--<%= environment %>">
Expand Down
Expand Up @@ -19,6 +19,10 @@ examples:
development_environment:
data:
environment: development
with_product_name:
data:
environment: production
product_name: Product
with_navigation:
data:
environment: production
Expand Down
6 changes: 6 additions & 0 deletions spec/components/layout_header_spec.rb
Expand Up @@ -17,6 +17,12 @@ def component_name
assert_select ".govuk-header.gem-c-layout-header--staging"
end

it "renders the product name" do
render_component(environment: "staging", product_name: "Product name")

assert_select ".govuk-header__product-name", text: "Product name"
end

it "renders the header with navigation items" do
navigation_items = [
{ text: "Foo", href: "/foo", active: true },
Expand Down

0 comments on commit b79edce

Please sign in to comment.