diff --git a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.scss b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.scss index 4b47e33faef21..e127be6a3eb17 100644 --- a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.scss +++ b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.scss @@ -32,18 +32,26 @@ max-width: calc(100vw - 2rem); width: 50rem; // This will be controlable pointer-events: all; - display: flex; flex-direction: column; - border-radius: var(--radius); - background-color: var(--bg-light); - border: 1px solid var(--border-3000); - transition: transform var(--notebook-popover-transition-properties), box-shadow 150ms linear, - width var(--notebook-popover-transition-properties); + overflow: hidden; // Transition properties that are overwritten transform: translateX(calc(100% + 1rem)); - box-shadow: 0px 16px 16px rgba(0, 0, 0, 0); + transition: transform var(--notebook-popover-transition-properties), + width var(--notebook-popover-transition-properties); + + .NotebookPopover__content__card { + flex: 1; + display: flex; + flex-direction: column; + border-radius: var(--radius); + background-color: var(--bg-light); + border: 1px solid var(--border-3000); + box-shadow: 0px 16px 16px rgba(0, 0, 0, 0); + transition: box-shadow 150ms linear; + overflow: hidden; + } } &--visible { @@ -54,7 +62,9 @@ .NotebookPopover__content { transform: translateX(0); - box-shadow: 0px 16px 16px rgba(0, 0, 0, 0.15); + .NotebookPopover__content__card { + box-shadow: 0px 16px 16px rgba(0, 0, 0, 0.15); + } } } @@ -62,7 +72,9 @@ .NotebookPopover__content { transition: none; // NOTE: This shouldn't be none as it affects other transitions transform: translateX(calc(100% - 5rem)); - box-shadow: 0px 16px 16px rgba(0, 0, 0, 0.15); + .NotebookPopover__content__card { + box-shadow: 0px 16px 16px rgba(0, 0, 0, 0.15); + } } } diff --git a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx index ccf4f3c7e74a3..88a3af6caaf9b 100644 --- a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx +++ b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx @@ -14,7 +14,7 @@ import { notebookLogic } from './notebookLogic' import { urls } from 'scenes/urls' export function NotebookPopover(): JSX.Element { - const { visibility, shownAtLeastOnce, fullScreen, selectedNotebook, initialAutofocus, dropProperties } = + const { visibility, shownAtLeastOnce, fullScreen, selectedNotebook, initialAutofocus, dropProperties, dropMode } = useValues(notebookPopoverLogic) const { setVisibility, setFullScreen, selectNotebook, setElementRef } = useActions(notebookPopoverLogic) const { createNotebook } = useActions(notebooksModel) @@ -66,59 +66,67 @@ export function NotebookPopover(): JSX.Element { onClick={visibility !== 'visible' ? () => setVisibility('visible') : undefined} {...dropProperties} > -
- - selectNotebook(notebook.short_id)} - onNewNotebook={() => createNotebook()} - /> - - - {selectedNotebook && } + {dropMode ? ( +
+

Wat

+
+ ) : null} - setVisibility('hidden')} - status="primary-alt" - icon={} - tooltip="Go to Notebook" - tooltipPlacement="left" - /> +
+
+ + selectNotebook(notebook.short_id)} + onNewNotebook={() => createNotebook()} + /> + + + {selectedNotebook && } - + setVisibility('hidden')} + status="primary-alt" + icon={} + tooltip="Go to Notebook" + tooltipPlacement="left" + /> - setFullScreen(!fullScreen)} - status="primary-alt" - active={fullScreen} - icon={} - tooltip="Toggle full screen" - tooltipPlacement="left" - /> + - setVisibility('hidden')} - status="primary-alt" - icon={} - tooltip="Hide Notebook Sidebar" - tooltipPlacement="left" - /> - -
+ setFullScreen(!fullScreen)} + status="primary-alt" + active={fullScreen} + icon={} + tooltip="Toggle full screen" + tooltipPlacement="left" + /> -
- {shownAtLeastOnce && ( - - )} + setVisibility('hidden')} + status="primary-alt" + icon={} + tooltip="Hide Notebook Sidebar" + tooltipPlacement="left" + /> + +
+ +
+ {shownAtLeastOnce && ( + + )} +