From 7f2d2cadb78e34a12bc44ee0fb1dcf0ba073ee49 Mon Sep 17 00:00:00 2001 From: celine Date: Wed, 14 Jan 2026 23:26:05 -0500 Subject: [PATCH] Lock is GONE YO --- .github/pull_request_template.md | 1 - components/Blocks/Block.tsx | 33 +----- .../Blocks/BlueskyPostBlock/BlueskyEmpty.tsx | 4 +- components/Blocks/ButtonBlock.tsx | 5 +- components/Blocks/DateTimeBlock.tsx | 5 +- components/Blocks/EmbedBlock.tsx | 4 +- components/Blocks/ExternalLinkBlock.tsx | 4 +- components/Blocks/ImageBlock.tsx | 5 +- components/Blocks/TextBlock/index.tsx | 10 +- components/Blocks/index.tsx | 4 +- components/Blocks/useBlockKeyboardHandlers.ts | 15 +-- components/Toolbar/LockBlockButton.tsx | 103 ------------------ components/Toolbar/MultiSelectToolbar.tsx | 8 +- components/Toolbar/TextToolbar.tsx | 3 - components/Toolbar/index.tsx | 11 +- src/replicache/mutations.ts | 5 - 16 files changed, 24 insertions(+), 196 deletions(-) delete mode 100644 components/Toolbar/LockBlockButton.tsx diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 127a7e34..441bf8f4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,5 +2,4 @@ Before you pull, have you made sure... - it looks good on both mobile and desktop - it undo's like it ought to - it handles keyboard interactions reasonably well -- it behaves as you would expect if you lock it - no build errors!!! diff --git a/components/Blocks/Block.tsx b/components/Blocks/Block.tsx index 6fc97a4f..62cefd38 100644 --- a/components/Blocks/Block.tsx +++ b/components/Blocks/Block.tsx @@ -334,7 +334,6 @@ export const BlockMultiselectIndicator = (props: BlockProps) => { let isSelected = useUIState((s) => s.selectedBlocks.find((b) => b.value === props.entityID), ); - let isLocked = useEntity(props.value, "block/is-locked"); let nextBlockSelected = useUIState((s) => s.selectedBlocks.find((b) => b.value === props.nextBlock?.value), @@ -343,10 +342,7 @@ export const BlockMultiselectIndicator = (props: BlockProps) => { s.selectedBlocks.find((b) => b.value === props.previousBlock?.value), ); - if (isMultiselected || (isLocked?.data.value && isSelected)) - // not sure what multiselected and selected classes are doing (?) - // use a hashed pattern for locked things. show this pattern if the block is selected, even if it isn't multiselected - + if (isMultiselected) return ( <>
{ ${!prevBlockSelected && "rounded-t-md"} ${!nextBlockSelected && "rounded-b-md"} `} - style={ - isLocked?.data.value - ? { - maskImage: "var(--hatchSVG)", - maskRepeat: "repeat repeat", - } - : {} - } - >
- {isLocked?.data.value && ( -
- -
- )} + /> ); }; diff --git a/components/Blocks/BlueskyPostBlock/BlueskyEmpty.tsx b/components/Blocks/BlueskyPostBlock/BlueskyEmpty.tsx index 33a427ac..2e4703a9 100644 --- a/components/Blocks/BlueskyPostBlock/BlueskyEmpty.tsx +++ b/components/Blocks/BlueskyPostBlock/BlueskyEmpty.tsx @@ -18,7 +18,6 @@ export const BlueskyPostEmpty = (props: BlockProps) => { let isSelected = useUIState((s) => s.selectedBlocks.find((b) => b.value === props.entityID), ); - let isLocked = useEntity(props.entityID, "block/is-locked")?.data.value; let entity_set = useEntitySetContext(); let [urlValue, setUrlValue] = useState(""); @@ -91,7 +90,6 @@ export const BlueskyPostEmpty = (props: BlockProps) => { className="w-full grow border-none outline-hidden bg-transparent " placeholder="bsky.app/post-url" value={urlValue} - disabled={isLocked} onChange={(e) => setUrlValue(e.target.value)} onKeyDown={(e) => { if (e.key === "Enter") { @@ -109,7 +107,7 @@ export const BlueskyPostEmpty = (props: BlockProps) => {