BRD-1014-Add-Shopify-collections-facet-to-ShopifyAdapter#65
Conversation
|
@claude review |
|
Claude finished @PauliusInvertus's task in 1m 31s —— View job PR Review: BRD-Add-Shopify-collections-facet-to-ShopifyAdapter
Overall the implementation is well-structured and consistent with the existing adapter patterns. The core logic in Issues1. Missing test: plain mode (no-locales path) with collections
2. Misleading default value for
string $primaryLocale = 'en',This default is never hit — Observations (non-blocking)3.
return array_values(array_unique($titles));If two collections share the same translated title (or both fall back to the same default), duplicates are silently dropped. This is probably desired — but it's worth a one-line comment since it's a deliberate choice and not just incidental. It would also be worth a test case if title collisions are a realistic scenario in production data. 4. Translation fallback behavior for the primary locale is clear, but asymmetric In $title = $locale === $primaryLocale
? $entry['default']
: ($entry['translations'][$locale] ?? $entry['default']);For the primary locale the Tests: what's covered well
The overall implementation is solid. The only actionable item is the missing plain-mode test (point 1) and the defaulted parameter cleanup (point 2). |
There was a problem hiding this comment.
Code Review
This pull request introduces Shopify collection integration into the product transformation pipeline, enabling localized collection titles and product-to-collection mapping. The review feedback suggests refactoring the translation extraction logic to use an existing helper method and correcting typos in the test data.
Consumes the connector's new collections payload and emits collection titles as a localized facet field per product
(collections_{locale}, or collections in plain mode), with translation fallback to the default title.
BRD-1014