Repository navigation
feat: [Delivery Promise] Default postal code - #2708
Merged
lariciamota merged 5 commits intoMar 10, 2025
Merged
lariciamota merged 5 commits into
lariciamota merged 5 commits into
Conversation
|
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
commented
Mar 5, 2025
| }, | ||
|
|
||
| deliveryPromise: { | ||
| enabled: false, |
Contributor
Author
There was a problem hiding this comment.
There will be more config added in the next tasks, this is the reason for adding an object deliveryPromise and not a single boolean enableDeliveryPromise: false.
lariciamota
marked this pull request as ready for review
March 5, 2025 15:25
lariciamota
requested review from
emersonlaurentino and
pedromtec
and removed request for
a team
March 5, 2025 15:25
pedromtec
approved these changes
Mar 7, 2025
eduardoformiga
approved these changes
Mar 7, 2025
eduardoformiga
left a comment
Member
There was a problem hiding this comment.
Good job, @lariciamota .
I left some questions along with the review, but it is related to the feature behavior itself, not to the code. I'll let it pre-approved.
lariciamota
force-pushed
the
feat/delivery-promise-postal-code-default
branch
from
March 10, 2025 15:19
78d621a to
6aabafd
Compare
3 tasks
hellofanny
pushed a commit
that referenced
this pull request
Mar 26, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
Mar 27, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
Mar 28, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
Apr 8, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
Apr 11, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
Apr 22, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
May 8, 2025
## What's the purpose of this pull request? Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. ## How it works? If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. ## How to test it? In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 ### Starters Deploy Preview https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) ## References - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
lariciamota
added a commit
that referenced
this pull request
May 12, 2025
Add in `discovery.config.js` the config that will be used for the new feature Delivery Promise and update code related to validate session to change the `postalCode` to the default one if it's null or empty. If the session's `postalCode` is null or empty, it changes to the initial/default one configured in `discovery.config.js` in the `session` object. In the starter preview's `discovery.config.js` file, I've added `90210` as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.  You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by [editing the IDB through a script in the browser's devtools](https://developer.chrome.com/docs/devtools/storage/indexeddb). Here is the snippet I've used:  ``` var connection = indexedDB.open('keyval-store', 1); connection.onsuccess = (e) => { var database = e.target.result; var objectStore = database.transaction(['keyval'],'readwrite').objectStore('keyval'); var getRequest = objectStore.get('fs::session'); getRequest.onsuccess = (e) => { var data = e.target.result; data.postalCode = null; var updateRequest = objectStore.put(data, 'fs::session'); updateRequest.onsuccess = (event) => { console.log(event.target.result); } } } ``` https://github.com/user-attachments/assets/104164bf-80e8-4bec-bcd5-982f4fe60e04 https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ ([PR](https://github.com/vtex-sites/starter.store/pull/705)) - [Jira task 1](https://vtex-dev.atlassian.net/browse/SFS-2199) - [Jira task 2](https://vtex-dev.atlassian.net/browse/SFS-2200) - [Delivery Promise RFC - related section 1](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.igtfl04jtxbb) - [Delivery Promise RFC - related section 2](https://docs.google.com/document/d/15IUc7_sQ_MxM67TJJI4fqbnTyc9PVdy_jJb5M0iMhyE/edit?tab=t.0#heading=h.h45g42imthwf) - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
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]>
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?
Add in
discovery.config.jsthe config that will be used for the new feature Delivery Promise and update code related to validate session to change thepostalCodeto the default one if it's null or empty.How it works?
If the session's
postalCodeis null or empty, it changes to the initial/default one configured indiscovery.config.jsin thesessionobject.How to test it?
In the starter preview's

discovery.config.jsfile, I've added90210as the default postal code and enabled the deliveryPromise feature. Then if you test the preview you should see this postal code in the IndexedDB of the browser's devtools.You can also test that it'll be updated to the default postal code if the postal code in the IDB is null or empty previously for some reason (like if you had already accessed the store before this change). It can be done by editing the IDB through a script in the browser's devtools. Here is the snippet I've used:

Screen.Recording.2025-02-28.at.14.23.39.mov
Starters Deploy Preview
https://storeframework-cm652ufll028lmgv665a6xv0g-8kzj40dcm.b.vtex.app/ (PR)
References
Checklist
@Mariana-Caetanoto review and update (Or submit a doc request)