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

Feat: [Refinements] Creates ShippingSimulation #201

Merged
merged 3 commits into from
Sep 16, 2022

Conversation

renatamottam
Copy link
Collaborator

Ported from nextjs.store repo: Feat: [Refinements] Creates ShippingSimulation #183

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:

  • Creates Shipping Simulation.
  • CSS Modules.
  • Themification.
  • Storybook.

How does it work?

Desktop Mobile
06VzGVSK2e mobile-shipping-simulation

👀 One behavior to pay attention to:

  • if the user had a PostalCode included in its session, the page should load this PostalCode in the ShippingSimulation as the default.
  • if the user sets the PostalCode in its session while in the PDP using the Regionalization feature, the page should load this PostalCode only if there is no PostalCode included in the ShippingSimulation. But as we don't save the PostalCode from the ShippingSimulation, if the user refreshes the page, the one from the session must override the other from the ShippingSimulation.

7rxQ0BdqYo

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 the IndexDB 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

  • Added an entry in the CHANGELOG.md at the beginning of its due section. The latest version should come first.
  • Added the PR number with the PR link at the entry in the CHANGELOG.md. E.g., New items in the pull_request_template.md (#4)

PR Description

  • Added a label according to the PR goal - Breaking change, Enhancement, Bug or Chore.
  • Added the component, hook, or pathname in-between backticks (``) - If applicable. E.g., ComponentName component.
  • Identified the function or parameter in the PR - If applicable. E.g., useWindowDimensions hook.

Documentation

  • PR description
  • Added to/Updated the Storybook - if applicable.
  • For documentation changes, ping @ carolinamenezes or @ PedroAntunesCosta to review and update.

* Tweaks PDP grid

* Creates shipping simulation component

* Adds ShippingSimulation parts and styles

* Tweaks PDP grid

* Updates input text clear button control

* Adds conditional rendering and session checking

* Renames from Zip code to Postal Code

* Makes Postal Code link text uniform

* Themification ShippingSimulation

* Organizes ShippingSimulation component

* Manages simulation state using single object

* Adds CHANGELOG entry

* Creates Stories

* removes stories folder

* Fixes sonarQube

* Trigger CI

* Extracts code into new hook that uses useReducer

* Removes -tablet from tokens

* Tweaks border radius

Co-authored-by: Fanny Chien <[email protected]>

* Tweaks font-size token

* Removes too specific token

* Tweaks tokens spaces

* Removes SessionProvider from stories

Co-authored-by: Fanny Chien <[email protected]>
@renatamottam renatamottam added Documentation Improvements or additions to documentation Features New feature or request labels Sep 15, 2022
@vercel
Copy link

vercel bot commented Sep 15, 2022

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

Name Status Preview Updated
gatsby-store-storybook ✅ Ready (Inspect) Visit Preview Sep 15, 2022 at 8:04PM (UTC)

@vtex-sites
Copy link

vtex-sites bot commented Sep 15, 2022

Lighthouse Reports

Here are the Lighthouse reports of this Pull Request

📝 Based on commit 2c6fc90

Lighthouse Report by page
📎   /
📎   /apple-magic-mouse/p
📎   /office

Copy link
Contributor

@lucasfp13 lucasfp13 left a comment

Choose a reason for hiding this comment

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

LGTM!

@renatamottam renatamottam merged commit 28fb9c2 into main Sep 16, 2022
@renatamottam renatamottam deleted the feat/fs-475-shipping-simulation branch September 16, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation Features New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants