-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Website] Use site slug as a stable scope
## Change details With this PR, Playground sites will use a stable path such as `/scope:my-site-slug/` instead of a volatile, randomly generated one such as `/scope:0.489625368/`. ## Motivation WordPress stores URLs such as `<img src="">` and `<a href="">` in the post content in a raw form that includes the site path. However, Playground assigns each site a random one-time scope. This is a problem for persistent sites where you can upload an image today and have it referenced in a post as, say `<img src="/scope:98742/wp-uploads/img.jpg">` and still expect to have it working correctly tomorrow when the site URL changes to `/scope:1987578`. ## Testing instructions * Create a new site * Save it in the browser * Upload an image in a post * Save the post * Refresh the browser tab * Confirm that image still renders correctly * Do it again, but now upload that image before saving the site in the browser With the introduction of multiple persistent Playgrounds, the users will get to interact with the same site multiple times
- Loading branch information
Showing
7 changed files
with
71 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters