Repository navigation
feat: Gets user's saved location if logged in and uses in session - #2739
Merged
hellofanny merged 12 commits intoMar 24, 2025
Merged
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. |
hellofanny
commented
Mar 21, 2025
hellofanny
force-pushed
the
feat/profile-address-location
branch
from
March 21, 2025 15:30
884aac3 to
942ecf6
Compare
hellofanny
marked this pull request as ready for review
March 21, 2025 15:40
hellofanny
requested review from
eduardoformiga and
lariciamota
and removed request for
a team
March 21, 2025 15:40
lucasfp13
reviewed
Mar 21, 2025
3 tasks
pedromtec
reviewed
Mar 24, 2025
lucasfp13
approved these changes
Mar 24, 2025
pedromtec
reviewed
Mar 24, 2025
pedromtec
approved these changes
Mar 24, 2025
hellofanny
added a commit
that referenced
this pull request
Mar 25, 2025
## What's the purpose of this pull request? We will need to update the faststore/api with `profile`. To avoid conflicts and potential issues, since multiple feature branches will be using the same core, I'm extracting part of the logic introduced in #2739 into the main branch. ## How it works? Adds profile's type and profile to query. ## How to test it? The easiest way to test might be running the faststore/api and faststore/core - Try querying `profile` - Pass an profile id (you can get it when logged - see more instructions on #2739) <img width="600" alt="image" src="https://github.com/user-attachments/assets/58dc1f3e-b5e7-458f-af4f-f6003f8961b7" /> <img width="1892" alt="image" src="https://github.com/user-attachments/assets/ea073908-25db-414c-89ce-6e6345550634" />
hellofanny
added a commit
that referenced
this pull request
Mar 26, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
Mar 27, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
Mar 28, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
Apr 8, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
Apr 11, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
Apr 22, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
May 8, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
lariciamota
pushed a commit
that referenced
this pull request
May 12, 2025
) ## What's the purpose of this pull request? This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session. <img width="400" alt="Screenshot 2025-03-12 at 10 52 35" src="https://github.com/user-attachments/assets/f5c345cf-395b-4e48-bd84-c5f280e32d65" /> ## How it works? 1. First we check if user is loggedIn 2. If so, gets it's addresses 3. Check for saved address (using the first of the list) postalCode and geoCoordinate, If available we update the current session with those information. ## How to test it? First, we will need to simulate user logged. (you can follow this [docs](https://docs.google.com/document/d/1DSwrD19dOvzFc650UAlLg4diyxmYTHaBD_4lxWQT8YY/edit?tab=t.0) steps with more detail or follow the steps below) 1. Go to https://www.vtexfaststore.com/ and sign in, then copy the cookies: _VtexIdclientAutCookie_storeframework_, _vtex_session_ and _vtex_segment_ 2. Running the store locally, paste those cookies. 3. Update the indexDB you should be able to see `person` object with user's information (that was previously `null`) 4. Now, refresh the page. 5. if there is an address saved for this user, you should be able to see the `postalCode` and `geoCoordinates` in the session <img width="823" alt="image" src="https://github.com/user-attachments/assets/1ecbb614-aa9f-4a46-bc0c-51b7e756aba6" /> <img width="885" alt="image" src="https://github.com/user-attachments/assets/6dc80260-d705-4422-9c01-785a11982f94" /> ### Starters Deploy Preview https://github.com/vtex-sites/starter.store/pull/731 [Jira Task](https://vtex-dev.atlassian.net/jira/software/c/projects/SFS/boards/1051?selectedIssue=SFS-2205)
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?
This PR implements the scenario where the user is logged in, and when the user's saved location (address and geo-coordinates) is available, it is saved in the current session.
How it works?
How to test it?
First, we will need to simulate user logged. (you can follow this docs steps with more detail or follow the steps below)
personobject with user's information (that was previouslynull)postalCodeandgeoCoordinatesin the sessionStarters Deploy Preview
https://github.com/vtex-sites/starter.store/pull/731
Jira Task