Skip to content

Comments

Always initialise new products as unpublished, unavailable, and unlisted by default#6306

Merged
witoszekdev merged 3 commits intomainfrom
fix/dont-initialise-products-published
Feb 2, 2026
Merged

Always initialise new products as unpublished, unavailable, and unlisted by default#6306
witoszekdev merged 3 commits intomainfrom
fix/dont-initialise-products-published

Conversation

@mirekm
Copy link
Member

@mirekm mirekm commented Jan 30, 2026

We also want to drop the Availability panel from the product initialisation form as we don't see a real use case for it - you should set these all up once the product is created and fully configured later.

Copilot AI review requested due to automatic review settings January 30, 2026 18:58
@mirekm mirekm requested a review from a team as a code owner January 30, 2026 18:58
@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: 1dfe552

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.58%. Comparing base (b53b0d7) to head (1dfe552).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6306   +/-   ##
=======================================
  Coverage   42.58%   42.58%           
=======================================
  Files        2497     2497           
  Lines       43376    43372    -4     
  Branches    10233    10231    -2     
=======================================
  Hits        18470    18470           
+ Misses      24869    24865    -4     
  Partials       37       37           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the default availability settings for newly created products to be more conservative, ensuring products are not visible or purchasable until explicitly configured.

Changes:

  • New products now default to unpublished, unavailable, and not visible in listings
  • Channel listings are no longer set for products with variants during initial product creation (deferred until variants are created)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/channels/utils.ts Updated default values in createChannelsData to set isPublished, isAvailableForPurchase, and visibleInListings to false instead of true
src/products/views/ProductCreate/handlers.ts Removed channel listing updates for products with variants during creation, added explanatory comment
.changeset/humble-mice-wave.md Added changeset documenting the behavioral change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@witoszekdev witoszekdev enabled auto-merge (squash) February 2, 2026 14:46
@witoszekdev witoszekdev merged commit cf68ca5 into main Feb 2, 2026
13 checks passed
@witoszekdev witoszekdev deleted the fix/dont-initialise-products-published branch February 2, 2026 14:49
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.

2 participants