Skip to content

Conversation

@bdenham
Copy link
Collaborator

@bdenham bdenham commented Dec 11, 2025

Note: This PR supersedes #623 with a cleaner file structure for easier review.

Quote Management Documentation

Complete documentation for the Quote Management B2B drop-in.

📖 Preview

Full preview with all dropins: https://commerce-docs.github.io/microsite-commerce-storefront/dropins-b2b/quote-management/

📁 Files Added

  • Overview and Quick Start
  • Functions API reference
  • Events reference
  • Containers and slots
  • Styles and i18n

✅ Review Checklist

  • Technical accuracy
  • Examples tested
  • No sensitive info
  • Developer-friendly

Part of #600 - B2B Documentation Initiative

This PR adds the quote-management dropin documentation (24 files).

Enrichment files are already in the base branch (releases/b2b-nov-release).

Base: releases/b2b-nov-release
@bdenham bdenham mentioned this pull request Dec 11, 2025
4 tasks
- Convert all parameter descriptions to verb-first, action-oriented form
- Provide useful context beyond parameter names
- Fix array examples to use escaped code formatting
- Fix 'When set to true' patterns to verb-first form
@bdenham bdenham self-assigned this Dec 12, 2025
@bdenham bdenham added the new-topic A major update published as an entirely new document label Dec 12, 2025
Copy link
Contributor

@jcalcaben jcalcaben left a comment

Choose a reason for hiding this comment

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

Initial technical review feedback of a few files. Review still in progress.

},
"ShippingAddressDisplay": {
"description": "The ShippingAddressDisplay container shows the selected shipping address for a quote with options to change or add new addresses. This component integrates with the company address book for B2B customers."
"description": "The ShippingAddressDisplay container shows the selected shipping address for a quote with options to change or add new addresses. This component integrates with the company address book for B2B customers.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Error/Mistake: The container by itself only renders the shipping address or a warning. The feature for setting a new address from the address book is a boilerplate customization that is not part of the dropin.

Suggested change
"description": "The ShippingAddressDisplay container shows the selected shipping address for a quote with options to change or add new addresses. This component integrates with the company address book for B2B customers.",
"description": "The ShippingAddressDisplay container shows the selected shipping address for a quote or a warning if there is no shipping address set.",


### `quote-management/file-upload-error` (emits)

Emitted when a specific condition or state change occurs.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): Event description is not very specific or helpful.

NOTE: The table above also needs to be updated.

Suggested change
Emitted when a specific condition or state change occurs.
Emitted when there is an error during the file upload process.


events.on('quote-management/initialized', () => {
console.log('Quote Management ready');
loadQuotesList();
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: This is a weird example since this is not how you would load the quotes list.

suggestion: Maybe omit this line and just stick to the console log?


### `quote-management/line-item-note-set` (emits)

Emitted when a specific condition or state change occurs.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): Event description is not very specific or helpful.

NOTE: The table above also needs to be updated.

Suggested change
Emitted when a specific condition or state change occurs.
Emitted after note has been set for a line item in a quote.


### `quote-management/negotiable-quote-close-error` (emits and listens)

Emitted and consumed for internal and external communication.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): Event description is not very specific or helpful.

NOTE: The table above also needs to be updated.

Suggested change
Emitted and consumed for internal and external communication.
Emitted when there is an issue closing a negotiable quote.


### `quote-management/negotiable-quote-deleted` (emits)

Emitted when a specific condition or state change occurs.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): Event description is not very specific or helpful.

NOTE: The table above also needs to be updated.

Suggested change
Emitted when a specific condition or state change occurs.
Emitted after a negotiable quote has been successfully deleted.


### `quote-management/negotiable-quote-requested` (emits)

Emitted when a specific condition or state change occurs.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): Event description is not very specific or helpful.

NOTE: The table above also needs to be updated.

Suggested change
Emitted when a specific condition or state change occurs.
Emitted after a negotiable quote has been successfully requested and created.

Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): These descriptions have no specific details about the nature of the event being emitted. I started adding comments on individual ones, but it looks like they're all the same.

suggestion: Audit and update these event descriptions.

| [`createQuoteTemplate`](#createquotetemplate) | Creates a new negotiable quote template from an existing quote. |
| [`deleteQuote`](#deletequote) | Deletes one or more negotiable quotes. |
| [`deleteQuoteTemplate`](#deletequotetemplate) | Permanently deletes a negotiable quote template. |
| [`duplicateQuote`](#duplicatequote) | API function for the drop-in.. |
Copy link
Contributor

Choose a reason for hiding this comment

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

**issue (vague):**Function description is not very specific or helpful.

Suggested change
| [`duplicateQuote`](#duplicatequote) | API function for the drop-in.. |
| [`duplicateQuote`](#duplicatequote) | Duplicates a negotiable quote from an existing quote. |

| [`setShippingAddress`](#setshippingaddress) | Sets or updates the shipping address for a negotiable quote. |
| [`updateQuantities`](#updatequantities) | Updates the quantities of items in a negotiable quote. |
| [`updateQuoteTemplateItemQuantities`](#updatequotetemplateitemquantities) | Changes the quantity of one or more items in an existing negotiable quote template. |
| [`uploadFile`](#uploadfile) | API function for the drop-in.. |
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (vague): Function description is not very specific or helpful.

Suggested change
| [`uploadFile`](#uploadfile) | API function for the drop-in.. |
| [`uploadFile`](#uploadfile) | Uploads a file |

Restore enrichment and checkout files to match the base branch state.
These files should remain unchanged in this PR as they are not part of
the Quote Management documentation.
@bdenham bdenham force-pushed the b2b-docs-quote-management-v2 branch from d2d4e8f to 602be5a Compare December 18, 2025 20:52
- Remove parameters from other B2B drop-ins
- Remove generic container parameters
- Keep only ariaLabel and onCompanyChange
…ment-v2

# Conflicts:
#	_dropin-enrichments/company-switcher/containers.json
#	_dropin-enrichments/quote-management/containers.json
@bdenham bdenham requested a review from dshevtsov as a code owner December 18, 2025 23:35
Feature branches now receive safeguard files (Git hooks, GitHub Actions,
publication docs) when merged from releases/b2b-nov-release.

The validation script needs to explicitly allow these files:
- .githooks/ directory
- .github/workflows/ (safeguard workflows)
- All .md files (includes PUBLISH-B2B-README.md, etc.)

This prevents false validation failures on feature branches.
Changed pattern from ^\.github/workflows/ to ^\.github/
to include files like .github/PULL_REQUEST_TEMPLATE_PUBLICATION.md

This was causing validation failures because the PR template
is in .github/ root, not in workflows/ subdirectory.
The validation workflow is blocking all PRs. Disabling it
temporarily to unblock the team while we diagnose the root cause.

The workflow file is renamed to .yml.disabled so it won't run.
Change broken links from /merchants/blocks/targeted-block/ to
/merchants/commerce-blocks/personalization/ to fix build errors.
Applied same fixes as b2b-preview (commit e70bec4):
- Complete B2B dropins sidebar with all 4 dropins
- Restored 30 B2B commerce block files
- Added B2B Commerce blocks section to sidebar
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please explain this change

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

Labels

new-topic A major update published as an entirely new document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants