-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GEN-670 - fix: change ssn warning dialog glitch #2794
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
4440b48
to
acf4df8
Compare
acf4df8
to
44bd4bd
Compare
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
44bd4bd
to
8222891
Compare
datadogLogs.logger.info('Cleared shopSession to change SSN in price calculator') | ||
|
||
const url = new URL(window.location.href) | ||
if (!url.searchParams.has(OPEN_PRICE_CALCULATOR_QUERY_PARAM)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solves one issue we're currently having where that query param might be added several times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup, I don't have any more questions
apps/store/src/components/PriceCalculator/PriceCalculatorAccordion.tsx
Outdated
Show resolved
Hide resolved
url.searchParams.append(OPEN_PRICE_CALCULATOR_QUERY_PARAM, '1') | ||
} | ||
|
||
await router.replace(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just do a hard page reload here or are we sure this works?
8222891
to
018f844
Compare
Describe your changes
ChangeSsnWarningDialog
Justify why they are needed
As it can be seen in the video below, the glitch happens because
ChangeSsnWarningDialog
get's shown for a brief moment when we load information for an authenticated user. In those situations we need to display BankId Dialog butChangeSsnWarningDialog
also get's show because:ChangeSsnWarningDialog
appearance is based on the presence ofshopsSession.customer?.ssn
.SsnSeSection
will be re-rendered but this timeshopsSession.customer
will be present - causing the appearance ofChangeSsnWarningDialog
.;I think what we want in this case is a more imperative solution where we get to decide when to show
ChangeSsnWarningDialog
- when "Edit" button get's clicked and we already have a loaded customer.Screen.Recording.2023-07-18.at.10.15.47.mov