Skip to content
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

demo-store customer account api update #1647

Merged
merged 11 commits into from
Jan 17, 2024

Conversation

michenly
Copy link
Contributor

WHY are these changes introduced?

The Customer Account API will be officially release in Jan of 2024. This PR aim to replaced all current storefront API customer usage with the new API in demo-store.

WHAT is this pull request doing?

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset.
If the changes are user-facing and should cause a version bump, run npm run changeset add to track your changes and include them in the next release CHANGELOG.
If you are making simple updates to examples or documentation, you do not need to add a changeset.

.eslintrc.js Outdated
@@ -10,38 +10,4 @@ module.exports = {
'no-useless-escape': 'off',
'no-case-declarations': 'off',
},
overrides: [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This override and templates/demo-store/.eslintrc.js are causing some issue where the VS Code eslint suggestion and the one in CI are giving different suggestions.

There is probably something to fix, but do we really need this override?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huh...nvm, I guess we do...

#895

will remove and fix this later

Copy link
Contributor

@blittle blittle left a comment

Choose a reason for hiding this comment

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

I wish they could have a better error screen in production

image

packages/hydrogen/src/customer/customer.ts Outdated Show resolved Hide resolved
packages/hydrogen/src/customer/customer.ts Outdated Show resolved Hide resolved
packages/hydrogen/src/customer/customer.ts Outdated Show resolved Hide resolved
templates/demo-store/.eslintrc.js Outdated Show resolved Hide resolved
@michenly michenly force-pushed the mc-demo-store-caapi branch from de2c52c to 5cba418 Compare January 17, 2024 19:43
@michenly michenly merged commit 51adf14 into mc-customer-account-templates-update Jan 17, 2024
7 of 10 checks passed
@michenly michenly deleted the mc-demo-store-caapi branch January 17, 2024 20:09
michenly added a commit that referenced this pull request Jan 18, 2024
…re` (#1576)

* ✨ add type generation for customer account api in app/graphql/customer folder

* ✨ add customer client creation into remix server context

* 🔥 remove account activate, recover, register and reset. Since these are not supported in the new CA API with new customer flow.

* 💥 get customer login flow and account/orders landing page working
💥 get login check working in header/layout
💥 edit account profile to use new api
💥 edit account address to customer account api
💥 edit order details page to use customer account api

💥 get customer login flow and account/orders landing page working
💥 get login check working in header/layout
💥 edit account profile to use new api
💥 edit account address to customer account api
💥 edit order details page to use customer account api

* 🗒️ Doc Changes:

 - add note about /account not working with mock.shop

 - add warming for using createCustomerClient without proper credential

 - add changlog

* ✅ Test update

- update test snapshot

- Show error in tests

- Fix create and build test error

- Fix generating auth routes

- Fix standard routes with auth

- Fix setup i18n test

* Update templates/skeleton/app/routes/account.$.tsx

Co-authored-by: Bret Little <[email protected]>

* ✨ add an option to change auth url from the default /authorize

* ✨ add defer loading for login check in root (#1636)

* cart edit

* 🔥 remove customer-api example

* Update .changeset/tasty-plums-pump.md

Co-authored-by: Bret Little <[email protected]>

* Update packages/hydrogen/src/customer/customer.ts

Co-authored-by: Bret Little <[email protected]>

* Update packages/hydrogen/src/customer/customer.ts

Co-authored-by: Bret Little <[email protected]>

* Update packages/hydrogen/src/customer/customer.ts

Co-authored-by: Bret Little <[email protected]>

* demo-store customer account api update (#1647)

* ✨ move demo-store to caapi

* update login button

* login flow + account page

* customer profile edit

* address edit

* cart edit

* order id page

* fix eslint error, strange my VS code is giving different suggestions

* Update packages/hydrogen/src/customer/customer.ts

Co-authored-by: Bret Little <[email protected]>

* Update packages/hydrogen/src/customer/customer.ts

Co-authored-by: Bret Little <[email protected]>

* remove redirectPath from authorize

---------

Co-authored-by: Bret Little <[email protected]>

* implement redirectPath for skeleton template

* use /account/authorize as the default authUrl

---------

Co-authored-by: Bret Little <[email protected]>
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