You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Website] Restore the single-click "Edit Settings" flow (#1854)
## Motivation for the change, related issues
Restores the easily accessible "Edit settings" button Playground had
before merging #1731, and refocuses the user experience on a single,
temporary Playground. Multiple Playgrounds are still possible, but now
they're less emphasized.
As we've learned from @annezazu and other users, the recent [Multiple
Playgrounds UI
update](#1731)
made rapid fire iterations in Playground more difficult. Before #1731,
we've had an easily accessible button to update WP and PHP versions.
After #1731, that feature required multiple clicks and finding the right
button.
This PR introduces the following changes:
* Add an easily-accessible "Site settings" button for quick PHP/WP
version updates
* The URL reflects the Query API values used to create the temporary
Playground.
* Limit the number of temporary Playground sites to exactly one – just
like before #1731. The temporary Playground is always there and cannot
be deleted.
* The only way to create a stored Playground is by saving the temporary
Playground. Once you do that, you get a fresh temporary Playground.
Kudos to @jarekmorawski for thinking through and designing multiple
variations of the user flows ❤️
## Technical details
The implementation is straightforward and focused on rearranging React
components and CSS. There's one gotcha in the process of saving
temporary site settings. The settings form submission calls
`window.history.pushState()` and the `EnsurePlaygroundIsSelected`
component watches for the URL changes. However, the user may click the
"Update Settings & Reset Playground" button even without changing any
form value. Normally, this would mean we can't detect a change and reset
the Playground. This PR, thus, adds the `?random=<random string>`
parameter to the query string to allow Playground notice the change and
recreate the temporary site.
## Visuals


Here's the video walkthrough – note I've recorded it before this PR was
fully ready for a review:
https://github.com/user-attachments/assets/b2f04fa6-d7d5-43ad-93e2-975a2a9cea21
## Follow up work
There are more design elements to consider, e.g. Snackbar notices.
@jarekmorawski already designed some improvements and is working more. I
would still like to get this PR in and continue iterating based on the
feedback we get.
## UI updates checklist
- [x] Tested mobile interactions
- [x] Resolved accessibility issues reported by Axe Devtools
## Testing plan
CI aside, interact with the design proposed in this PR and confirm it
feels right.
0 commit comments