simorgh
simorgh copied to clipboard
Migrate `@storybook/addon-knobs` package to `@storybook/addon-controls`
Is your feature request related to a problem? Please describe.
The @storybook/addon-knobs
addon we use in Storybook has been deprecated in favour of @storybook/addon-controls
(which we have in the application). The deprecated package is not supported and has started to introduce some NPM audit warnings for its dependencies.
Steps for migration to the addon-controls
library can be found here
This could potentially be a chunky piece of work as there is a Psammead package we use that also makes use of the @storybook/addon-knobs
package called psammead-storybook-helpers. This is used extensively throughout Simorgh, so severing this dependency will likely be the bulk of the work here.
Describe the solution you'd like
Follow the migration guide above and remove @storybook/addon-knobs
from Simorgh in favour of @storybook/addon-controls
.
Ensure all functionality from @storybook/addon-knobs
is retained in Storybook
Describe alternatives you've considered
We could retain @storybook/addon-knobs
and accept the potential risk of dependency vulnerabilities, however this will continue to cause issues with the build pipeline reporting NPM audit warnings.
Testing notes
Ensure that all the original functionality that @storybook/addon-knobs
introduced is retained with @storybook/addon-controls
when using the new Controls functionality within Storybook.
- [x] This feature is expected to need manual testing.
Checklist
- [x] (BBC contributors only) This issue follows the repository use guidelines