-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix(sync): refetch sites on opening popup #654
Conversation
Actually, it seems that there is now an issue with updating the state on the sync tab when connecting a site (see below): Screen.Recording.2024-11-13.at.9.07.43.AM.mov |
fb4ba08
to
23bcbc6
Compare
@katinthehatsite fixed |
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.
The code looks good to me, and I can confirm that it also works in all the cases I tested except the one Kateryna mentioned. I'm going to approve those changes anyway, as it's already an improvement but maybe we should look at fixing that edge case in another pull request?
@stephanethomas - I will fix menthioned bug by @katinthehatsite separately, it's anotehr issue with up-to-dating data in Studio. |
Related issues
Proposed Changes
Previously opening Sync popup didn't trigger refetching of sites. So if a user opened "Sync" tab, then created wordpress.com site and then clicked "Connect" button in Sync tab - they didn't see recently created website, so it was necessary to reload Studio.
With this PR we are refetching sites each time the popup is opening .
Testing Instructions
STUDIO_SITE_SYNC=true npm start
Actually, I think that now the code looks even more straightforward, w/o extra props drilling and handleConnect is now isolated inside the dialog. Moreover, we removed 30% of lines -
+29 −45