Financial-Times / x-dash

:x::heavy_minus_sign::newspaper: shared front-end components for FT.com and the FT Apps
https://financial-times.github.io/x-dash
38 stars 6 forks source link

Prevent circular dependency with cp-content-pipeline-ui #688

Closed apaleslimghost closed 1 year ago

apaleslimghost commented 1 year ago

This should never have worked but sort of does because of some npm workspace magic I don't understand. To prevent us having to import cp-content-pipeline-ui, have consumers pass the RichText component in as a prop. This also means we don't have to update this component every time cp-content-pipeline-ui is updated.

This is a breaking change.

adgad commented 1 year ago

Ooh sorry I just thought of something - how will this work with the client-side rendering? IIRC I was having trouble getting the component prop to be passed to (i wanna say) x-interaction when it rerenders client side...