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 default summary list value text to be configured #540

Merged

Conversation

peteryates
Copy link
Member

@peteryates peteryates commented Jun 5, 2024

Being able to set the default fallback text for summary list values is convenient and saves people from peppering extra logic throughout the views.

The new configuration value, default_summary_list_value_text, defaults to "" so the behaviour of the library won't change unexpectedly.

Fixes #411

Final tasks

Copy link

netlify bot commented Jun 5, 2024

Deploy Preview for govuk-components ready!

Name Link
🔨 Latest commit a7b1c9b
🔍 Latest deploy log https://app.netlify.com/sites/govuk-components/deploys/6661bafea162ce0008c2c727
😎 Deploy Preview https://deploy-preview-540--govuk-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@frankieroberto
Copy link
Collaborator

Makes sense, but perhaps we should be nudging people towards this pattern instead: https://design-system.service.gov.uk/components/summary-list/#showing-missing-information - rather than having default text like "Not set"? 🤔

@peteryates
Copy link
Member Author

Yeah, I agree. I think this option and the behaviour can easily be explained in a couple of paragraphs in the guide. Still, adding a link requires effort so being able to configure a fallback (even one that defaults to "") is likely to have utility I think.

@peteryates peteryates force-pushed the add-config-setting-for-default-summary-list-value-text branch from bc2eee2 to a7b1c9b Compare June 6, 2024 13:34
@peteryates peteryates added this pull request to the merge queue Jun 7, 2024
Merged via the queue into main with commit 9ca3dc7 Jun 7, 2024
14 checks passed
@peteryates peteryates deleted the add-config-setting-for-default-summary-list-value-text branch June 7, 2024 10:01
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.

Add fallback text for summary list values
2 participants