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 is_page_heading parameter from radio component #2061

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

danacotoran
Copy link
Contributor

What

This removes all mentions of the is_page_heading option from the radio component.

Why

Recently, the ability to pass a custom heading level to the radio component was introduced: #1951

Since specifying a custom heading level is now an option, the is_page_heading parameter became redundant. This parameter simply dictates that the radio component legend heading should be a h1 of size xl by default.
It is possible to achieve the same result using heading_level and/or heading_size instead.

Whenever we need this component to have a h1 in the future, we can simply use the heading_level option (in combination with heading_size, if necessary).

This issue is recorded here #1953

Visual changes

There should be no visual changes as a result of this update, as work has already been done to update all references of the radio component to use heading_level/heading_size instead of is_page_heading: true – for instance here

There are still some references to the is_page_heading option in some older, read-only repositories which are using older versions of the gem (Example). In the hypothetical situation where one of these repos is unarchived and updated to the latest version of govuk_publishing_components, this would be a breaking change in those repos.

@bevanloon bevanloon temporarily deployed to govuk-publis-retire-is--hvyjzt May 12, 2021 14:01 Inactive
@danacotoran danacotoran changed the title Remove is_page_heading param from radio component Remove is_page_heading param from radio component May 12, 2021
@danacotoran danacotoran changed the title Remove is_page_heading param from radio component Remove is_page_heading parameter from radio component May 12, 2021
@bevanloon bevanloon temporarily deployed to govuk-publis-retire-is--hvyjzt May 12, 2021 15:45 Inactive
@danacotoran danacotoran force-pushed the retire_is_page_heading_param_2 branch from f5e425d to 4ac1ce1 Compare May 13, 2021 15:27
@bevanloon bevanloon temporarily deployed to govuk-publis-retire-is--hvyjzt May 13, 2021 15:27 Inactive
@owenatgov
Copy link
Contributor

Nitpick before I dive into review: I can see that you've been dashing around our codebase removing instances of this buuuuut should this be labelled as a breaking change as we're mutating our API?

Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

Besides my nitpick this looks perfectly fine to me ✨

@danacotoran danacotoran force-pushed the retire_is_page_heading_param_2 branch from 4ac1ce1 to 118c1aa Compare May 17, 2021 17:05
@bevanloon bevanloon temporarily deployed to govuk-publis-retire-is--hvyjzt May 17, 2021 17:05 Inactive
@danacotoran
Copy link
Contributor Author

@owenatgov good point Owen.
I prefixed the changelog entry with "BREAKING" to highlight that this is a breaking change as per our conventions.

@alex-ju alex-ju added the breaking change A breaking change is present in this issue or pull request label Jun 7, 2021
@alex-ju alex-ju added this to the 25.0.0 milestone Jun 10, 2021
@danacotoran danacotoran force-pushed the retire_is_page_heading_param_2 branch 3 times, most recently from 9a2525b to a878188 Compare July 21, 2021 13:50
Recently, the ability to pass a custom heading level to the radio
component was introduced.
Since a custom heading level is now an option, the is_page_heading
parameter became redundant. This parameter simply dictates that the
radio component legend heading should be a h1 of size xl by default.
It is possible to achieve the same result using heading_level and/or
heading_size instead.

This removes all mentions of is_page_heading from the radio component.
Whenever we need this component to have a h1 in the future we can simply
use the heading_level option (in combination with heading_size, if
necessary)
@danacotoran danacotoran force-pushed the retire_is_page_heading_param_2 branch from a878188 to 8694e7e Compare July 28, 2021 11:16
@danacotoran danacotoran merged commit dd3e7a4 into master Jul 28, 2021
@danacotoran danacotoran deleted the retire_is_page_heading_param_2 branch July 28, 2021 11:20
@alex-ju alex-ju mentioned this pull request Jul 29, 2021
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.

4 participants