Repository navigation
refactor: gathering delivery promise logic in one single hook to allow usage by others - #2922
Merged
ommeirelles merged 30 commits intoJul 3, 2025
Merged
Conversation
This PR intends to ensure all location data (`postalCode`, `geoCoordinates` and `country`) is being synchronized when needed. It updates geo coordinates when users set a postal code and ensure location data won't be overwritten if users grant geo location consent late. - Enable Delivery Promise on discovery.config; - Open the localhost store on anon tab (to ensure no stale data); - First, consent geo location data from popup and look to the IDB `fs::session` value, it should fill `geoCoordinates` data after `useGeolocation` hook execution; - Then try to set a postal code, the `postalCode` should be set and `geoCoordinates` should be different now (based on the postal code); - Another test: open another anon tab and, while the popup asking for geo location consent set a postal code. Then, after the session is updated with the new location (based on the postal code), grant the geo location consent and nothing should happen since user have already set the postal code. vtex-sites/starter.store#734 --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
Update the Session with postal code, country, and geo-coordinates. The Intelligent Search will use this for the Delivery Promise feature. FastStore updates the session with the location information and IS access it. The update is a PATCH request to the Session Manager API. The fields that IS will use from the session are `postalCode`, `geoCoordinates` and `country`, inside the `public` namespace. Run this code (or use the preview link below) and test changing the postal code and/or using a default one. The fields inside public namespace of the session should be updated accordingly. To check it you can run this request: ```curl curl --location 'https://storeframework.vtexcommercestable.com.br/api/sessions?items=public.postalCode,public.geoCoordinates,public.country' \ --header 'Cookie: vtex_session=ADD_HERE' ```⚠️ Substitute the "ADD_HERE" with the vtex_session cookie that you can get in the browser https://storeframework-cm652ufll028lmgv665a6xv0g-lqicw1ez2.b.vtex.app/ The session shouldn't update the public field.   https://storeframework-cm652ufll028lmgv665a6xv0g-58v0e6a7h.b.vtex.app/ The session shouldn't update the public field.   The session should update the public field!   https://github.com/vtex-sites/starter.store/pull/737 - [Jira task](https://vtex-dev.atlassian.net/browse/SFS-2362) - [Slack thread](https://vtex.slack.com/archives/C069YM7R73P/p1741962308203469?thread_ts=1741782251.679469&cid=C069YM7R73P) - [Session Manager API - Edit session](https://developers.vtex.com/docs/api-reference/session-manager-api#patch-/api/sessions)
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
This PR intends to display region data (on `RegionButton` and `RegionBar`) with `city` and `postalCode` information. For cases when users manually set their zip code, they should see both city name and zip code: <img width="342" alt="Screenshot 2025-04-09 at 09 25 16" src="https://github.com/user-attachments/assets/17b48ff7-37e6-497b-b520-a9d509787afa" /> <img width="256" alt="Screenshot 2025-04-09 at 09 25 02" src="https://github.com/user-attachments/assets/ac34f6d6-1e7f-44ad-99db-6ced59044187" /> Otherwise, if a default zip code is set on `discovery.config` and users do not manually set any zip code, they should see only the city name: <img width="382" alt="Screenshot 2025-04-09 at 09 24 08" src="https://github.com/user-attachments/assets/e9f0fb37-24cf-4e8b-80af-0b9129c5683c" /> <img width="201" alt="Screenshot 2025-04-09 at 09 24 24" src="https://github.com/user-attachments/assets/1f627fc7-9a1c-4bb9-bae4-959dccbfd141" /> Test both scenarios described in the section above to validate everything is working and displayed as expected. vtex-sites/faststoreqa.store#769
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]>
This PR intends to handle the scenario when shoppers are setting postal code and there is no available products for that specific location. For all Delivery Promises scenarios, when shoppers are setting their postal code an input error should be displayed if there is no available products for that location. - If there is a testing postal code with no products available you can use it on `RegionModal` or `RegionPopover`; - Or for local environment you can change the condition at `useSetLocation` hook to mock the `no products` scenario; vtex-sites/faststoreqa.store#788 --------- Co-authored-by: Larícia Mota <[email protected]>
…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 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]>
This PR intends to add the `pickupPoints` route to the Checkout client on `@faststore/api`. There is two scenarios: - If `geoCoordinates` param is present, the request is made using its value; - If no `geoCoordinates`, so `postalCode` and `country` will be used to make the request.
When Delivery Promise enabled: - Adds Shipping Filters component in PLP - List Shipping options available to filter - Enable add custom labels for shipping option via hCMS - Adds `Set Location` button when no zip code provided note: Button actions and facets filters is not fully integrated yet. - List Shipping options available to filter (according to the zipcode provided) |Desktop| Mobile| |-|-| |<img width="559" alt="image" src="https://github.com/user-attachments/assets/580c5e0c-9bb2-485a-8746-514f938cf54d" />|<img width="300" alt="image" src="https://github.com/user-attachments/assets/b4f23fa4-99ab-474e-9484-ab13cd7ff516" />| |Desktop| Mobile| |-|-| |<img width="691" alt="image" src="https://github.com/user-attachments/assets/c1b6a448-5e2e-46e4-9969-742e6a35649b" />|<img width="200" alt="image" src="https://github.com/user-attachments/assets/2ffe9385-da5f-4417-8d9b-7d1e207ebd1e" />| - Show `Set Location` Button when no zipcode is provided |Desktop| Mobile| |-|-| |<img width="518" alt="image" src="https://github.com/user-attachments/assets/d66d972b-fa25-4e0e-b07a-51300f5ff787" />|<img width="392" alt="image" src="https://github.com/user-attachments/assets/2e4bfe9b-412f-4f1f-b3f4-04055834424a" />| - CMS <img width="500" alt="image" src="https://github.com/user-attachments/assets/bb83b8b1-95f0-4bea-b49b-7f750a57b052" /> if you test using an account that delivery promise is not enabled, nothing should be changed. Run locally pointing to `vendemo` account, ou try this preview. 1. if deliveryPromise.enabled is `false` in `discovery.config, no changes are expected. Enable deliveryPromise in `discovery.config`, and test the scenarios below: 1. Navigate to a PLP, you should be able to see a `Delivery` section in the Filters component. (Also try in the mobile resolution) 2. If no zipCode provided, you should be able to see `Set Location` button 3. If zipCode provided, you should be able to see the list of available shipping options for that zipCode vtex-sites/faststoreqa.store#799 --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
## What's the purpose of this pull request? It creates a new tab inside the Global Sections CMS. In the new Settings tab, it will be possible to configure settings related to regionalization, which will be used by components such as the Region Modal and Region Popover. This PR doesn't update all components/sections, it'll be done after. In this PR, there is an update to `FilterDesktop` so we can validate the change. ## How it works? The merchant will be able to configure their regionalization-related message in a single place (Global Sections Settings tab) instead of duplicate messages through sections. To avoid introducing breaking changes, I haven't removed the messages from the sections yet - this will be done in v4. I've added a deprecation notice in every field that was created in the Settings tab. In v3, the components/sections will use the messages defined in the sections CMS; if they're blank, they will use the messages in the Global Sections Settings tab. <img width="1227" alt="Screenshot 2025-05-15 at 10 30 42" src="https://github.com/user-attachments/assets/e1b9b32f-7270-43a7-8016-abb536c08272" /> ## How to test it? In the CMS of the vendemo store, I've added messages in the Global Sections Settings tab using a `[GS]` at the beginning of every message so we can identify the ones that are coming from this tab. - PLP I've only removed (left blank) the messages in `Product List Page > Product Gallery > Filter > Delivery Settings > **Delivery Section description**` and `Product List Page > Product Gallery > Filter > Delivery Settings > Delivery Custom labels > **Shipping label**`, those are the ones that should use the GS one. - Search page The messages from `Search Page > Product Gallery > Filter > Delivery Settings` were all left blank (we hadn't updated this page to add the messages -- so this page didn't have messages defined for those cases, and we hadn't noticed 😣). | PLP | Search Page | | ---- | ---- | | <img width="649" alt="Screenshot 2025-05-15 at 09 59 40" src="https://github.com/user-attachments/assets/199d8e0d-a638-4b3e-ade2-95bbeaaf3a86" /> | <img width="772" alt="Screenshot 2025-05-15 at 10 09 08" src="https://github.com/user-attachments/assets/8edc352e-bf44-46bd-92a2-f9232b407d77" /> | | <img width="1496" alt="Screenshot 2025-05-15 at 10 15 40" src="https://github.com/user-attachments/assets/17284640-fb0e-45d0-b44b-8c7db98fc7be" /> | <img width="1499" alt="Screenshot 2025-05-15 at 10 16 30" src="https://github.com/user-attachments/assets/97801ddd-3b87-4c1f-a166-f8ef7b8d6fcd" /> | | <img width="1495" alt="Screenshot 2025-05-15 at 10 17 37" src="https://github.com/user-attachments/assets/1eb5023c-b724-41f3-8b4f-8cc57f7c4b4c" /> | <img width="1495" alt="Screenshot 2025-05-15 at 10 18 05" src="https://github.com/user-attachments/assets/4457b88e-31a7-4aa2-83ed-8038290a1e2c" /> | ### Starters Deploy Preview - Vendemo [[PR](dp-faststore-org/vendemo-dp#17) / [preview](https://vendemo-cm9sir9v900u7z6llkl62l70j-7sfv6u49l.b.vtex.app/)] ## References - [Slack discussion thread](https://vtex.slack.com/archives/C03L3CRCDC4/p1747248599365189)
## What's the purpose of this pull request? Create the Region Slider component to be used for setting and changing the location (postal code). ## How it works? It's triggered when the shopper clicks on the "Set location" button in the PLP filters and when they click on the postal code link in the PLP filters. The first one is the set location type of this Region Slider, and the second is the change location type. I've added a new state in the UIProvider and functions to handle its change for the Region Slider. ## How to test it? In the preview, test both the set and change location scenarios: #### Set location When no postal code is defined yet, the "Set location" button is displayed in the PLP filters. When the shopper clicks this button, a slideover is displayed to set the postal code. | Desktop | Mobile | | ---- | ---- | | <img width="1505" alt="Screenshot 2025-05-19 at 13 42 54" src="https://github.com/user-attachments/assets/06abcd1e-f963-4746-ad45-6003c675f49a" /> | <img width="218" alt="Screenshot 2025-05-19 at 13 47 14" src="https://github.com/user-attachments/assets/75db72a0-7f3b-45a1-ba6d-4c27617c5e55" /> | | <img width="1507" alt="Screenshot 2025-05-19 at 13 44 04" src="https://github.com/user-attachments/assets/3cf4a05d-a58b-47dc-bf19-bac99a53be55" /> | <img width="216" alt="Screenshot 2025-05-19 at 13 47 50" src="https://github.com/user-attachments/assets/bd87d1ed-9fdd-40f7-b009-e6480d10c89d" /> | #### Change location When a postal code was previously set, this postal code is displayed as a link in the PLP filters. When the shopper clicks this link, a slideover is displayed to change the postal code. | Desktop | Mobile | | ---- | ---- | | <img width="1503" alt="Screenshot 2025-05-19 at 13 44 24" src="https://github.com/user-attachments/assets/f2f5cbe7-5c11-47b1-9769-f1223a1a3339" /> | <img width="216" alt="Screenshot 2025-05-19 at 13 48 14" src="https://github.com/user-attachments/assets/9b1b513f-e3be-4f81-8328-7728dec1e876" /> | | <img width="1506" alt="Screenshot 2025-05-19 at 13 44 45" src="https://github.com/user-attachments/assets/06a8e8dc-d7b7-41d0-80f8-2462abd52058" /> | <img width="218" alt="Screenshot 2025-05-19 at 13 48 29" src="https://github.com/user-attachments/assets/62f1fc05-f24e-4fbb-83de-4c90d2342d63" /> | ### Starters Deploy Preview [Preview](https://vendemo-cm9sir9v900u7z6llkl62l70j-k5r6r35q4.b.vtex.app/) [PR](dp-faststore-org/vendemo-dp#19) ## References - [Jira task](https://vtex-dev.atlassian.net/browse/SFS-2449) --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Otavio Moreira Meirelles <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
…tion event up (#2873) ## What's the purpose of this pull request? <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Fix a behaviour that prevented to use tab to focus the apply button on the region modal ## How it works? <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Checks if the event was triggered by the correct element ## How to test it? <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> Opens the RegionModal component and test if: 1. Focus should be in the input when modal opens 2. On typing in the input and pressing tab, it should focus the button and stays there. ### Starters Deploy Preview <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> ## Checklist <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) --------- Co-authored-by: Fanny Chien <[email protected]>
## What's the purpose of this pull request? This PR implements the Editing the store in the PLP delivery filter flow. The main changes added were: - Adds `changePickupPoint` type to `regionSliderType` - List pickup points given a valid zipcode - Updates shipping filter with selected pickup point reminder: After merging, run `cms sync` to update new section fields. (Few new fields were added: `changePickupPoint`, `changePickupPointApplyButtonLabel`, `noStoresAvailableInLocation` and `errorMessageHelper`) ## How it works? 1. Buyer can edit the pickup store by clicking in the pickup filter in PLP. The SliderOver should appear. |Desktop|Mobile| |-|-| |<img width="936" alt="image" src="https://github.com/user-attachments/assets/981b704b-ffe5-4ab9-9426-ef5b9b6d8703" />|<img width="423" alt="image" src="https://github.com/user-attachments/assets/602cc21b-97ab-4dc5-8a63-4ece2325b16a" />| 2. If the pickup filter is selected, the slider already opens with the field focused and the current location filled in. |Desktop|Mobile| |-|-| <img width="936" alt="image" src="https://github.com/user-attachments/assets/e5052ab9-88a2-4469-a71b-cabc696f341b" />|<img width="423" alt="image" src="https://github.com/user-attachments/assets/7fba073e-634a-4189-bb13-45d04cebd597" />| 3. If the buyer doesn't change the postal code and selects another store, `Update` button should be available. - postal code stays the same and pickup point store should be updated in the PLP filters |Desktop|Mobile| |-|-| |<img width="941" alt="image" src="https://github.com/user-attachments/assets/2e1fa6e8-1e85-4c15-b0db-12ee880e5ec1" />|<img width="425" alt="image" src="https://github.com/user-attachments/assets/8ae9945b-29dd-42e3-89ae-5cc8b22d688e" />| 4. If the buyer changes the postal code and selects a new store. - after updating the pickup point is updated in the PLP filter 5. If buyer changes the postal code that returns invalid or unavailable items for the location, `Update` button should be disabled and a message should be displayed. |Desktop|Mobile| |-|-| |<img width="936" alt="image" src="https://github.com/user-attachments/assets/c8342e1e-b6b9-4833-9b32-67ef123a4129" />|<img width="391" alt="image" src="https://github.com/user-attachments/assets/c14b19ca-ac02-4af0-bfdb-aa5b9bde368e" />| _this error message layout could be slightly different - discussing with design team_ 6. If buyer changes the postal code and no pickup stores available for the location, `Update` button should be disabled and a message should be displayed. |Desktop|Mobile| |-|-| |<img width="938" alt="image" src="https://github.com/user-attachments/assets/ccdec434-6b47-4681-ad79-472ea9f71f88" />|<img width="398" alt="image" src="https://github.com/user-attachments/assets/0b2fa62a-b3cd-469b-994e-739d8c17943d" /> ## How to test it? - You can run locally and point the account to `vendemo` or try on this preview [link](https://vendemo-cm9sir9v900u7z6llkl62l70j-kiasokde8.b.vtex.app). - Reproduce the scenarios listed above in desktop and mobile. ### Starters Deploy Preview - [preview link](https://vendemo-cm9sir9v900u7z6llkl62l70j-kiasokde8.b.vtex.app) --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Larícia Mota <[email protected]>
…2886) ## What's the purpose of this pull request? Renames the `FilterDeliveryOption` component to clarify that it relates to delivery methods.
## What's the purpose of this pull request? When filtering by pickup in point no results were being returned. It was due to the pickup point ID format we were sending to IS. ## How it works? Checkout returns `<seller>_<pickupppoint_id>` as the Pickup Point ID when we use the Checkout's API for Pickup Points. IS expects the Pickup Point ID to be `<account>_<pickuppoint_id>` or the Checkout format `<seller>_<pickupppoint_id>`. It doesn't expect it to be like we're sending (`<account>_<seller>_<pickuppoint_id>`). Therefore, now we'll send to IS as the Checkout sends to us and let IS deal with this format. ## How to test it? If you want to test the core, remember to change `discovery.config.default.js` to use the `vendemo` config and also change the `hideUnavailableItems` to `true`. You can also test it using the `vendemo` previews. Using a Recife CEP, in a PLP/Search page (example `/apparel` page), filter by pickup point `VTEX Recife` - it should return results and not a empty search page. <img width="1499" alt="Screenshot 2025-06-23 at 17 45 56" src="https://github.com/user-attachments/assets/511231be-e3b8-40d2-8c42-70fe035b4c98" /> ### Starters Deploy Preview - Preview without the fix - https://vendemo-cm9sir9v900u7z6llkl62l70j-9qgb9e563.b.vtex.app/ - Preview with the fix - https://vendemo-cm9sir9v900u7z6llkl62l70j-1kljpmw47.b.vtex.app/ [PR](dp-faststore-org/vendemo-dp#37) ## References - [Slack thread](https://vtex.slack.com/archives/C069YM7R73P/p1750701754802599)
## What's the purpose of this pull request? Add the "All Delivery Methods" filter to FilterDesktop and FilterSlider (mobile). ## How it works? When selected, this facet won't add any shipping filter to the IS request. When no other delivery facet is selected, this All Delivery Methods one should be selected to make it explicit to the shopper that no delivery filter is being used. ## How to test it? Using the `vendemo` preview or running the core package changing to use DP in the `vendemo` account. - When accessing a PLP/Search page the "All Delivery Methods" should be selected initially - When changing to another Delivery Method (example: pickup nearby), "All Delivery Methods" should be unselected and the one you chose should be selected - Selecting "All Delivery Methods" shouldn't add a facet to the IS request, only the other methods should do that (example: pickup nearby adds "/shipping/pickup-nearby" to the IS request). #### hCMS  #### Desktop | PLP | Search | | ---- | ---- | |  |  | |  |  | #### Mobile | PLP | Search | | ---- | ---- | |  |  | |  |  | ### Starters Deploy Preview [PR](dp-faststore-org/vendemo-dp#13) https://vendemo-cm9sir9v900u7z6llkl62l70j-kcx6vkr4k.b.vtex.app/ ## References - [Jira task](https://vtex-dev.atlassian.net/browse/SFS-2529) - [Figma](https://www.figma.com/design/2ou3QUE4xEAsq6DkEfbzXp/Delivery-Promise?node-id=2-74354&t=DVfnElFzrvFM0flp-4) --------- Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Lucas Feijó <[email protected]>
ommeirelles
requested review from
eduardoformiga and
emersonlaurentino
and removed request for
a team
June 27, 2025 17:48
|
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. |
lariciamota
reviewed
Jul 2, 2025
lariciamota
approved these changes
Jul 2, 2025
lucasfp13
requested changes
Jul 2, 2025
lucasfp13
reviewed
Jul 2, 2025
Comment on lines
+197
to
+198
| geoCoordinates, | ||
| postalCode, |
Contributor
There was a problem hiding this comment.
We should rely on useSession hook to get these values in outer components.
Suggested change
| geoCoordinates, | |
| postalCode, |
Contributor
Author
| geoCoordinates, | ||
| postalCode, | ||
| pickupPoints, | ||
| selectedPickupPointId, |
Contributor
There was a problem hiding this comment.
We are already exporting the selectedPickupPoint.
Suggested change
| selectedPickupPointId, |
lariciamota
added a commit
that referenced
this pull request
Jul 24, 2025
…w usage by others (#2922) ## What's the purpose of this pull request? <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. ## How it works? <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. ## How to test it? Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> ### Starters Deploy Preview <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> ## Checklist <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 28, 2025
## What's the purpose of this pull request? Feature branch for the Delivery Promise feature - phase 1.2 (filters by shipping method). - #2803 - #2826 - #2845 - #2847 - #2851 - #2852 - #2847 - #2872 - #2886 - #2909 - #2916 - #2918 - #2922 - #2887 - #2944 - #2953 - #2956 - #2955 - #2961 - #2962 ## How it works? <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> ## How to test it? <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> ### Starters Deploy Preview <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References - [Jira epic](https://vtex-dev.atlassian.net/browse/SFS-2038) ## Checklist **Documentation** - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Otavio Moreira Meirelles <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 30, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Jul 30, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lucasfp13
added a commit
that referenced
this pull request
Aug 1, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Aug 1, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
hellofanny
added a commit
that referenced
this pull request
Aug 11, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 2, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 16, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 16, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 18, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 23, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
Sep 30, 2025
…w usage by others (#2922) <!--- Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself. ---> Making the logic of deliveryPromise reusable by stores which extends our components. <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> Created the `useDeliveryPromise` hook that exports all necessary logic to use delivery promise. Test if all the behaviour refactored in delivery promise is stil working as intended. <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process ---> <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [ ] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) [SFS-2532](https://vtex-dev.atlassian.net/browse/SFS-2532) [SFS-2532]: https://vtex-dev.atlassian.net/browse/SFS-2532?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Fanny Chien <[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?
Making the logic of deliveryPromise reusable by stores which extends our components.
How it works?
Created the
useDeliveryPromisehook that exports all necessary logic to use delivery promise.How to test it?
Test if all the behaviour refactored in delivery promise is stil working as intended.
Starters Deploy Preview
References
Checklist
You may erase this after checking them all 😉
PR Title and Commit Messages
feat,fix,chore,docs,style,refactor,ciandtestPR Description
breaking change,bug,contributing,performance,documentation..Dependencies
pnpm-lock.yamlfile when there were changes to the packagesDocumentation
@Mariana-Caetanoto review and update (Or submit a doc request)SFS-2532