feat: Add reordering to starred documents (#2953)

* draft

* reordering

* JIT Index stars on first load

* test

* Remove unused code on client

* small unrefactor
This commit is contained in:
Tom Moor
2022-01-21 18:11:50 -08:00
committed by GitHub
parent 49533d7a3f
commit 79e2cad5b9
32 changed files with 931 additions and 132 deletions

View File

@@ -4,27 +4,26 @@ import styled from "styled-components";
function DropCursor({
isActiveDrop,
innerRef,
from,
position,
}: {
isActiveDrop: boolean;
innerRef: React.Ref<HTMLDivElement>;
from?: string;
position?: "top";
}) {
return <Cursor isOver={isActiveDrop} ref={innerRef} from={from} />;
return <Cursor isOver={isActiveDrop} ref={innerRef} position={position} />;
}
// transparent hover zone with a thin visible band vertically centered
const Cursor = styled.div<{ isOver?: boolean; from?: string }>`
const Cursor = styled.div<{ isOver?: boolean; position?: "top" }>`
opacity: ${(props) => (props.isOver ? 1 : 0)};
transition: opacity 150ms;
position: absolute;
z-index: 1;
width: 100%;
height: 14px;
${(props) => (props.from === "collections" ? "top: 25px;" : "bottom: -7px;")}
background: transparent;
${(props) => (props.position === "top" ? "top: 25px;" : "bottom: -7px;")}
::after {
background: ${(props) => props.theme.slateDark};