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

Allow custom heading size on fieldset component #1223

Merged
merged 4 commits into from
Dec 12, 2019

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Dec 12, 2019

What

Allow custom heading size on fieldset component.

Why

So we can generate custom headings within legends consistently across GOV.UK

Visual Changes

No visual changes

View Changes

Before: https://components.publishing.service.gov.uk/component-guide/fieldset
After: https://govuk-publishing-compo-pr-1223.herokuapp.com/component-guide/fieldset

Trello card

Instead of the current inline html with sanitize examples we now promote nesting components within the fieldset using the yield block.
Instead of using custom html for inserting headings within the legend we now promote the `heading_level` option.
Copy link
Contributor

@kr8n3r kr8n3r left a comment

Choose a reason for hiding this comment

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

good improvement

@alex-ju
Copy link
Contributor Author

alex-ju commented Dec 12, 2019

it looks good to me, but is this a breaking change @alex-ju ?

No, we still allow sanitised html to be passed in as values (including to the legend_text in this component) so it's backwards compatible, we're just not promoting it. I introduced the yield block as an alternative to text attribute a while back but haven't updated the examples.

@kr8n3r
Copy link
Contributor

kr8n3r commented Dec 12, 2019

it looks good to me, but is this a breaking change @alex-ju ?

No, we still allow sanitised html to be passed in as values (including to the legend_text in this component) so it's backwards compatible, we're just not promoting it. I introduced the yield block as an alternative to text attribute a while back but haven't updated the examples.

yeah, i notice that after i've posted and then deleted the comment

🚢

@alex-ju alex-ju merged commit 1274b9f into master Dec 12, 2019
@alex-ju alex-ju deleted the update-fieldset-component branch December 12, 2019 17:41
@alex-ju alex-ju mentioned this pull request Dec 13, 2019
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.

3 participants