alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

Review handling of falsy option values across our components #5190

Open romaricpascal opened 3 months ago

romaricpascal commented 3 months ago

What

Review our components for how they handle falsy value for their nunjucks options expecially if they make a diffence between null, undefined, false,0, ''. If there is a difference between falsy values or a specific reason not to make a difference, check if there are tests verifying the components' rendering for these nuances.

Why

This will make our code more resilient in the case of minor refactors that change how we handle falsy component options (eg, using Nunjucks' default filter instead of if <VALUE>), limiting the risk of us introducing bugs.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when