flagship icon indicating copy to clipboard operation
flagship copied to clipboard

Summary is redundant in ReviewDetails

Open Cauldrath opened this issue 6 years ago • 1 comments

In ReviewDetails: https://github.com/brandingbrand/flagship/blob/b6ba811acea1db8b5b2da201fcbc3b45f6062106/packages/fscommerce/src/Review/types/ReviewDetails.ts summary is completely redundant to statistics, because statistics extends summary and all of its new keys are optional. This can cause confusion because a user won't know whether to put something into summary or statistics.

Cauldrath avatar Dec 05 '18 22:12 Cauldrath

Another redundant value: https://github.com/brandingbrand/flagship/blob/b6ba811acea1db8b5b2da201fcbc3b45f6062106/packages/fscomponents/src/components/ProductItem/ProductItem.tsx#L50

swatchesProps also contains items: SwatchItemType[]

These are merged together in ProductItemSwatches, though the component only checks to see if swatchItems has a list, not if swatchesProps.items does: https://github.com/brandingbrand/flagship/blob/b6ba811acea1db8b5b2da201fcbc3b45f6062106/packages/fscomponents/src/components/ProductItem/components/ProductItemSwatches.tsx#L35

Cauldrath avatar Dec 06 '18 16:12 Cauldrath