this repo has no description
2
fork

Configure Feed

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

feat: done command parsing

starting to come together
I realized I'm going to have to seperate selection and filter state
And do actions based on that, some how show that different context
depending on which action is selected

+29 -21
+8
mast-react-vite/src/App.tsx
··· 85 85 const todos = useQuery(ctx, "SELECT * FROM todos where completed = 0").data; 86 86 const [newText, setNewText] = useState(""); 87 87 const [rowSelection, setRowSelection] = useState({}); 88 + // TODO: 89 + // We need to seperate selection state 90 + // From filter state 91 + // Since we don't want selection to impact filter when we're filtering 92 + // We want add to our selection state while we filter 93 + // But selection state should apply to modify and done 94 + // (but probably not add?) 95 + const [selectionContext, setSelectionContext] = useState({}); 88 96 const [currentAction, setCurrentAction] = useState("add"); 89 97 90 98 const handleActionChange = (action: string) => {
+10 -10
mast-react-vite/src/lib/command_parser.js
··· 1 - // @generated by Peggy 4.1.1. 1 + // @generated by Peggy 4.2.0. 2 2 // 3 3 // https://peggyjs.org/ 4 4 ··· 533 533 var s0, s1, s2, s3, s4; 534 534 535 535 s0 = peg$currPos; 536 - s1 = peg$parseFilters(); 536 + if (input.substr(peg$currPos, 4) === peg$c1) { 537 + s1 = peg$c1; 538 + peg$currPos += 4; 539 + } else { 540 + s1 = peg$FAILED; 541 + if (peg$silentFails === 0) { peg$fail(peg$e1); } 542 + } 537 543 if (s1 !== peg$FAILED) { 538 544 s2 = peg$parse_(); 539 545 if (s2 !== peg$FAILED) { 540 - if (input.substr(peg$currPos, 4) === peg$c1) { 541 - s3 = peg$c1; 542 - peg$currPos += 4; 543 - } else { 544 - s3 = peg$FAILED; 545 - if (peg$silentFails === 0) { peg$fail(peg$e1); } 546 - } 546 + s3 = peg$parseFilters(); 547 547 if (s3 !== peg$FAILED) { 548 548 s4 = peg$parseEOF(); 549 549 if (s4 !== peg$FAILED) { 550 550 peg$savedPos = s0; 551 - s0 = peg$f1(s1); 551 + s0 = peg$f1(s3); 552 552 } else { 553 553 peg$currPos = s0; 554 554 s0 = peg$FAILED;
+1 -1
parser/command_js.peg
··· 59 59 } 60 60 61 61 // DONE COMMAND 62 - DoneCommand = filters:Filters _ "done" EOF { 62 + DoneCommand = "done" _ filters:Filters EOF { 63 63 return makeCommand('done', filters, null); 64 64 } 65 65
+10 -10
parser/command_parser.js
··· 1 - // @generated by Peggy 4.1.1. 1 + // @generated by Peggy 4.2.0. 2 2 // 3 3 // https://peggyjs.org/ 4 4 ··· 533 533 var s0, s1, s2, s3, s4; 534 534 535 535 s0 = peg$currPos; 536 - s1 = peg$parseFilters(); 536 + if (input.substr(peg$currPos, 4) === peg$c1) { 537 + s1 = peg$c1; 538 + peg$currPos += 4; 539 + } else { 540 + s1 = peg$FAILED; 541 + if (peg$silentFails === 0) { peg$fail(peg$e1); } 542 + } 537 543 if (s1 !== peg$FAILED) { 538 544 s2 = peg$parse_(); 539 545 if (s2 !== peg$FAILED) { 540 - if (input.substr(peg$currPos, 4) === peg$c1) { 541 - s3 = peg$c1; 542 - peg$currPos += 4; 543 - } else { 544 - s3 = peg$FAILED; 545 - if (peg$silentFails === 0) { peg$fail(peg$e1); } 546 - } 546 + s3 = peg$parseFilters(); 547 547 if (s3 !== peg$FAILED) { 548 548 s4 = peg$parseEOF(); 549 549 if (s4 !== peg$FAILED) { 550 550 peg$savedPos = s0; 551 - s0 = peg$f1(s1); 551 + s0 = peg$f1(s3); 552 552 } else { 553 553 peg$currPos = s0; 554 554 s0 = peg$FAILED;