Skip to content

Commit

Permalink
Merge pull request #7015 from TerriaJS/regression-data-preview
Browse files Browse the repository at this point in the history
Fix missing add data instructions in explorer window
  • Loading branch information
nf-s authored Dec 18, 2023
2 parents bacc0b4 + d99afae commit 681cd89
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Remove deprecated default `relatedMaps`
- Update `thredds-catalog-crawler` to `0.0.6`
- `WebMapServiceCatalogItem` will drop problematic query parameters from `url` when calling `GetCapabilities` (eg `"styles","srs","crs","format"`)
- Fixed regression causing explorer window not to display instructions when first opened.
- [The next improvement]

#### 8.4.1 - 2023-12-08
Expand Down
42 changes: 23 additions & 19 deletions lib/ReactViews/Preview/DataPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,22 @@ class DataPreview extends React.Component {
</div>
);
} else if (chartData) {
<div className={Styles.previewInner}>
<h3 className={Styles.h3}>{previewed.name}</h3>
<p>{t("preview.doesNotContainGeospatialData")}</p>
<div className={Styles.previewChart}>
{/* TODO: Show a preview chart
return (
<div className={Styles.previewInner}>
<h3 className={Styles.h3}>{previewed.name}</h3>
<p>{t("preview.doesNotContainGeospatialData")}</p>
<div className={Styles.previewChart}>
{/* TODO: Show a preview chart
<Chart
data={chartData}
axisLabel={{ x: previewed.xAxis.units, y: undefined }}
height={250 - 34}
/>
*/}
</div>
<Description item={previewed} />
</div>
<Description item={previewed} />
</div>;
);
} else if (previewed && CatalogFunctionMixin.isMixedInto(previewed)) {
return (
<InvokeFunction
Expand All @@ -101,18 +103,20 @@ class DataPreview extends React.Component {
</div>
);
} else {
<div className={Styles.placeholder}>
<Trans i18nKey="preview.selectToPreview">
<p>Select a dataset to see a preview</p>
<p>- OR -</p>
<button
className={Styles.btnBackToMap}
onClick={() => this.backToMap()}
>
Go to the map
</button>
</Trans>
</div>;
return (
<div className={Styles.placeholder}>
<Trans i18nKey="preview.selectToPreview">
<p>Select a dataset to see a preview</p>
<p>- OR -</p>
<button
className={Styles.btnBackToMap}
onClick={() => this.backToMap()}
>
Go to the map
</button>
</Trans>
</div>
);
}
}

Expand Down

0 comments on commit 681cd89

Please sign in to comment.