performant-software / react-components

A library of shared React components
https://performant-software.github.io/react-components/
MIT License
1 stars 1 forks source link

Add `RelatedSources` Core Data component #286

Closed camdendotlol closed 3 months ago

camdendotlol commented 3 months ago

Summary

Notes

Screenshot

Screenshot 2024-05-20 at 4 45 16 PM
dleadbetter commented 3 months ago

Since this reuses so much code from RelatedItems, it might be worth refactoring the code into a RelatedSources component and changing both RelatedItems and RelatedWorks to be thin wrappers over that. But I'm not sure how desirable that might be if the three source types are expected to diverge over time.

I think refactoring both components into RelatedSources (which can also be used for RelatedInstances) is probably the way to go for now. I agreed, we expect the models to diverge at some point in the future, but we're not sure when or even what that will look like. Until then, it will probably be a nicer development experience to only have to make changes to a single component.

For backwards compatibility, let's add a @deprecated annotation to the RelatedItems component and plan to remove it in the next major release.