-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add site manager view and sidebar #1661
Merged
Merged
Changes from 42 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
4644ba0
Update ws dependency
bgrgicak 742e68e
Move main content into a view
bgrgicak ed0b88a
Add site manager view
bgrgicak 4272269
Load site manager if flag set to true
bgrgicak 3150b30
Merge branch 'trunk' into add/website-view-switcher
bgrgicak 53967e4
Open site manager from site view
bgrgicak 1d1f3fb
Add sidebar site switching
bgrgicak 7f2dbe7
Responsive sidebar
bgrgicak cca77fd
Fix type issue
bgrgicak 09a4d16
Add resources
bgrgicak f59de26
Read sites from OPFS
bgrgicak 0c5b031
Update comment
bgrgicak c937e00
Merge branch 'trunk' into add/website-view-switcher
bgrgicak 58022b7
Change view query string
bgrgicak f2eed46
Update packages/playground/website/src/components/browser-chrome/inde…
bgrgicak 58e076b
Apply suggestions from code review
bgrgicak b6c3ba3
Fix sidebar responsive issue
bgrgicak cc9e90b
Capitalize name
bgrgicak 0ccc318
Unrelated open error report links in a new tab
bgrgicak d69fe76
Update WordPress packages
bgrgicak 3206084
Merge branch 'trunk' into update/wordpress-packages
bgrgicak 16b4875
Merge branch 'update/wordpress-packages' into add/website-view-switcher
bgrgicak 8817d59
Merge branch 'update/wordpress-packages' into add/website-view-switcher
bgrgicak 4f5700d
Use Navigator for views
bgrgicak db154de
Matching animation time
bgrgicak 618afa7
Add borders
bgrgicak 5cb582a
Responsive issues
bgrgicak 3914f5b
Fix typo
bgrgicak 87d5fff
Merge branch 'trunk' into add/website-view-switcher
bgrgicak ba559c5
Fix site manager responsive
bgrgicak 4303ded
Remove editor component
bgrgicak 921df43
Update header and nav to use WordPress components
bgrgicak 377a42e
Replace remaining sidebar components
bgrgicak 0676c79
Replace default icon
bgrgicak 9448b3a
Fix site-view radius
bgrgicak 3b0c7c3
Make entire sidebar scrollable
bgrgicak e3c7bb4
Remove extra titles
bgrgicak d9d1ed2
Move menu icon to new component
bgrgicak 3728dd2
Disable logo clicks
bgrgicak c23040b
Fix animation
bgrgicak 9503c35
Change site on sidebar item click
bgrgicak 47d436f
Small css changes
bgrgicak 84176fd
Merge branch 'trunk' into add/website-view-switcher
brandonpayton 291c12a
Add comment length fixes to site-view
brandonpayton edacf40
Add ESLint rules to limit comment width (#1613)
bgrgicak eff01f1
Return to site view on click
bgrgicak a8f3078
Small css fixes
bgrgicak 454ab61
Update menu button style
bgrgicak 463b2eb
Refactor header
bgrgicak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
34 changes: 34 additions & 0 deletions
34
packages/playground/website/src/components/open-site-manager-button/index.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import css from './style.module.css'; | ||
|
||
import { __experimentalNavigatorButton as NavigatorButton } from '@wordpress/components'; | ||
|
||
function SiteManagerIcon() { | ||
return ( | ||
<svg | ||
width="14" | ||
height="14" | ||
viewBox="0 0 14 14" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M1.99967 1.58301H4.49967C4.72979 1.58301 4.91634 1.76956 4.91634 1.99967V4.49967C4.91634 4.72979 4.72979 4.91634 4.49967 4.91634H1.99967C1.76956 4.91634 1.58301 4.72979 1.58301 4.49967V1.99967C1.58301 1.76956 1.76956 1.58301 1.99967 1.58301ZM0.333008 1.99967C0.333008 1.0792 1.0792 0.333008 1.99967 0.333008H4.49967C5.42015 0.333008 6.16634 1.0792 6.16634 1.99967V4.49967C6.16634 5.42015 5.42015 6.16634 4.49967 6.16634H1.99967C1.0792 6.16634 0.333008 5.42015 0.333008 4.49967V1.99967ZM9.49967 1.58301H11.9997C12.2298 1.58301 12.4163 1.76956 12.4163 1.99967V4.49967C12.4163 4.72979 12.2298 4.91634 11.9997 4.91634H9.49967C9.26956 4.91634 9.08301 4.72979 9.08301 4.49967V1.99967C9.08301 1.76956 9.26956 1.58301 9.49967 1.58301ZM7.83301 1.99967C7.83301 1.0792 8.5792 0.333008 9.49967 0.333008H11.9997C12.9201 0.333008 13.6663 1.0792 13.6663 1.99967V4.49967C13.6663 5.42015 12.9201 6.16634 11.9997 6.16634H9.49967C8.5792 6.16634 7.83301 5.42015 7.83301 4.49967V1.99967ZM11.9997 9.08301H9.49967C9.26956 9.08301 9.08301 9.26956 9.08301 9.49967V11.9997C9.08301 12.2298 9.26956 12.4163 9.49967 12.4163H11.9997C12.2298 12.4163 12.4163 12.2298 12.4163 11.9997V9.49967C12.4163 9.26956 12.2298 9.08301 11.9997 9.08301ZM9.49967 7.83301C8.5792 7.83301 7.83301 8.5792 7.83301 9.49967V11.9997C7.83301 12.9201 8.5792 13.6663 9.49967 13.6663H11.9997C12.9201 13.6663 13.6663 12.9201 13.6663 11.9997V9.49967C13.6663 8.5792 12.9201 7.83301 11.9997 7.83301H9.49967ZM1.99967 9.08301H4.49967C4.72979 9.08301 4.91634 9.26956 4.91634 9.49967V11.9997C4.91634 12.2298 4.72979 12.4163 4.49967 12.4163H1.99967C1.76956 12.4163 1.58301 12.2298 1.58301 11.9997V9.49967C1.58301 9.26956 1.76956 9.08301 1.99967 9.08301ZM0.333008 9.49967C0.333008 8.5792 1.0792 7.83301 1.99967 7.83301H4.49967C5.42015 7.83301 6.16634 8.5792 6.16634 9.49967V11.9997C6.16634 12.9201 5.42015 13.6663 4.49967 13.6663H1.99967C1.0792 13.6663 0.333008 12.9201 0.333008 11.9997V9.49967Z" | ||
fill="white" | ||
/> | ||
</svg> | ||
); | ||
} | ||
|
||
export function OpenSiteManagerButton() { | ||
return ( | ||
<NavigatorButton | ||
path="/manager" | ||
aria-label="Open Site Manager" | ||
className={css.openSiteManagerButton} | ||
iconSize={14} | ||
icon={<SiteManagerIcon />} | ||
></NavigatorButton> | ||
); | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/playground/website/src/components/open-site-manager-button/style.module.css
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@media (max-width: 812px) { | ||
.open-site-manager-button { | ||
position: relative; | ||
top: -4px; | ||
} | ||
} |
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
75 changes: 75 additions & 0 deletions
75
packages/playground/website/src/components/site-manager/icons.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
export const Logo = (props?: React.SVGProps<SVGSVGElement>) => { | ||
return ( | ||
<svg | ||
width="32" | ||
height="32" | ||
viewBox="0 0 32 32" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<rect | ||
width="10.4176" | ||
height="10.4176" | ||
rx="3.86258" | ||
transform="matrix(0.829038 -0.559193 0.838671 0.544639 7.45703 24.1775)" | ||
stroke="white" | ||
strokeWidth="0.965644" | ||
/> | ||
<rect | ||
width="13.2346" | ||
height="13.2346" | ||
rx="3.86258" | ||
transform="matrix(0.829038 -0.559193 0.838671 0.544639 5.0918 18.9934)" | ||
stroke="white" | ||
strokeWidth="1.44847" | ||
/> | ||
<rect | ||
width="17.451" | ||
height="17.451" | ||
rx="3.86258" | ||
transform="matrix(0.829038 -0.559193 0.838671 0.544639 1.55371 11.6099)" | ||
stroke="white" | ||
strokeWidth="1.93129" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export const TemporaryStorageIcon = (props?: React.SVGProps<SVGSVGElement>) => { | ||
return ( | ||
<svg | ||
width="16" | ||
height="17" | ||
viewBox="0 0 16 17" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M8 15C4.41015 15 1.5 12.0899 1.5 8.5C1.5 4.91015 4.41015 2 8 2C11.5899 2 14.5 4.91015 14.5 8.5C14.5 12.0899 11.5899 15 8 15ZM0 8.5C0 4.08172 3.58172 0.5 8 0.5C12.4183 0.5 16 4.08172 16 8.5C16 12.9183 12.4183 16.5 8 16.5C3.58172 16.5 0 12.9183 0 8.5ZM9 9.5V4.5H7.5V8H5.5V9.5H9Z" | ||
fill="#949494" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export const WordPressIcon = (props?: React.SVGProps<SVGSVGElement>) => { | ||
return ( | ||
<svg | ||
width="20" | ||
height="21" | ||
viewBox="0 0 20 21" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
d="M20 10.5C20 4.99 15.51 0.5 10 0.5C4.48 0.5 0 4.99 0 10.5C0 16.02 4.48 20.5 10 20.5C15.51 20.5 20 16.02 20 10.5ZM7.78 15.87L4.37 6.72C4.92 6.7 5.54 6.64 5.54 6.64C6.04 6.58 5.98 5.51 5.48 5.53C5.48 5.53 4.03 5.64 3.11 5.64C2.93 5.64 2.74 5.64 2.53 5.63C4.12 3.19 6.87 1.61 10 1.61C12.33 1.61 14.45 2.48 16.05 3.95C15.37 3.84 14.4 4.34 14.4 5.53C14.4 6.27 14.85 6.89 15.3 7.63C15.65 8.24 15.85 8.99 15.85 10.09C15.85 11.58 14.45 15.09 14.45 15.09L11.42 6.72C11.96 6.7 12.24 6.55 12.24 6.55C12.74 6.5 12.68 5.3 12.18 5.33C12.18 5.33 10.74 5.45 9.8 5.45C8.93 5.45 7.47 5.33 7.47 5.33C6.97 5.3 6.91 6.53 7.41 6.55L8.33 6.63L9.59 10.04L7.78 15.87ZM17.41 10.5C17.65 9.86 18.15 8.63 17.84 6.25C18.54 7.54 18.89 8.96 18.89 10.5C18.89 13.79 17.16 16.74 14.49 18.28C15.46 15.69 16.43 13.08 17.41 10.5ZM6.1 18.59C3.12 17.15 1.11 14.03 1.11 10.5C1.11 9.2 1.34 8.02 1.83 6.91C3.25 10.8 4.67 14.7 6.1 18.59ZM10.13 11.96L12.71 18.94C11.85 19.23 10.95 19.39 10 19.39C9.21 19.39 8.43 19.28 7.71 19.06C8.52 16.68 9.33 14.32 10.13 11.96Z" | ||
fill="#ffffff" | ||
/> | ||
</svg> | ||
); | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the toolbar hidden when the sidebar is expanded? As a user, it feels like a distracting change and one that unnecessarily takes away the embedded WP navigation bar.
It seems practical to take away (or disable) the site configuration menus while the sidebar is opened to avoid conflicts between the two, but would it be possible to slide those out and let the embedded nav bar remain so users can continue seeing and setting the WP URL for the active session?
Leaving the toolbar in place might also reduce the number of moving parts mentioned in the "jarring" feedback above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted it to match the future design where the toolbar won't be visible.
Also the idea was for the site view to be disabled here but I changed it based on @adamziel feedback.
The current toolbar will eventually be removed, so I don't want to spend time adjusting it to work here for example we would need to hide the new menu button, adjust it to match visually, and add extra breakpoints to keep responsive support.
@jarekmorawski what do you think?