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

When injecting content, error message position is wrong #102

Closed
zheileman opened this issue Mar 26, 2020 · 2 comments
Closed

When injecting content, error message position is wrong #102

zheileman opened this issue Mar 26, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@zheileman
Copy link
Contributor

Example with right position of error message:

Screen Shot 2020-03-26 at 15 45 24

Example using the gem and an injected paragraph:

Screen Shot 2020-03-26 at 15 45 59

The workaround at the moment is, in these cases, to not use the fieldset legend to include the header, but instead to render the header (and any content in between this and the radios) separately, and then set the legend to visually hidden.

Or, in this case in particular, to change the little paragraph to hint text. But in other scenarios, this might not work out well. Example:

Screen Shot 2020-03-26 at 15 51 42

@peteryates
Copy link
Member

peteryates commented Mar 27, 2020

Hey @zheileman, I think I've fixed this in #103. If you're using the #govuk_radio_buttons_fieldset/#govuk_check_boxes_fieldset variants this is slightly more complicated and might necessitate adding a new helper to the builder so users can place them exactly where they want them. That's a more substantial change and will take some time.

However, for the problem described in the bug report I think the tools to fix it are now in place. Please let me know and I'll get a release out today.

@zheileman
Copy link
Contributor Author

Hi @peteryates, thank you very much. Yes this solves the mentioned issue. I've not gone too far with the gem, I've just started using it for a legacy project (built with form elements) that we intend to migrate to the new design system.

We don't need this fix released any time soon, so feel free to accommodate this change any way you see fit 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants