-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Handle editor sidebar visibility toggle on sidebar #3747
Conversation
Removed vultr server and associated DNS entries |
@@ -23,19 +26,24 @@ import StyledTab from "./StyledTab"; | |||
|
|||
type SidebarTabs = "PreviewBrowser" | "History" | "Search" | "Console"; | |||
|
|||
const Root = styled(Box)(({ theme }) => ({ | |||
const SIDEBAR_WIDTH = 500; | |||
const SIDEBAR_WIDTH_MINIMISED = 20; |
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.
nit: should these simply be set directly as strings to avoid the extra templating below?
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.
Great spot, updated 👍
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.
Works great! Feels a lot more intuitive than old header icon 🙌
@@ -23,19 +26,24 @@ import StyledTab from "./StyledTab"; | |||
|
|||
type SidebarTabs = "PreviewBrowser" | "History" | "Search" | "Console"; | |||
|
|||
const Root = styled(Box)(({ theme }) => ({ | |||
const SIDEBAR_WIDTH = 500; | |||
const SIDEBAR_WIDTH_MINIMISED = 20; |
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.
nit: should these be set directly as strings to avoid the extra templating step below?
<Header> | ||
<Box width="100%" display="flex"> | ||
<input type="text" disabled value={urls.preview} /> | ||
<Root isMinimised={isSidebarMinimised}> |
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.
👍 nice & clear !
What does this PR do?
Moves toggle for show/hiding the editor sidebar to be placed on the sidebar itself.
Also stores the toggle position in localStorage so that the position is maintained when opening graph nodes or switching screens.
Example:
https://3747.planx.pizza/barking-and-dagenham/retrofit-guide