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

Add option to Nunjucks macro to activate the JavaScript enhancement #5644

Open
2 tasks
Tracked by #5626
romaricpascal opened this issue Jan 23, 2025 · 0 comments
Open
2 tasks
Tracked by #5626

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Jan 23, 2025

What

Add an option to the Nunjucks macro to control the rendering of data-module="govuk-file-upload" (not rendering by default).

Add options for controlling the different translation strings used by the JavaScript component.

Why

Because once enhanced with JavaScript, the component displays on a much taller area than the native <input>, we've decided to use a feature flag to trigger its use. People using the HTML can set the data-module="govuk-file-upload" manually. An option in the Nunjucks macro will provide a clear API for doing that in Nunjucks, and to be consistent with the other components, options to control the translations should be made available in Nunjucks.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • The File Upload's macro has an option to control whether JavaScript component will execute
  • The File Upload's macro has options to control the translation strings for the JavaScript component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress 📝
Development

No branches or pull requests

1 participant