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

[Stretch] Investigate if we can use config instead of defaults in createAll to get the configuration type #5465

Closed
1 task
Tracked by #5373
romaricpascal opened this issue Nov 4, 2024 · 0 comments · Fixed by #5496
Closed
1 task
Tracked by #5373

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Nov 4, 2024

What

Investigate if createAll could keep checking the type of the config it receives based on the Component it's initialising through another way than using the type of its defaults property.

Why

At the moment createAll's types use the defaults field of the component it receives as first argument to check the type of the configuration it receives as second argument. This implies:

  1. That components needing a configuration need to expose these defaults as public
  2. A constraint for components needing configuration to have defaults in the first place (even if empty/falsy), meaning extra code sent to the client

It'd be great if we could reduce these requirements

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • We've investigated, assessed the impacts of a potential solution, and decided on whether to update our implementation or keep it as is.
@romaricpascal romaricpascal moved this to Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Nov 7, 2024
@romaricpascal romaricpascal moved this from Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Nov 12, 2024
@romaricpascal romaricpascal moved this from In progress 📝 to Ready to release 🚀 in GOV.UK Design System cycle board Nov 14, 2024
@domoscargin domoscargin moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🏁
Development

Successfully merging a pull request may close this issue.

1 participant