-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add missing page heading classes #2612
Conversation
Thanks for raising this PR, @matthew-shaw . I think some context may be helpful here: The fixtures that you’ve edited in this PR are automatically generated from YAML examples for each component. These examples live in a [component-name].yaml file in the /src directory of this repo, for example accordion.yaml These yaml examples serve several purposes. They are used:
In this case, we want to check that Having said all that, we’re also aware that all of this TLDR: We’d like to suggest the following:
@matthew-shaw - would you like to make those changes? I’m equally happy to raise a PR myself, if that would be easier for you. |
Thanks very much for taking a look at this @vanitabarrett really appreciate it. Apologies for editing the packaged dist assets instead of the source, I didn't realise they were generated but makes complete sense now. Also interesting that your team use these for visual examples of components too, thanks for the links. I'm happy to update this PR to change the source component yaml files rather than the output test fixtures. I'll also have a go at adding those examples/tests to the labels and fieldsets, but may need to ask you for advice on approach before review. |
Hi @vanitabarrett I've pushed the changes you suggested, sorry about the commit history! 😳 (hopefully the PR can squash it)
My only question is; should the examples without additional classes set also be Other than that, ready for review again. Thanks! 😃 |
Thanks for making those changes @matthew-shaw ! Unfortunately this PR is proving a bit tricky to rebase given some other changes that have been merged into the Hopefully that's ok, and I'll close this PR now (but link back to it from the new PR so our conversations are still preserved) |
Some of the test fixture macros were missing the additional classes for labels and legends as page headings, where
isPageHeading
had been set totrue
. This PR adds them in to the macro options, along with the expected HTML output.In terms of the tests themselves this should have no impact, they will pass with or without as the output matches the expected HTML. But for projects that have ported GOV.UK Frontend to other languages and templating engines such as GOV.UK Frontend Jinja and GOV.UK React JSX, these fixtures are also used for visual component demos as well, so the classes obviously affect the rendered output.
Examples of user facing demos where headings aren't rendered correctly due to missing classes in test fixtures: