Skip to content

Commit

Permalink
Adds option to hide dataset explore button
Browse files Browse the repository at this point in the history
  • Loading branch information
nerik committed Sep 21, 2023
1 parent dba8c2b commit 6e6f341
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
23 changes: 14 additions & 9 deletions app/scripts/components/datasets/s-overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ function DatasetsOverview() {
parentTo: DATASETS_PATH,
items: allDatasetsProps,
currentId: dataset.data.id,
localMenuCmp: <DatasetsLocalMenu dataset={dataset} />
localMenuCmp:
dataset?.data.disableExplore !== true ? (
<DatasetsLocalMenu dataset={dataset} />
) : null
}}
/>

Expand All @@ -53,7 +56,8 @@ function DatasetsOverview() {
title={`${dataset.data.name} Overview`}
description={dataset.data.description}
renderBetaBlock={() => (
<PageActions>
<PageActions>
{dataset?.data.disableExplore !== true && (
<Button
forwardedAs={Link}
to={getDatasetExplorePath(dataset.data)}
Expand All @@ -63,13 +67,14 @@ function DatasetsOverview() {
<CollecticonCompass />
Explore data
</Button>
<NotebookConnectButton
dataset={dataset.data}
size='large'
compact={false}
variation='achromic-outline'
/>
</PageActions>
)}
<NotebookConnectButton
dataset={dataset.data}
size='large'
compact={false}
variation='achromic-outline'
/>
</PageActions>
)}
renderDetailsBlock={() => (
<>
Expand Down
6 changes: 6 additions & 0 deletions docs/content/CONTENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ media: Media
thematics: string[]
sources: string[]
featured: boolean
disableExplore: boolean

layers: Layer[]
related: Related[]
Expand Down Expand Up @@ -109,6 +110,11 @@ taxonomy:
Whether this dataset is featured
![](./media/fm-featured-dataset.png)

**disableExplore**
`boolean`
When set to true, the 'explore data' section won't be available for this dataset.


**layers**
`Layer[]`
List of layers for this dataset. See [layer.md](./frontmatter/layer.md).
Expand Down
1 change: 1 addition & 0 deletions parcel-resolver-veda/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ declare module 'veda' {
media?: Media;
layers: DatasetLayer[];
related?: RelatedContentData[];
disableExplore?: boolean;
}

// ///////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 6e6f341

Please sign in to comment.