Skip to main content
warning

These risks are applicable to custom components created using toolkit version @appdirect/sfb-toolkit@4.x.x or earlier and @appdirect/sfb-theme-components@0.0.344 or earlier.

Introduction

While Custom Components allow the creation of new UI elements there are a few important consequences/risks that come with this capability:

No automatic UI library updates

When Custom Components are installed using the sfb-toolkit components command a specific version (according to the toolkit version) of our UI library (@appdirect/sfb-theme-components) is being installed. This means that unlike themes that do not have Custom Components installed, the UI features available are restricted to those of the UI library version installed. As such, unless the version of the UI library is manually updated (see below risks), new UI features will not be available. The resoning behind this flow is to ensure theme stability. If new features/Custom Components are added which reuse/build on top of our UI library, those customizations will not be at risk of breaking due to interdependencies when a new version of our UI library is released.

Overriding UI library components

By installing Custom Components our UI library (@appdirect/sfb-theme-components) is automatically installed. This allows you to reuse, extend or override the UI components we provide. When overriding our UI components either through JavaScript or CSS it is important to keep in mind that these could cause breaking changes. As such, we strongly suggest to thoroughly test any components which have been overriden.

tip

The sfb-toolkit components-info command could help you identify which custom components could be at risk. Please see here for more information.

Manually updating the UI library

When Custom Components are installed, manually updating the UI library by executing sfb-toolkit install @appdirect/sfb-theme-components@version can cause custom components which override UI library components to break (see above). This generally occurs because the overridden custom components will have some dependencies pointing to our UI library while the entry point is localy defined (in the customComponents folder). As such, side effects might occur caused by local files not being compatible with dependencies pointing to the new UI library version installed.

tip

The sfb-toolkit components-info command could help you identify which custom components could be at risk. Please see here for more information.

Was this page helpful?