-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GFF-184: update and rename list (#254)
* fix TS 5.6 build errors * refine icons and chackbox for datalist * delete list and remove dataset work * add TODO * add TODO
- Loading branch information
1 parent
6b30eb2
commit 64cd7c1
Showing
15 changed files
with
180 additions
and
136 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,5 @@ yarn-error.log* | |
|
||
# Ignore DevSpace cache and log folder | ||
.devspace/ | ||
|
||
.nx/cache |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build | ||
dist | ||
*.css | ||
setupTests.ts | ||
|
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
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
81 changes: 81 additions & 0 deletions
81
packages/frontend/src/features/DataLibrary/DatasetAccordianControl.tsx
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,81 @@ | ||
import { | ||
Accordion, | ||
AccordionControlProps, | ||
ActionIcon, | ||
Checkbox, | ||
CloseButton, | ||
Group, | ||
Text, | ||
TextInput, | ||
} from '@mantine/core'; | ||
import { useState } from 'react'; | ||
import { useDataLibrary } from '@gen3/core'; | ||
import { getHotkeyHandler } from '@mantine/hooks'; | ||
import { | ||
MdModeEditOutline as EditIcon, | ||
MdDelete as DeleteIcon, | ||
} from 'react-icons/md'; | ||
|
||
export const DatasetAccordianControl = ( | ||
props: AccordionControlProps & { | ||
id: string; | ||
listName: string; | ||
updateHandler: ( | ||
listId: string, | ||
update: Record<string, any>, | ||
) => Promise<void>; | ||
deleteListHandler: (listId: string) => Promise<void>; | ||
}, | ||
): JSX.Element => { | ||
const { id, listName, updateHandler, deleteListHandler } = props; | ||
const [value, setValue] = useState<string | undefined>(undefined); | ||
|
||
const handleSubmit = () => { | ||
updateHandler(id, { name: value }); | ||
setValue(undefined); | ||
}; | ||
|
||
return ( | ||
<div className="flex items-center"> | ||
<Checkbox /> | ||
<Accordion.Control {...props} className="w-4" /> | ||
<div className="flex justify-between w-full items-center ml-4"> | ||
{value ? ( | ||
<TextInput | ||
value={value} | ||
onChange={(e) => setValue(e.target.value)} | ||
onKeyDown={getHotkeyHandler([['Enter', handleSubmit]])} | ||
rightSection={ | ||
<CloseButton | ||
aria-label="Clear input" | ||
onClick={() => setValue(undefined)} | ||
style={{ display: value ? undefined : 'none' }} | ||
/> | ||
} | ||
/> | ||
) : ( | ||
<Group> | ||
{' '} | ||
<Text fw={600} className="ml-2" aria-label={listName}> | ||
{listName} | ||
</Text>{' '} | ||
<ActionIcon | ||
color="accent.4" | ||
aria-label="Change datalist name" | ||
onClick={() => setValue(listName)} | ||
> | ||
<EditIcon /> | ||
</ActionIcon> | ||
</Group> | ||
)} | ||
<ActionIcon | ||
color="accent.4" | ||
aria-label="delete datalist" | ||
onClick={() => deleteListHandler(id)} | ||
> | ||
<DeleteIcon /> | ||
</ActionIcon> | ||
</div> | ||
</div> | ||
); | ||
}; |
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,14 @@ | ||
# Data Library Tasks | ||
## v1 | ||
* create new list | ||
* select lists/datasets | ||
* show selected lists | ||
* show query expression in table | ||
* remove table headers for selecte/expand/actions | ||
* fix styling: | ||
* icon colors | ||
* layout | ||
* if no pagination hide table footer | ||
* default message when subtable is empty | ||
## v2 | ||
* show applicable actions to selection |
Oops, something went wrong.