Skip to content

Commit

Permalink
chore(3000): remove notebook popover (#19537)
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr authored Jan 9, 2024
1 parent 35f5fb1 commit bde38d3
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 498 deletions.
Binary file modified frontend/__snapshots__/lemon-ui-icons--shelf-s--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/lemon-ui-icons--shelf-s--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions frontend/src/layout/navigation/SideBar/SideBar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ActivationSidebar } from 'lib/components/ActivationSidebar/ActivationSidebar'
import { NotebookPopover } from 'scenes/notebooks/NotebookPanel/NotebookPopover'
import { DebugNotice } from 'lib/components/DebugNotice'

export function SideBar(): JSX.Element {
return (
<div>
<NotebookPopover />
<DebugNotice />
<ActivationSidebar />
</div>
)
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/lib/lemon-ui/icons/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1451,18 +1451,6 @@ export function IconLockOpen(props: LemonIconProps): JSX.Element {
)
}

/** Material Design Share icon. */
export function IconShare(props: LemonIconProps): JSX.Element {
return (
<LemonIconBase {...props}>
<path
d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92c0-1.61-1.31-2.92-2.92-2.92zM18 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 7.02c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"
fill="currentColor"
/>
</LemonIconBase>
)
}

/** Material Design Delete Forever icon. */
export function IconDeleteForever(props: LemonIconProps): JSX.Element {
return (
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/scenes/notebooks/Notebook/Notebook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,14 @@
transform: translateX(-100%);
}

.NotebookScene &,
.NotebookPopover & {
.NotebookScene & {
--notebook-sidebar-height: calc(100vh - 11rem);

.NotebookColumn__padding {
// Account for fixed title
height: 4rem;
}
}

.NotebookScene & {
.NotebookColumn__content {
// Account for static header
top: 4rem;
Expand Down
141 changes: 0 additions & 141 deletions frontend/src/scenes/notebooks/NotebookPanel/NotebookPopover.scss

This file was deleted.

160 changes: 0 additions & 160 deletions frontend/src/scenes/notebooks/NotebookPanel/NotebookPopover.tsx

This file was deleted.

21 changes: 4 additions & 17 deletions frontend/src/scenes/notebooks/NotebookPanel/notebookPanelLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,12 @@ import { NotebookNodeResource, SidePanelTab } from '~/types'

import { EditorFocusPosition } from '../Notebook/utils'
import type { notebookPanelLogicType } from './notebookPanelLogicType'
import { notebookPopoverLogic } from './notebookPopoverLogic'

export const notebookPanelLogic = kea<notebookPanelLogicType>([
path(['scenes', 'notebooks', 'Notebook', 'notebookPanelLogic']),
connect({
values: [
sidePanelStateLogic,
['sidePanelOpen', 'selectedTab'],
featureFlagLogic,
['featureFlags'],
notebookPopoverLogic,
['popoverVisibility'],
],
actions: [
sidePanelStateLogic,
['openSidePanel', 'closeSidePanel'],
notebookPopoverLogic,
['setPopoverVisibility'],
],
values: [sidePanelStateLogic, ['sidePanelOpen', 'selectedTab'], featureFlagLogic, ['featureFlags']],
actions: [sidePanelStateLogic, ['openSidePanel', 'closeSidePanel']],
}),
actions({
selectNotebook: (id: string, options: { autofocus?: EditorFocusPosition; silent?: boolean } = {}) => ({
Expand Down Expand Up @@ -70,8 +57,8 @@ export const notebookPanelLogic = kea<notebookPanelLogicType>([

selectors(({ cache, actions }) => ({
visibility: [
(s) => [s.selectedTab, s.sidePanelOpen, s.popoverVisibility],
(selectedTab, sidePanelOpen): 'hidden' | 'peek' | 'visible' => {
(s) => [s.selectedTab, s.sidePanelOpen],
(selectedTab, sidePanelOpen): 'hidden' | 'visible' => {
return selectedTab === SidePanelTab.Notebooks && sidePanelOpen ? 'visible' : 'hidden'
},
],
Expand Down
Loading

0 comments on commit bde38d3

Please sign in to comment.