Skip to content

docs: add Vendure custom fields blog - #1090

Open
sauraww wants to merge 1 commit into
mainfrom
blog/vendure
Open

docs: add Vendure custom fields blog#1090
sauraww wants to merge 1 commit into
mainfrom
blog/vendure

Conversation

@sauraww

@sauraww sauraww commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI review requested due to automatic review settings July 9, 2026 14:01
@sauraww
sauraww requested a review from a team as a code owner July 9, 2026 14:01
@semanticdiff-com

semanticdiff-com Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  docs/blog/2026-07-07-context-aware-vendure-custom-fields.md Unsupported file format
  docs/src/components/animations/VendureOwnershipFlow/index.tsx  0% smaller
  docs/src/components/animations/VendureOwnershipFlow/styles.module.css  0% smaller

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 VendureOwnershipFlow animation 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.

Comment on lines +8 to +10
import AnimationSlide from '@site/src/components/AnimationSlide';
import { VendureOwnershipFlow } from '@site/src/components/animations';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.
Comment on lines +153 to +157
<div
ref={diagramRef}
className={styles.figure}
aria-label="Vendure catalog value, Superposition condition and override, and storefront result"
>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch blog/vendure

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Datron Datron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @@
---

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment on lines +8 to +10
import AnimationSlide from '@site/src/components/AnimationSlide';
import { VendureOwnershipFlow } from '@site/src/components/animations';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vendure can link to Vendure's website. One thing that would be helpful would be to add a few lines about what Vendure is

Suggested change
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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems out of place


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 -->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

truncate removes everything below this

Image


## 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should write this like cac toml, just to keep the format uniform across docs and blog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants