Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use new combined logo svg #466

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Conversation

frankieroberto
Copy link
Collaborator

@frankieroberto frankieroberto commented Nov 27, 2023

The govuk-frontend v5.0.0-beta.2 contains some changes to the way the logo is rendered. The SVG image now contains both the crown and the GOV.UK text.

This means that for the govuk-component gem, we can no longer support custom text alongside the crown. Users will either have to use the default crown + GOV.UK text, or replace both. Luckily, it doesn’t seem that many people used this feature.

Consequences for the ruby implementation are that:

  • The logotype property of the header component has been dropped
  • The default_header_logotype config option has been dropped (previously this defaulted to GOV.UK)

I've also removed the crown boolean property of the header component, as this is no longer needed.

Users who need to specify an alternative logo can continue to use the custom_logo slot, but this will now need to contain both any logo and any text.

This PR also removes the X-UA-Compatible meta tag, as recommended by the beta.2 release notes.

@paulrobertlloyd
Copy link
Contributor

Mixed feelings about this, but I guess this is GOV.UK frontend, and if you want to change an organisation name and logo, you’ll likely want to make other changes to the header as well. And besides, you can still add your own HTML to the custom_logo slot.

@frankieroberto
Copy link
Collaborator Author

Mixed feelings about this, but I guess this is GOV.UK frontend, and if you want to change an organisation name and logo, you’ll likely want to make other changes to the header as well. And besides, you can still add your own HTML to the custom_logo slot.

@paulrobertlloyd Yes, we pretty much have to do this seeing as the GOV.UK logo text is now embedded in the SVG.

That said, I don't think we know of anyone using the crown with alternative text?

And if you're using an alternative logo + text you might well need some custom css too to adjust the vertical offset. (the govuk one uses -3px to align the logo to the product name).

Copy link
Member

@peteryates peteryates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@frankieroberto frankieroberto merged commit 5317863 into govuk-frontend-v5 Nov 27, 2023
7 checks passed
@frankieroberto frankieroberto deleted the update-logo branch November 27, 2023 17:34
@frankieroberto frankieroberto mentioned this pull request Nov 27, 2023
@colinrotherham
Copy link

Brill to see this 🙌

We added a tiny fix via aria-label as the SVG <title> wasn't announced in VoiceOver/Safari

If you can please add the fix to your template too, it all helps

@frankieroberto
Copy link
Collaborator Author

@colinrotherham thanks - fixed in #467

github-merge-queue bot pushed a commit that referenced this pull request Dec 8, 2023
Following the release of [GOV.UK Design System
v5.0](https://github.com/alphagov/govuk-design-system/milestone/16),
govuk-components v5.0.0 will be released. The headline features are:

* support for GOV.UK Design System v5.0
* inclusion of [the task list
component](alphagov/govuk-frontend#2261) #425
* all new link helpers #419
* update header to use new SVG which combines the crown and the GOV.UK
test #466

Release notes will be drafted in #469.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants