Repository navigation
chore: No products available label from Headless CMS and code refactor - #2824
Merged
lucasfp13 merged 10 commits intoMay 8, 2025
Merged
Conversation
lucasfp13
requested review from
emersonlaurentino and
gabpaladino
and removed request for
a team
May 1, 2025 19:06
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
No products available label com Headless CMS and code refactorNo products available label from Headless CMS and code refactor
lucasfp13
requested review from
hellofanny and
lariciamota
and removed request for
emersonlaurentino and
gabpaladino
May 2, 2025 11:59
lariciamota
reviewed
May 5, 2025
lariciamota
reviewed
May 8, 2025
lariciamota
force-pushed
the
feat/delivery-promise
branch
from
May 8, 2025 17:28
9e4c9b4 to
4358a91
Compare
This PR's aims to cover the following scenarios: 1. When the buyer opens the site to start a session, display `RegionPopover` when location is optional, no location available and merchant has default zipCode. |Desktop|Mobile| |-|-| |<img width="500" alt="scenario-1-desk" src="https://github.com/user-attachments/assets/e074c8f1-8948-46c7-9da4-f741c3a28349" />|<img width="150" alt="scenario-1-mob" src="https://github.com/user-attachments/assets/b0879b12-a64a-4d62-b0b6-2eb1548a304d" />| 2. When the buyer opens the site to start a session, Display `RegionPopover` when location is optional and no location available. |Desktop|Mobile| |-|-| <img width="500" alt="scenario-2-desk" src="https://github.com/user-attachments/assets/7007fd03-fd25-40f8-9a37-cb79f72eecc5" />|<img width="150" alt="scenario-2-mob" src="https://github.com/user-attachments/assets/152aa08f-50fc-4fbe-802a-be8387b47c15" />| -Create Popover Component / Popover styles -Create RegionPopover / styles -Implements changes of session postalCode in `RegionPopover` -Creates `useSetLocation` to handle session changes in `RegionModal` and `RegionPopover` -Uses `useRegion` to handle setLocation and validation -Adds `RegionPopover` to `RegionButton` (desktop) -Adds `RegionPopover` to `RegionBar` (mobile) -Moves `useOnClickOutside` hook to `faststore/ui` Run the project locally or use this [preview link](https://storeframework-cm652ufll028lmgv665a6xv0g-k85hl97mm.b.vtex.app) In `discovery.config`, sets ``` deliveryPromise: { enabled: true, mandatory: false, }, ``` > When the buyer opens the site to start a session, display RegionPopover when location is optional, no location available and merchant has default zipCode. _Clear site data, if there is a previous session that a postalCode is set_ In `discovery.config`, in the default session, adds a zip code (use `12121`) ``` session: { postalCode: '12121', }, ``` 1. Refresh the page 2. You will be able to see the RegionPopover with the default zip code applied. 3. Click outside the Popover and it should disappear. 4. Refresh the page 5. Attempts to change the zip code 6. If you apply a valid zip code, after refreshing the page you shouldn't able to see the popover anymore. This should also work in the mobile. > When the buyer opens the site to start a session, Display `RegionPopover` when location is optional and no location available. _Clear site data, if there is a previous session that a postalCode is set_ In `discovery.config`, in the default session, sets a zip code to `null` ``` session: { postalCode: null, }, ``` 1. Refresh the page 2. You will be able to see the RegionPopover with the default description and no location applied. 3. Click outside the Popover and it should disappear. 4. Refresh the page 5. Attempts to change the zip code 6. If you apply a valid zip code, after refreshing the page you shouldn't able to see the popover anymore. This should also work in the mobile. _Clear site data, if there is a previous session that a postalCode is set_ 1. In `discovery.config`, changes `mandatory` to `true`. ``` deliveryPromise: { enabled: true, mandatory: true, }, ``` 2. Refresh the page, the Popover should not appear, instead the `RegionModal` will appear without the close button. <img width="500" alt="image" src="https://github.com/user-attachments/assets/6f8e8d30-4248-4b29-802e-183d9ebf5b5b" /> Also, added `RegionPopover` to Global section in hCMS. `storeframework` account You can also test it, changing the texts and see if it's working as expected. <img width="500" alt="image" src="https://github.com/user-attachments/assets/a362370a-33a3-403e-aa2c-b4edc84bf980" /> vtex-sites/faststoreqa.store#777 [Figma](https://www.figma.com/design/Ra4IaKe920E5rkXZkCz1D8/Cubos-–-FastStore-Features-B2C?node-id=226-20785&t=DHxk1r6kytn2lHC2-0) https://www.w3schools.com/cssref/sel_attr_begin.php TODO: Request Doc for PopOver TODO: Remind to run cms sync in the default account when the feature branch is merged since new section was added. --------- Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Lucas Feijó <[email protected]>
…and `RegionPopover`
lucasfp13
force-pushed
the
chore/no-products-available-label
branch
from
May 8, 2025 18:20
208df62 to
ae1fc2f
Compare
3 tasks
lariciamota
added a commit
that referenced
this pull request
May 12, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
May 13, 2025
## What's the purpose of this pull request? Feature branch for the Delivery Promise feature - phase 1 (navigation based on shopper location). - #2708 - #2728 - #2739 - #2745 - #2749 - #2750 - #2768 - #2772 - #2775 - #2809 - #2817 - #2824 - #2835 ## How it works? ## How to test it? ### Starters Deploy Preview ## References - [Jira epic](https://vtex-dev.atlassian.net/browse/SFS-1696) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) - [ ] TODO: Request Doc for PopOver - [ ] TODO: Remind to run cms sync in the default account when the feature branch is merged since new section was added. (And add the new section in the admin!) --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
May 13, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
May 13, 2025
…tor (#2824) This PR intends to apply some code refactor and receive the `no products available` error scenario. Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
May 14, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jun 20, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jun 23, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 2, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
hellofanny
added a commit
that referenced
this pull request
Jul 2, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 24, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 30, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 30, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Aug 1, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
hellofanny
added a commit
that referenced
this pull request
Aug 11, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 2, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 16, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 16, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 18, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 23, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 30, 2025
…tor (#2824) ## What's the purpose of this pull request? This PR intends to apply some code refactor and receive the `no products available` error scenario. ## How to test it? Remember to apply `cms-sync` to a dev workspace to validate the new error message from hCMS. ### Starters Deploy Preview vtex-sites/faststoreqa.store#791 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What's the purpose of this pull request?
This PR intends to apply some code refactor and receive the
no products availableerror scenario.How to test it?
Remember to apply
cms-syncto a dev workspace to validate the new error message from hCMS.Starters Deploy Preview
vtex-sites/faststoreqa.store#791