docs: add Vendure custom fields blog - #1090
Conversation
Changed Files
|
There was a problem hiding this comment.
Pull request overview
Adds a new documentation blog post explaining how to use Superposition to resolve context-aware Vendure custom fields, including a new animated diagram component to visually communicate the “Vendure stores fallback / Superposition resolves effective value” concept.
Changes:
- Added a new blog post: “Context-aware Vendure custom fields with Superposition”.
- Added a new
VendureOwnershipFlowanimation component (Anime.js-driven) used by the blog post. - Added a dedicated CSS module to style the new animation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/src/components/animations/VendureOwnershipFlow/index.tsx | New animation component rendering and animating the Vendure→Superposition→storefront value flow. |
| docs/src/components/animations/VendureOwnershipFlow/styles.module.css | Styling for the new VendureOwnershipFlow animation layout and theme variants. |
| docs/blog/2026-07-07-context-aware-vendure-custom-fields.md | New blog post content embedding the animation via AnimationSlide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import AnimationSlide from '@site/src/components/AnimationSlide'; | ||
| import { VendureOwnershipFlow } from '@site/src/components/animations'; | ||
|
|
There was a problem hiding this comment.
@sauraww you have to add an export in superposition/docs/src/components/animations/index.ts for VendureOwnershipFlow
| --- | ||
| slug: context-aware-vendure-custom-fields | ||
| title: Context-aware Vendure custom fields with Superposition | ||
| description: How Superposition adds channel aware resolved values to Vendure custom fields. |
|
|
||
| ## Why Superposition fits this problem | ||
|
|
||
| Superposition starts from a simple idea: configuration should be resolved in context. Instead of spreading rules across environment variables, hardcoded conditionals , or one-off feature flags, it lets teams define typed defaults and resolve the right value for each context in a cascading way. |
| <div | ||
| ref={diagramRef} | ||
| className={styles.figure} | ||
| aria-label="Vendure catalog value, Superposition condition and override, and storefront result" | ||
| > |
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Datron
left a comment
There was a problem hiding this comment.
Can we include some sections about how the plugin was built with superposition and how others can do the same. It should include setup instructions with superposition_provider and code examples as well.
| @@ -0,0 +1,150 @@ | |||
| --- | |||
There was a problem hiding this comment.
@sauraww this file needs to be mdx for the animations to render
| @@ -0,0 +1,150 @@ | |||
| --- | |||
| slug: context-aware-vendure-custom-fields | |||
| title: Context-aware Vendure custom fields with Superposition | |||
There was a problem hiding this comment.
| title: Context-aware Vendure custom fields with Superposition | |
| title: Context Aware Custom Form Fields in Vendure |
With superposition is implied, or it can be added to the URL slug for SEO
| import AnimationSlide from '@site/src/components/AnimationSlide'; | ||
| import { VendureOwnershipFlow } from '@site/src/components/animations'; | ||
|
|
There was a problem hiding this comment.
@sauraww you have to add an export in superposition/docs/src/components/animations/index.ts for VendureOwnershipFlow
| Commerce data is rarely as global as it first appears. | ||
|
|
||
| An online store often needs extra product information: a price band, a fulfilment promise, a merchandising label, or a marketplace-specific badge. | ||
| In Vendure, custom fields are a natural place to store this data because they let teams extend products and product variants directly. |
There was a problem hiding this comment.
Vendure can link to Vendure's website. One thing that would be helpful would be to add a few lines about what Vendure is
| In Vendure, custom fields are a natural place to store this data because they let teams extend products and product variants directly. | |
| In [Vendure](https://vendure.io), custom fields are a natural place to store this data because they let teams extend products and product variants directly. |
| An online store often needs extra product information: a price band, a fulfilment promise, a merchandising label, or a marketplace-specific badge. | ||
| In Vendure, custom fields are a natural place to store this data because they let teams extend products and product variants directly. | ||
|
|
||
| But some values are "default" values. |
|
|
||
| Vendure remains the system of record for the catalog. Superposition adds a runtime configuration layer that can resolve the right value for the current business context. | ||
|
|
||
| <!-- truncate --> |
|
|
||
| ## Why Superposition fits this problem | ||
|
|
||
| Superposition starts from a simple idea: configuration should be resolved in context. Instead of spreading rules across environment variables, hardcoded conditionals , or one-off feature flags, it lets teams define typed defaults and resolve the right value for each context in a cascading way. |
There was a problem hiding this comment.
| Superposition starts from a simple idea: configuration should be resolved in context. Instead of spreading rules across environment variables, hardcoded conditionals , or one-off feature flags, it lets teams define typed defaults and resolve the right value for each context in a cascading way. | |
| Superposition starts from a simple idea: configuration should be resolved with context. Instead of spreading rules across environment variables, hardcoded conditionals , or one-off feature flags, it lets teams define typed defaults and resolve the right value for each context in a cascading way. |
|
|
||
| Superposition starts from a simple idea: configuration should be resolved in context. Instead of spreading rules across environment variables, hardcoded conditionals , or one-off feature flags, it lets teams define typed defaults and resolve the right value for each context in a cascading way. | ||
|
|
||
| The important part is that the catalog does not need to become more complex just because the business rules become more specific. Vendure keeps the base product data understandable, and Superposition resolves the effective value at read time. |
There was a problem hiding this comment.
| The important part is that the catalog does not need to become more complex just because the business rules become more specific. Vendure keeps the base product data understandable, and Superposition resolves the effective value at read time. | |
| The important part is that the catalog does not need to become more complex just because the business rules become more specific. Vendure keeps the base product data understandable, and Superposition resolves the effective value at when required. |
Is this better?
|
|
||
| Now suppose the same merchant wants a different bulk price for the B2B channel in INR. That value does not need to become another Vendure custom field. It can be stored as a contextual override in Superposition: | ||
|
|
||
| ```text |
There was a problem hiding this comment.
We should write this like cac toml, just to keep the format uniform across docs and blog

Vendure Blog
Added a Vendure custom fields blog post and a supporting animation that shows Vendure as the stored fallback source and Superposition as the condition + override layer used to produce the resolved storefront value.
Environment variable changes
None.
Pre-deployment activity
None.
Post-deployment activity
Verify the published docs page renders correctly.
API changes
None.
Possible Issues in the future
The animation is documentation-only, but layout may need minor tuning if the blog theme, typography, or embedded animation container dimensions change later.