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

Remove title component margin_top option #4508

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Remove title component margin_top option #4508

merged 1 commit into from
Jan 28, 2025

Conversation

andysellick
Copy link
Contributor

@andysellick andysellick commented Dec 19, 2024

What

  • our spacing model is to apply margin bottom, so this is an anomaly
  • replace margin_top with default padding on the component, so no visual changes
  • margin_top option isn't widely used and can be replaced with alternatives, separate PRs will be raised

Applications that use this component, and their use of the margin_top option are:

Note that this PR will have to wait for the ones mentioned above and further work to check it is okay before merging

Why

This is part of a wider piece of work to move the margin options from the shared helper into the component wrapper helper and standardise our component spacing model. This is a step towards being able to remove the margin_top option from the shared helper.

This is a bit of a stop gap because we intend to replace all instances of the title component with the heading component eventually, but that's a larger piece of work.

Visual Changes

Percy is showing a visual diff on the inverse header, which is expected. But this change has been accounted for by a corresponding change in the inverse header to allow custom padding top and bottom. That PR is linked to several PRs in applications where those changes are accounted for to produce no visual difference. Once this code is and that code is in a new gem release we'll merge those other application PRs and everything (should) be fine.

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

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4508 December 19, 2024 16:10 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4508 December 19, 2024 16:11 Inactive
andysellick added a commit to alphagov/collections that referenced this pull request Dec 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
- moving towards a world where the title component has no margin_top option: alphagov/govuk_publishing_components#4508
- this removes instances of the use of the margin_top option for the title component
- in some cases it was possible to replace the title component with the heading component for no visual change (where the margin_top: 0 option was applied)
- in other cases there is a visual change, but this will be minimal
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4508 December 19, 2024 16:29 Inactive
@andysellick andysellick force-pushed the title-margin branch 2 times, most recently from f25d501 to 033b759 Compare January 28, 2025 09:18
- our spacing model is to apply margin bottom, so this is an anomaly
- replace margin_top with default padding on the component, so no visual changes
- margin_top option isn't widely used and can be replaced with alternatives, separate PRs will be raised
@andysellick andysellick changed the title [DO NOT MERGE] Remove title component margin_top option Remove title component margin_top option Jan 28, 2025
@andysellick andysellick marked this pull request as ready for review January 28, 2025 10:08
@andysellick andysellick requested a review from AshGDS January 28, 2025 10:08
@andysellick andysellick merged commit 15b1408 into main Jan 28, 2025
12 checks passed
@andysellick andysellick deleted the title-margin branch January 28, 2025 10:28
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.

None yet

3 participants