Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade findable and allow toggling all columns (#203, #204) #205

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const AnalyzeGenome = ({
>
{analyze.label}
</Button>
<DropdownMenu {...MENU_PROPS} Button={renderButton}>
<DropdownMenu {...MENU_PROPS} button={renderButton}>
{({ closeMenu }): JSX.Element[] =>
views.map((view, i) => (
<MenuItem
Expand Down
155 changes: 150 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build-brc-db": "esrun files/build-catalog.ts"
},
"dependencies": {
"@databiosphere/findable-ui": "15.0.2",
"@databiosphere/findable-ui": "^21.0.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mdx-js/loader": "^3.0.1",
Expand Down
61 changes: 32 additions & 29 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type { AppProps } from "next/app";
import { StyledFooter } from "../app/components/Layout/components/Footer/footer.styles";
import { config } from "../app/config/config";
import { mergeAppTheme } from "../app/theme/theme";
import { GoogleSignInAuthenticationProvider } from "@databiosphere/findable-ui/lib/providers/googleSignInAuthentication/provider";

const DEFAULT_ENTITY_LIST_TYPE = "organisms";

Expand Down Expand Up @@ -60,35 +61,37 @@ function MyApp({ Component, pageProps }: AppPropsWithComponent): JSX.Element {
<Head pageTitle={pageTitle} />
<CssBaseline />
<SystemStatusProvider>
<LayoutStateProvider>
<AppLayout>
<DXHeader {...header} />
<ExploreStateProvider entityListType={entityListType}>
<Main>
<ErrorBoundary
fallbackRender={({
error,
reset,
}: {
error: DataExplorerError;
reset: () => void;
}): JSX.Element => (
<Error
errorMessage={error.message}
requestUrlMessage={error.requestUrlMessage}
rootPath={redirectRootToPath}
onReset={reset}
/>
)}
>
<Component {...pageProps} />
<Floating {...floating} />
</ErrorBoundary>
</Main>
</ExploreStateProvider>
<StyledFooter {...footer} />
</AppLayout>
</LayoutStateProvider>
<GoogleSignInAuthenticationProvider>
<LayoutStateProvider>
<AppLayout>
<DXHeader {...header} />
<ExploreStateProvider entityListType={entityListType}>
<Main>
<ErrorBoundary
fallbackRender={({
error,
reset,
}: {
error: DataExplorerError;
reset: () => void;
}): JSX.Element => (
<Error
errorMessage={error.message}
requestUrlMessage={error.requestUrlMessage}
rootPath={redirectRootToPath}
onReset={reset}
/>
)}
>
<Component {...pageProps} />
<Floating {...floating} />
</ErrorBoundary>
</Main>
</ExploreStateProvider>
<StyledFooter {...footer} />
</AppLayout>
</LayoutStateProvider>
</GoogleSignInAuthenticationProvider>
</SystemStatusProvider>
</DXConfigProvider>
</ThemeProvider>
Expand Down
15 changes: 11 additions & 4 deletions site-config/brc-analytics/local/index/genomeEntityConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const genomeEntityConfig: BRCEntityConfig<BRCDataCatalogGenome> = {
component: C.AnalyzeGenome,
viewBuilder: V.buildAnalyzeGenome,
} as ComponentConfig<typeof C.AnalyzeGenome, BRCDataCatalogGenome>,
disableSorting: true,
enableSorting: false,
header: BRC_DATA_CATALOG_CATEGORY_LABEL.ANALYZE_GENOME,
id: BRC_DATA_CATALOG_CATEGORY_KEY.ANALYZE_GENOME,
width: "auto",
Expand Down Expand Up @@ -145,9 +145,16 @@ export const genomeEntityConfig: BRCEntityConfig<BRCDataCatalogGenome> = {
width: { max: "0.5fr", min: "142px" },
},
],
defaultSort: {
desc: SORT_DIRECTION.ASCENDING,
id: BRC_DATA_CATALOG_CATEGORY_KEY.SPECIES,
tableOptions: {
initialState: {
columnVisibility: {},
sorting: [
{
desc: SORT_DIRECTION.ASCENDING,
id: BRC_DATA_CATALOG_CATEGORY_KEY.SPECIES,
},
],
},
},
} as ListConfig<BRCDataCatalogGenome>,
listView: {
Expand Down
Loading