mirror of https://github.com/buster-so/buster.git
DRAMATIC CHANGE TO LAYOUT
This commit is contained in:
parent
d305e72b5a
commit
9149b0cfaa
|
@ -32,7 +32,7 @@ export const AppPageLayout: React.FC<
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex h-full w-full flex-col overflow-hidden',
|
'app-page-layout flex h-full w-full flex-col overflow-hidden',
|
||||||
scrollable && 'overflow-y-auto',
|
scrollable && 'overflow-y-auto',
|
||||||
className
|
className
|
||||||
)}>
|
)}>
|
||||||
|
|
|
@ -11,6 +11,8 @@ export const AppPageLayoutContent: React.FC<
|
||||||
const Selector = scrollable ? ScrollArea : 'main';
|
const Selector = scrollable ? ScrollArea : 'main';
|
||||||
const ChildSelector = scrollable ? 'main' : React.Fragment;
|
const ChildSelector = scrollable ? 'main' : React.Fragment;
|
||||||
|
|
||||||
|
console.log('scrollable', scrollable);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Selector className={cn('bg-page-background app-content h-full max-h-[100%] p-0', className)}>
|
<Selector className={cn('bg-page-background app-content h-full max-h-[100%] p-0', className)}>
|
||||||
<ChildSelector>{children}</ChildSelector>
|
<ChildSelector>{children}</ChildSelector>
|
||||||
|
|
|
@ -18,6 +18,8 @@ export const CollectionListController: React.FC = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppPageLayout
|
<AppPageLayout
|
||||||
|
className="swagswagswag"
|
||||||
|
scrollable={false}
|
||||||
header={
|
header={
|
||||||
<CollectionListHeader
|
<CollectionListHeader
|
||||||
setOpenNewCollectionModal={setOpenNewCollectionModal}
|
setOpenNewCollectionModal={setOpenNewCollectionModal}
|
||||||
|
|
|
@ -36,13 +36,11 @@ export const CollectionsListContent: React.FC<{
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppPageLayoutContent>
|
|
||||||
<CollectionList
|
<CollectionList
|
||||||
collectionsList={collectionsList}
|
collectionsList={collectionsList}
|
||||||
setOpenNewCollectionModal={setOpenNewCollectionModal}
|
setOpenNewCollectionModal={setOpenNewCollectionModal}
|
||||||
loadedCollections={isCollectionListFetched}
|
loadedCollections={isCollectionListFetched}
|
||||||
/>
|
/>
|
||||||
</AppPageLayoutContent>
|
|
||||||
|
|
||||||
<NewCollectionModal
|
<NewCollectionModal
|
||||||
open={openNewCollectionModal}
|
open={openNewCollectionModal}
|
||||||
|
|
|
@ -78,7 +78,6 @@ export const DatasetListContent: React.FC<{
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppPageLayoutContent>
|
|
||||||
<BusterList
|
<BusterList
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rows={rows}
|
rows={rows}
|
||||||
|
@ -105,7 +104,6 @@ export const DatasetListContent: React.FC<{
|
||||||
selectedRowKeys={selectedRowKeys}
|
selectedRowKeys={selectedRowKeys}
|
||||||
onSelectChange={setSelectedRowKeys}
|
onSelectChange={setSelectedRowKeys}
|
||||||
/>
|
/>
|
||||||
</AppPageLayoutContent>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -64,10 +64,7 @@ export const TermIndividualContent: React.FC<{
|
||||||
}, [term?.name, term?.definition]);
|
}, [term?.name, term?.definition]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppPageLayoutContent className="overflow-auto p-8">
|
<>
|
||||||
{loadingSelectedTerm ? (
|
|
||||||
<SkeletonLoader />
|
|
||||||
) : (
|
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div className="flex justify-between space-x-3">
|
<div className="flex justify-between space-x-3">
|
||||||
<div className="mb-5 flex flex-col space-y-0.5">
|
<div className="mb-5 flex flex-col space-y-0.5">
|
||||||
|
@ -143,15 +140,10 @@ export const TermIndividualContent: React.FC<{
|
||||||
</ItemContainer>
|
</ItemContainer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</>
|
||||||
</AppPageLayoutContent>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const SkeletonLoader: React.FC = () => {
|
|
||||||
return <div className="p-4">{/* <Skeleton /> */}</div>;
|
|
||||||
};
|
|
||||||
|
|
||||||
const MoreDropdown: React.FC<{ termId: string }> = ({ termId }) => {
|
const MoreDropdown: React.FC<{ termId: string }> = ({ termId }) => {
|
||||||
const { mutateAsync: deleteTerm, isPending: isPendingDeleteTerm } = useDeleteTerm();
|
const { mutateAsync: deleteTerm, isPending: isPendingDeleteTerm } = useDeleteTerm();
|
||||||
const onChangePage = useAppLayoutContextSelector((s) => s.onChangePage);
|
const onChangePage = useAppLayoutContextSelector((s) => s.onChangePage);
|
||||||
|
|
|
@ -66,7 +66,7 @@ export const TermsListController: React.FC<{
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppPageLayoutContent>
|
<>
|
||||||
<BusterList
|
<BusterList
|
||||||
rows={rows}
|
rows={rows}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
@ -90,7 +90,7 @@ export const TermsListController: React.FC<{
|
||||||
selectedRowKeys={selectedTermIds}
|
selectedRowKeys={selectedTermIds}
|
||||||
onSelectChange={setSelectedTermIds}
|
onSelectChange={setSelectedTermIds}
|
||||||
/>
|
/>
|
||||||
</AppPageLayoutContent>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue