Skip to content

Commit

Permalink
Started addig the side panel
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Oct 26, 2023
1 parent 4c0a619 commit 05da3d3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/layout/navigation-3000/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { NotebookPopover } from 'scenes/notebooks/Notebook/NotebookPopover'
import { Scene, SceneConfig } from 'scenes/sceneTypes'
import { FlaggedFeature } from 'lib/components/FlaggedFeature'
import { FEATURE_FLAGS } from 'lib/constants'
import { SidePanel } from './sidepanel/SidePanel'

export function Navigation({
children,
Expand Down Expand Up @@ -47,6 +48,7 @@ export function Navigation({
{children}
</div>
</main>
<SidePanel />
<CommandPalette />
</div>
)
Expand Down
24 changes: 24 additions & 0 deletions frontend/src/layout/navigation-3000/sidepanel/SidePanel.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.SidePanel3000 {
flex: 0 0 3rem;
border-left: 1px solid transparent; // This is just for sizing, the visible border is on the content
box-sizing: content-box;
z-index: var(--z-main-nav);

.LemonButton {
min-height: 2.25rem !important; // Reduce minimum height
}
}

.SidePanel3000__content {
position: fixed;
top: 0;
right: 0;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100vh;
width: 3rem;
border-left-width: 1px;
background: var(--accent-3000);
overflow-y: auto;
}
19 changes: 19 additions & 0 deletions frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { LemonButton } from '@posthog/lemon-ui'
import './SidePanel.scss'
import { IconComment, IconNotebook } from 'lib/lemon-ui/icons'

export function SidePanel(): JSX.Element {
return (
<nav className="SidePanel3000">
<div className="SidePanel3000__content">
<div className="SidePanel3000__top">
<div className="rotate-90 flex items-center gap-2 px-2">
<LemonButton icon={<IconNotebook className="rotate-270" />}>Notebooks</LemonButton>
<LemonButton icon={<IconComment className="rotate-270" />}>Feedback</LemonButton>
</div>
</div>
<div className="SidePanel3000__bottom"></div>
</div>
</nav>
)
}

0 comments on commit 05da3d3

Please sign in to comment.