Skip to content
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

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

ianjon3s
Copy link
Contributor

@ianjon3s ianjon3s commented Oct 1, 2024

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

Copy link

github-actions bot commented Oct 1, 2024

Removed vultr server and associated DNS entries

@ianjon3s ianjon3s marked this pull request as ready for review October 2, 2024 09:41
@ianjon3s ianjon3s requested a review from a team October 2, 2024 09:41
@@ -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;
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great spot, updated 👍

Copy link
Member

@jessicamcinchak jessicamcinchak left a 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;
Copy link
Member

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}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice & clear !

@ianjon3s ianjon3s merged commit 013f0a8 into main Oct 2, 2024
12 checks passed
@ianjon3s ianjon3s deleted the ian/editor-sidebar-toggle branch October 2, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants