Skip to content

Make the site switcher work again#1698

Merged
brandonpayton merged 3 commits intotrunkfrom
fix-site-switching
Aug 21, 2024
Merged

Make the site switcher work again#1698
brandonpayton merged 3 commits intotrunkfrom
fix-site-switching

Conversation

@brandonpayton
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

@brandonpayton
Copy link
Copy Markdown
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
Copy Markdown
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
@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

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant