-
Notifications
You must be signed in to change notification settings - Fork 14
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 line break functionality to instruction and description #196
Conversation
Co-authored-by: Andrew Maddaford <[email protected]>
scripts/run_validator.sh
Outdated
@@ -1,4 +1,4 @@ | |||
#!/usr/bin/env bash | |||
tag=latest | |||
tag=make-description-list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder to revert before merge
templates/interstitial.html
Outdated
|
||
{% set save_on_signout = true %} | ||
|
||
{% set continue_button_text = _("Continue") %} | ||
|
||
{% block form_content %} | ||
{% set interstitial_instruction = format_paragraphs(block.content.instruction) if block.content.instruction else None %} | ||
{% set interstitial_instruction = format_paragraphs([block.content.instruction]) if block.content.instruction else None %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to pass an empty iterable to format_paragraph
and have it not output anything by using the {% else %}
operator when we iterate
{% set interstitial_instruction = format_paragraphs([block.content.instruction]) if block.content.instruction else None %} | |
{% set interstitial_instruction = format_paragraphs([block.content.instruction]) |
"instruction": "Just pause for a second", | ||
"instruction": [ | ||
"Just pause for a second" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also have a question instruction in a test schema.
What is the context of this PR?
Break current question description into a list to allow for multiple paragraphs. Additionally makes format_paragraphs a macro and adds it to the helpers.html.
Depends on ONSdigital/eq-translations#62 and ONSdigital/eq-questionnaire-validator#50 to be merged prior to this.
How to review
Open a schema using a description (test_markup) and confirm the description continues to be displayed correctly.
Checklist