a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

make outdentFull apply on meta-alt-L keyboard shortcut toggle in SelectionManager, and remove a couple console logs

+5 -6
+3 -1
components/SelectionManager.tsx
··· 9 9 import { useEntitySetContext } from "./EntitySetProvider"; 10 10 import { getBlocksWithType } from "src/hooks/queries/useBlocks"; 11 11 import { v7 } from "uuid"; 12 - import { indent, outdent } from "src/utils/list-operations"; 12 + import { indent, outdent, outdentFull } from "src/utils/list-operations"; 13 13 import { addShortcut } from "src/shortcuts"; 14 14 import { htmlToMarkdown } from "src/htmlMarkdownParsers"; 15 15 import { elementId } from "src/utils/elementId"; ··· 120 120 attribute: "block/is-list", 121 121 data: { type: "boolean", value: true }, 122 122 }); 123 + } else { 124 + outdentFull(block, rep); 123 125 } 124 126 } 125 127 },
+1 -2
components/Toolbar/ListToolbar.tsx
··· 54 54 data: { value: true, type: "boolean" }, 55 55 }); 56 56 } else { 57 - outdentFull(block, previousBlock, rep); 57 + outdentFull(block, rep); 58 58 } 59 - // props.setToolbarState("list"); 60 59 }} 61 60 > 62 61 <ListUnorderedSmall />
+1 -3
src/utils/list-operations.ts
··· 27 27 28 28 export function outdentFull( 29 29 block: Block, 30 - previousBlock: Block | null, 31 30 rep?: Replicache<ReplicacheMutators> | null, 32 31 ) { 33 - console.log("yo? ", block); 34 32 if (!block.listData) return; 35 33 36 34 // make this block not a list ··· 44 42 // If there are none or this block is a level 1 list item, we don't need to move anything 45 43 46 44 let after = block.listData?.path.find((f) => f.depth === 1)?.entity; 47 - console.log({ after }); 45 + 48 46 // move this block to be after that block 49 47 after && 50 48 after !== block.value &&