-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat: [Refinements] Creates ShippingSimulation
#183
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Preview is readyThis pull request generated a Preview👀 Preview: https://preview-183--nextjs.preview.vtex.app |
ShippingSimulation
Lighthouse ReportsHere are the Lighthouse reports of this Pull Request📝 Based on commit 64c74f6
|
ShippingSimulation
ShippingSimulation
ShippingSimulation
ShippingSimulation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -36,6 +36,7 @@ type ActionableInputText = | |||
onSubmit?: never | |||
onClear?: never | |||
buttonActionText?: string | |||
displayClearButton?: never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL never
src/components/ui/ShippingSimulation/shipping-simulation.module.scss
Outdated
Show resolved
Hide resolved
src/components/ui/ShippingSimulation/shipping-simulation.module.scss
Outdated
Show resolved
Hide resolved
src/components/ui/ShippingSimulation/shipping-simulation.module.scss
Outdated
Show resolved
Hide resolved
src/components/ui/ShippingSimulation/shipping-simulation.module.scss
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it on the PDP page, and looks great! 🚀
I've left just a few things to discuss :)
I was not able to see it in the storybook. Something seems to be broken there. Can you check it, pls?
Co-authored-by: Fanny Chien <[email protected]>
Well observed! That's because after rebase with |
What's the purpose of this pull request?
This PR aims to create and refine the
ShippingSimulation
that is found in the PDP.This task didn't include API integration. Thus, we are using mocked data just to see the component working as expected.
Tasks:
How does it work?
👀 One behavior to pay attention to:
PostalCode
included in its session, the page should load thisPostalCode
in theShippingSimulation
as the default.PostalCode
in its session while in thePDP
using theRegionalization
feature, the page should load thisPostalCode
only if there is noPostalCode
included in theShippingSimulation
. But as we don't save thePostalCode
from theShippingSimulation
, if the user refreshes the page, the one from the session must override the other from theShippingSimulation
.How to test it?
So far, we are using mocked data, but you can play around inside the
PDP
. If something didn't work properly (because we are using a user session), try to clean theIndexDB
data.You can also see the storybook.
References
https://www.figma.com/file/EYJqnbWByrSX9EMKvBzBLm/22%2F06%2F14-Handoff-for-PDP-Components?node-id=1001%3A131786
https://www.figma.com/file/EYJqnbWByrSX9EMKvBzBLm/22%2F06%2F14-Handoff-for-PDP-Components?node-id=1001%3A152727
https://vtex-dev.atlassian.net/jira/software/projects/FS/boards/632?selectedIssue=FS-475
Checklist
You may erase this after checking them all ;)
Changelog
CHANGELOG.md
at the beginning of its due section. The latest version should come first.CHANGELOG.md
. E.g., New items in thepull_request_template.md
(#4)PR Description
Breaking change
,Enhancement
,Bug
orChore
.ComponentName
component.useWindowDimensions
hook.Documentation