Skip to content

feat: Add support for Buyer Portal in Catalyst #2404

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

Draft
wants to merge 9 commits into
base: canary
Choose a base branch
from

Conversation

icatalina
Copy link

@icatalina icatalina commented Jun 11, 2025

⚠️ This PR is pointing at canary, so the diff is more "reasonable", once reviewed it will get merged against integration/b2b-buyer-portal

What/Why?

Testing

Migration

icatalina and others added 8 commits May 14, 2025 18:58
Use an onSubmit listener and move most of the logic outside the
product-details-form component.

The ideal solution here is to patch the form action at the root of the
component tree, but that's proven complicated at this point. Will try to
amend it in the future.
* feat: Add support for Buyer Portal in Catalyst

* refactor: remove unnecessary useState/useEffects + simplify useB2B* logic

* refactor: simplify use of env. variables

* refactor: Simplify integration points with product-details-form

Use an onSubmit listener and move most of the logic outside the
product-details-form component.

The ideal solution here is to patch the form action at the root of the
component tree, but that's proven complicated at this point. Will try to
amend it in the future.

* fix: cart sync

* fix: deprecating sync-cart

* feat: Add support for Buyer Portal in Catalyst

* refactor: remove unnecessary useState/useEffects + simplify useB2B* logic

* refactor: simplify use of env. variables

* refactor: Simplify integration points with product-details-form

Use an onSubmit listener and move most of the logic outside the
product-details-form component.

The ideal solution here is to patch the form action at the root of the
component tree, but that's proven complicated at this point. Will try to
amend it in the future.

* fix: changes according to review

* fix: changes according to review

* fix: improving cartId prop type

---------

Co-authored-by: Ignacio Catalina <ignacio.catalina@bigcommerce.com>
Copy link

changeset-bot bot commented Jun 11, 2025

🦋 Changeset detected

Latest commit: 0d11b87

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

This PR includes changesets to release 3 packages
Name Type
@bigcommerce/catalyst-core Minor
@bigcommerce/eslint-config-catalyst Patch
@bigcommerce/catalyst-client Minor

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

Copy link

vercel bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2025 2:18pm
functional_test_tteag7agni_1 ❌ Failed (Inspect) Jun 13, 2025 2:18pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jun 13, 2025 2:18pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 2:18pm
catalyst-uk ⬜️ Ignored (Inspect) Jun 13, 2025 2:18pm

@icatalina icatalina changed the base branch from integrations/b2b-buyer-portal to canary June 11, 2025 13:34
@icatalina icatalina requested review from bc-micah and bc-victor June 11, 2025 13:35
Comment on lines +321 to +327
CredentialsProvider({
id: 'anonymous',
credentials: {
cartId: { type: 'text' },
},
authorize: loginWithAnonymous,
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably want to give this another rebase as we moved the anonymous session into its own cookie instead of reusing the next-auth one. This is to account for persistent cart to work correctly. See these PRs:

Copy link
Author

Choose a reason for hiding this comment

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

another rebase given, can you have a look 🙇

Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't need this CredentialsProvider if you've pull in the code from those 3 PRs.

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