Skip to content
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

Make the site switcher work again #1698

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Make the site switcher work again #1698

merged 3 commits into from
Aug 21, 2024

Conversation

brandonpayton
Copy link
Member

Motivation for the change, related issues

The site switcher was broken by #1669. This PR is a fix for that.

Related to #1687

Implementation details

The site that is booted depends on the redux store, so the current loaded site now depends on redux state.

Testing Instructions (or ideally a Blueprint)

  • CI
  • Use npm run dev and manually test switching between sites

@brandonpayton
Copy link
Member Author

Somehow this change seems to break opening a site with device storage, but I don't yet see how.

When using trunk, it works fine, but when using this branch, this dialog stays up, endlessly syncing:
Screenshot 2024-08-20 at 1 29 23 PM

@brandonpayton
Copy link
Member Author

It seems like a playground API ref might not be updated when using device storage. Still looking into it.

@brandonpayton
Copy link
Member Author

It seems like a playground API ref might not be updated when using device storage. Still looking into it.

It turned out the reason for the hanging sync UI was that we were setting the local-fs mount descriptor before syncing memfs files to OPFS which interrupted the sync.

57db51c waits until sync is complete to set the local-fs descriptor.

@brandonpayton brandonpayton changed the title Make site switcher work again Make the site switcher work again Aug 21, 2024
@brandonpayton
Copy link
Member Author

I tested switching between a variety of sites with browser storage and switching between those sites and device and temporary storage.

@brandonpayton brandonpayton merged commit 5ade2fb into trunk Aug 21, 2024
5 checks passed
@brandonpayton brandonpayton deleted the fix-site-switching branch August 21, 2024 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@wp-playground] Website [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant