Description
User story
This is a proposal and a follow-up to #1543 (review):
For a long term better solution, I think we should have an AppShell that contains the whole plugin, and things like the
CustomerEffortScorePrompt
,DifferentCurrencyNotice
andNavigationClassic
components should be in the AppShell, so that there will only be one instance of them throughout the whole app. With that approach, we wouldn't need to have thisuseEffect
call. This approach would also solve the issue where the notice appears to keep re-appearing when we switch tabs, see demo video of the issue below:
Here are a few problems that we have in our existing code without AppShell:
- Problem with the
CustomerEffortScorePrompt
, as shown in Add useEffect to avoid multiple CES prompts on the Dashboard Page #1543 (review). - We have multiple instances of the tab navigation component in multiple components. Because it is not a single tab component, we lose the fancy tab switch animation.
- We have multiple instances of the
DifferentCurrencyNotice
in multiple components.
Describe the solution you'd like
Have an AppShell that contains the whole plugin, so that the above mentioned components can be placed in the AppShell, thus addressing the problems.