-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(picqer): allow not falling back to product image #536
Conversation
WalkthroughThe pull request updates the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
packages/vendure-plugin-picqer/package.json
is excluded by!**/*.json
📒 Files selected for processing (3)
packages/vendure-plugin-picqer/CHANGELOG.md
(1 hunks)packages/vendure-plugin-picqer/src/api/picqer.service.ts
(1 hunks)packages/vendure-plugin-picqer/src/picqer.plugin.ts
(2 hunks)
🧰 Additional context used
🪛 Biome
packages/vendure-plugin-picqer/src/picqer.plugin.ts
[error] 112-112: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
🔇 Additional comments (3)
packages/vendure-plugin-picqer/CHANGELOG.md (1)
1-4
: LGTM! Clear and well-documented changelog entry.
The changelog entry follows semantic versioning and clearly describes the new configurable feature for controlling featured asset fallback behavior.
packages/vendure-plugin-picqer/src/picqer.plugin.ts (1)
70-78
: LGTM! Well-documented interface additions
The new options are clearly documented and provide good flexibility for controlling sync behavior.
packages/vendure-plugin-picqer/src/api/picqer.service.ts (1)
1009-1009
: LGTM! The fallback condition is correctly implemented.
The change adds the configurable option to control whether to fall back to the parent product's featured asset, which aligns with the PR objective.
this.options = { | ||
fallBackToProductFeaturedAsset: true, | ||
...options, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix use of 'this' in static context
Using 'this' in a static method can be confusing and is flagged by static analysis.
Apply this fix:
- this.options = {
+ PicqerPlugin.options = {
fallBackToProductFeaturedAsset: true,
...options,
};
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
this.options = { | |
fallBackToProductFeaturedAsset: true, | |
...options, | |
}; | |
PicqerPlugin.options = { | |
fallBackToProductFeaturedAsset: true, | |
...options, | |
}; |
🧰 Tools
🪛 Biome
[error] 112-112: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
Description
Deploy
This needs to happen to deploy this feature, for example:
Checklist
📌 Always:
👍 Most of the time:
📦 For publishable packages:
package.json
CHANGELOG.md
See this example