-
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.
Add site manager view and sidebar (#1661)
**Warning** This PR contains a lot of TODOs because I didn't want it to get too large. We can decide if it's worth shipping as is or if we need to implement some of these missing features first. ## Motivation for the change, related issues Implements #1656 Browser storage in Playground supports having multiple sites by switching by adding a `site-slug` query string. This is a powerful feature that's hard to discover. As a first step in the [Web app redesign project,](#1655) this PR implements switching sites in browser storage. Other site management features like adding and deleting sites will be added in future PRs. ![Screenshot 2024-08-01 at 12 20 55](https://github.com/user-attachments/assets/b820a040-d9a8-4eb9-aaa0-7d480385e979) ![Screenshot 2024-08-01 at 12 21 08](https://github.com/user-attachments/assets/3ace3f63-7edf-4ab5-b332-78be3ef692a9) ## Implementation details The goal of this PR is to set the groundwork for the [Web app redesign](#1655) project by allowing users to switch between views. The feature is only available while using browser storage. The current view is now called `site-view` and the new management view is called `site-manager`. In this iteration, switching is done by redirecting to a URL with a `site-manager=true` query string. A future iteration will remove the need for reloads. When in the site manager a list of sites is loaded from OPFS, clicking on a site (or preview) will redirect to that site. This is a temporary implementation that will be removed[ once we add site storage.](#1659) ## Testing Instructions (or ideally a Blueprint) - Checkout this branch - [Open Playground with browser storage](http://127.0.0.1:5400/website-server/?storage=browser) - Confirm that a new site manager icon is available in the upper left corner - Click it and confirm that the site manager loads - [Open Playground with browser storage and a custom slug](http://127.0.0.1:5400/website-server/?storage=browser&site-slug=test) - Click on the site manager icon and confirm that the site manager loads - Confirm that both sites are visible --------- Co-authored-by: Brandon Payton <[email protected]>
- Loading branch information
1 parent
4fa5db7
commit 0f11a6f
Showing
19 changed files
with
1,168 additions
and
441 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
21 changes: 21 additions & 0 deletions
21
packages/playground/website/public/site-manager-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.