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

Replace title component with heading #9835

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Replace title component with heading #9835

merged 1 commit into from
Jan 27, 2025

Conversation

andysellick
Copy link
Contributor

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

What / why

  • replaces one instance of the title component with the heading component
  • this instance was using margin_top: 0 which is an option we're removing from the title component
  • instead use the heading component, which when configured like this should look exactly like the title component, but by default has no margin top
  • hopefully therefore no visual changes

Related to this change: alphagov/govuk_publishing_components#4508

Trello card: https://trello.com/c/Y0pDWbHw/390-move-some-shared-helper-options-into-component-wrapper

- replaces one instance of the title component with the heading component
- this instance was using `margin_top: 0` which is an option we're removing from the title component
- instead use the heading component, which when configured like this should look exactly like the title component, but by default has no margin top
- in some circumstances (i.e. bazillions of tests) the heading component in this page gets passed `nil` for margin_bottom, which the heading component reacts badly to by throwing an error, hence why the options are declared ahead of the call to the heading component
- hopefully therefore no visual changes
Copy link
Contributor

@ChrisBAshton ChrisBAshton left a comment

Choose a reason for hiding this comment

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

LGTM

@andysellick andysellick merged commit ecf44ed into main Jan 27, 2025
19 checks passed
@andysellick andysellick deleted the use-heading branch January 27, 2025 10:24
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.

2 participants