-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Lint docs * Update package-lock * Update scripts * chore: Update spell checking dictionary * wip: Create community GitHub activity tab * wip: Update GH integration draft * wip: Update GitHub activity page * wip: Create GitHub board component * wip: Update components * wip: Update GitHub activity page & Format `common` * wip: Update GitHub activity page * chore: Inspect the whole `response` * wip: Update Git Board components * wip: Create GitHub ticket card component & Combine GitHub integration components into single entity * wip: Update GitHub integration components * wip: Rename bos-loader script * chore: Update package-lock * wip: Update GitHub integration components & Fix errors * wip: Fix errors in GH repo ticket card * wip: Enable active page indicator for GH activity page * wip: Update GH integration UI & Create common components * wip: Update GH integration UI & Make board config fetch function shared * chore: Use JSON strings for log * fix: Handle nullable props in a simpler way * fix: Resolve #123 (comment) * wip: Add global editor toggle & Update styles * wip: Update GH integration components * fix: Use correct reference path * fix: Update state correctly * wip: Add WIP label to the global editor toggle * fix: Broken column title update * wip: Use only 1 column in GH board config mock * chore: Remove TODO * wip: Update page name & Remove redundant code * chore: Ger rid of clunky names * wip: Create generic form handler & shared toggle GUI * wip: Update mocks & GUI & Fix errors * fix: Add gap between columns * fix: Broken horizontal scroll * chore: Change new column default title * fix: Don't use empty search terms * wip: Improve responsiveness * wip: Improve responsiveness * chore: Format * wip: Split shared code & Update form lib * chore: Remove irrelevant changes * wip: Use indexed columns & update GUI * wip: Update board config GUI * wip: Support most use cases with useForm * wip: Reduce functionalities for MVP * wip: Lock pull requests enabled * wip: Hide the global editor toggle * wip: Extract the feature into separate module & Update GUI & Update communities mock & Move communities mock to the appropriate module * wip: Pre-MVP * fix: Include column id into column data * wip: Replace OR labels search rule with AND * fix: Use full page URL * feat: Make columns deletable * Reset irrelevant changes * Reset irrelevant changes * Get ready to MVP release * chore: Use shorter task name * Apply code review remarks * chore: Clarify naming
- Loading branch information
1 parent
d21ba90
commit 0c2aebc
Showing
44 changed files
with
2,013 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/** | ||
*! TODO: Extract into separate library module | ||
*! once `useForm` is converted into a form factory widget | ||
*/ | ||
const traversalUpdate = ({ | ||
input, | ||
target: treeOrBranch, | ||
path: [currentBranchKey, ...remainingBranch], | ||
params, | ||
via: nodeUpdate, | ||
}) => ({ | ||
...treeOrBranch, | ||
|
||
[currentBranchKey]: | ||
remainingBranch.length > 0 | ||
? traversalUpdate({ | ||
input, | ||
|
||
target: | ||
typeof treeOrBranch[currentBranchKey] === "object" | ||
? treeOrBranch[currentBranchKey] | ||
: { | ||
...((treeOrBranch[currentBranchKey] ?? null) !== null | ||
? { __archivedLeaf__: treeOrBranch[currentBranchKey] } | ||
: {}), | ||
}, | ||
|
||
path: remainingBranch, | ||
via: nodeUpdate, | ||
}) | ||
: nodeUpdate({ | ||
input, | ||
lastKnownState: treeOrBranch[currentBranchKey], | ||
params, | ||
}), | ||
}); | ||
|
||
const fieldDefaultUpdate = ({ | ||
input, | ||
lastKnownState, | ||
params: { arrayDelimiter }, | ||
}) => { | ||
switch (typeof input) { | ||
case "boolean": | ||
return input; | ||
|
||
case "object": | ||
return Array.isArray(input) && typeof lastKnownState === "string" | ||
? input.join(arrayDelimiter ?? ",") | ||
: input; | ||
|
||
case "string": | ||
return Array.isArray(lastKnownState) | ||
? input.split(arrayDelimiter ?? ",").map((string) => string.trim()) | ||
: input; | ||
|
||
default: { | ||
if ((input ?? null) === null) { | ||
switch (typeof lastKnownState) { | ||
case "boolean": | ||
return !lastKnownState; | ||
|
||
default: | ||
return lastKnownState; | ||
} | ||
} else return input; | ||
} | ||
} | ||
}; | ||
|
||
const useForm = ({ stateKey: formStateKey }) => ({ | ||
formState: state[formStateKey], | ||
|
||
formUpdate: | ||
({ path: fieldPath, via: fieldCustomUpdate, ...params }) => | ||
(fieldInput) => | ||
State.update((lastKnownState) => | ||
traversalUpdate({ | ||
input: fieldInput?.target?.value ?? fieldInput, | ||
target: lastKnownState, | ||
path: [formStateKey, ...fieldPath], | ||
params, | ||
|
||
via: | ||
typeof fieldCustomUpdate === "function" | ||
? fieldCustomUpdate | ||
: fieldDefaultUpdate, | ||
}) | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const Card = styled.div` | ||
&:hover { | ||
box-shadow: rgba(3, 102, 214, 0.3) 0px 0px 0px 3px; | ||
} | ||
`; | ||
|
||
const CompactContainer = styled.div` | ||
width: fit-content !important; | ||
max-width: 100%; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const uuid = () => | ||
[Date.now().toString(16)] | ||
.concat( | ||
Array.from( | ||
{ length: 4 }, | ||
() => Math.floor(Math.random() * 0xffffffff) & 0xffffffff | ||
).map((value) => value.toString(16)) | ||
) | ||
.join("-"); | ||
|
||
const uuidIndexed = (data) => { | ||
const id = uuid(); | ||
|
||
return Object.fromEntries([[id, { ...data, id }]]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.