Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

feat: Add session query and run session query after change postal code #392

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

igorbrasileiro
Copy link
Contributor

@igorbrasileiro igorbrasileiro commented Mar 16, 2022

What's the purpose of this pull request?

This PRs adds the session region for VTEX platform and runs the session query when the postal code changes.

How does it work?

When the user changes the postal code, fetches a new channel that contains regionId as value.

How to test it?

Set a valid postal code in the postal code and press Enter

Also, test the search, add to cart.

References

Checklist

  • CHANGELOG entry added

@igorbrasileiro igorbrasileiro self-assigned this Mar 16, 2022
@netlify
Copy link

netlify bot commented Mar 16, 2022

Deploy Preview for basestore ready!

Name Link
🔨 Latest commit 7edaf5f
🔍 Latest deploy log https://app.netlify.com/sites/basestore/deploys/623e0b8d0b6a420009f2e3a1
😎 Deploy Preview https://deploy-preview-392--basestore.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@gatsby-cloud
Copy link

gatsby-cloud bot commented Mar 16, 2022

Gatsby Cloud Build Report

basestore

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 10m

Performance

Lighthouse report

Metric Score
Performance 💚 95
Accessibility 💚 100
Best Practices 💚 100
SEO 💚 93

🔗 View full report

@vtex-sites
Copy link

vtex-sites bot commented Mar 16, 2022

Preview is ready

This pull request generated a Preview

👀   Preview: https://preview-392--base.preview.vtex.app
🔬   Go deeper by inspecting the Build Logs
📝   based on commit a9d42e4

@igorbrasileiro igorbrasileiro requested a review from a team March 16, 2022 16:14
.eslintrc Outdated Show resolved Hide resolved
package.json Outdated
@@ -27,9 +27,10 @@
"@envelop/graphql-jit": "^1.1.1",
"@envelop/parser-cache": "^2.2.0",
"@envelop/validation-cache": "^2.2.0",
"@faststore/api": "^1.6.7",
"@faststore/api": "https://pkg.csb.dev/vtex/faststore/commit/a83409a6/@faststore/api",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remember to fix it.

@igorbrasileiro igorbrasileiro changed the title feat: Add region query and run region query after change postal code feat: Add session query and run session query after change postal code Mar 17, 2022
@@ -29,7 +29,7 @@ export const useProduct = <T extends BrowserProductQueryQuery>(
return {
locator: [
{ key: 'id', value: productID },
{ key: 'channel', value: channel },
{ key: 'channel', value: JSON.parse(channel).salesChannel },
Copy link
Contributor

Choose a reason for hiding this comment

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

This parsing should happen on the api, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but the api doesn't handle it, now.

@igorbrasileiro igorbrasileiro force-pushed the feat/region-query branch 2 times, most recently from 92f9d23 to 3d7fb35 Compare March 21, 2022 20:49
@igorbrasileiro igorbrasileiro force-pushed the feat/region-query branch 3 times, most recently from fd14337 to e657682 Compare March 23, 2022 16:10
CHANGELOG.md Outdated Show resolved Hide resolved
gatsby-browser.js Outdated Show resolved Hide resolved
@igorbrasileiro igorbrasileiro force-pushed the feat/region-query branch 4 times, most recently from 3b89955 to a1596fa Compare March 24, 2022 11:50
@igorbrasileiro
Copy link
Contributor Author

@tlgimenes Fixed all comments

CHANGELOG.md Outdated Show resolved Hide resolved
@igorbrasileiro igorbrasileiro force-pushed the feat/region-query branch 5 times, most recently from c119b0f to 20a2d0f Compare March 25, 2022 17:26
@igorbrasileiro
Copy link
Contributor Author

@tlgimenes can i merge it?! Is ok for you, right now?

igorbrasileiro and others added 2 commits March 28, 2022 10:28
@igorbrasileiro
Copy link
Contributor Author

Page result - https://base.vtex.app/

Metric Mean Standard deviation
Cumulative Layout shift (CLS) 0.00 0.00
First Contentful Paint (FCP) 1470.92 4341.72
First Contentful Paint 3g (FCP) 3008.65 0.30
Largest Contentful Paint (LCP) 1584.09 0.30
Time to Interactive (TTI) 3360.49 10216.52
Total Blocking Time (TBT) 366.00 4563.00
Performance score 0.903 0.000469
JavaScript Execution Time 1328.84 33266.17
Speed Index 1910.20 65.41

Page result - https://sfj-1a2dcd6--base.preview.vtex.app/

Metric Mean Standard deviation
Cumulative Layout shift (CLS) 0.00 0.00
First Contentful Paint (FCP) 1472.09 4168.50
First Contentful Paint 3g (FCP) 3085.04 152172.71
Largest Contentful Paint (LCP) 1698.43 4168.57
Time to Interactive (TTI) 3156.66 900.53
Total Blocking Time (TBT) 278.92 195.63
Performance score 0.931 0.000043
JavaScript Execution Time 1153.39 3390.99
Speed Index 1544.11 3526.08

@igorbrasileiro igorbrasileiro merged commit a9d42e4 into master Mar 28, 2022
@igorbrasileiro igorbrasileiro deleted the feat/region-query branch March 28, 2022 13:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants