Remove is_page_heading
parameter from radio component
#2061
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ah1
of sizexl
by default.It is possible to achieve the same result using
heading_level
and/orheading_size
instead.Whenever we need this component to have a h1 in the future, we can simply use the
heading_level
option (in combination withheading_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 ofis_page_heading: true
– for instance hereThere 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 ofgovuk_publishing_components
, this would be a breaking change in those repos.