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

BREAKING: Remove title component #4653

Merged
merged 1 commit into from
Feb 26, 2025
Merged

BREAKING: Remove title component #4653

merged 1 commit into from
Feb 26, 2025

Conversation

AshGDS
Copy link
Contributor

@AshGDS AshGDS commented Feb 25, 2025

What / Why

  • Removes the title component, as we are now using the heading component to provide titles for pages.
  • Trello card: https://trello.com/c/CZLC1zl1/490-remove-title-component
  • Breaking as it removes a component. It seems the component is still used on govuk-chat and DGU, but govuk-chat is being looked at, and DGU is already very far behind on the gem.

Visual Changes

The inverse header component examples have changed as they now use the heading component which has slightly different spacing - I did use the padding: true option to try and make them visually similar to how the previous examples looked but I don't think there's a need to make them look exactly the same, as they're just examples of how the component can look instead of how it should look.

@AshGDS AshGDS changed the title **BREAKING**: Remove title component BREAKING: Remove title component Feb 25, 2025
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 25, 2025 15:06 Inactive
@AshGDS AshGDS force-pushed the remove-title-component branch from 8a627ca to be18c38 Compare February 25, 2025 15:49
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 25, 2025 15:49 Inactive
@AshGDS AshGDS force-pushed the remove-title-component branch from be18c38 to aef7cda Compare February 25, 2025 16:02
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 25, 2025 16:03 Inactive
@AshGDS AshGDS force-pushed the remove-title-component branch from aef7cda to d58d9d7 Compare February 25, 2025 16:03
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 25, 2025 16:03 Inactive
@AshGDS AshGDS force-pushed the remove-title-component branch from d58d9d7 to de66091 Compare February 25, 2025 16:16
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 25, 2025 16:16 Inactive
@AshGDS AshGDS force-pushed the remove-title-component branch from de66091 to 19513cf Compare February 25, 2025 16:18
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 25, 2025 16:18 Inactive
@AshGDS AshGDS added the breaking change A breaking change is present in this issue or pull request label Feb 25, 2025
@AshGDS AshGDS marked this pull request as ready for review February 25, 2025 16:25
@AshGDS AshGDS self-assigned this Feb 25, 2025
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of minor things, but happy to approve and let you sort them out 👍

- Removes the title component, as we now use the heading component where titles are needed.
- Also replaces gem-c-title references with gem-c-heading in the inverse_header and select component
- Also replaces references to the title component in spec files so that tests pass
@AshGDS AshGDS force-pushed the remove-title-component branch from 19513cf to 3dfb20e Compare February 26, 2025 09:54
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4653 February 26, 2025 09:54 Inactive
@AshGDS AshGDS merged commit 28c5bf8 into main Feb 26, 2025
12 checks passed
@AshGDS AshGDS deleted the remove-title-component branch February 26, 2025 10:17
@hannalaakso hannalaakso mentioned this pull request Feb 26, 2025
kevindew added a commit to alphagov/govuk-chat that referenced this pull request Feb 26, 2025
The title component has been removed from govuk_publishing_components [1]
and thus we need to replace it. The heading component with an xl
font-size is functionally equivalent.

I applied this by using Ashley's example [2], however I omitted setting
a margin_bottom of 8 as that matches the margin already added to
`govuk-heading-xl` and rendered identically.

[1]: alphagov/govuk_publishing_components#4653
[2]: https://github.com/alphagov/collections/pull/3963/files
kevindew added a commit to alphagov/govuk-chat that referenced this pull request Feb 26, 2025
The title component has been removed from govuk_publishing_components [1]
and thus we need to replace it. The heading component with an xl
font-size is functionally equivalent.

I applied this by using Ashley's example [2], however I omitted setting
a margin_bottom of 8 as that matches the margin already added to
`govuk-heading-xl` and rendered identically.

In updating the tests I've switched from using a class based selector to
using element, h1. I've done this because it seems more semantic to
match on the element name since we only expect one h1 per response and
don't really mind what class it is in request tests.

[1]: alphagov/govuk_publishing_components#4653
[2]: https://github.com/alphagov/collections/pull/3963/files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A breaking change is present in this issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants