Skip to content

Commit d99afae

Browse files
committed
Fix missing instructions and chartable item description in explorer window
1 parent 0f202bc commit d99afae

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Improve tsconfig files
99
- Update `thredds-catalog-crawler` to `0.0.6`
1010
- `WebMapServiceCatalogItem` will drop problematic query parameters from `url` when calling `GetCapabilities` (eg `"styles","srs","crs","format"`)
11+
- Fixed regression causing explorer window not to display instructions when first opened.
1112
- [The next improvement]
1213

1314
#### 8.4.1 - 2023-12-08

lib/ReactViews/Preview/DataPreview.jsx

+23-19
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,22 @@ class DataPreview extends React.Component {
6868
</div>
6969
);
7070
} else if (chartData) {
71-
<div className={Styles.previewInner}>
72-
<h3 className={Styles.h3}>{previewed.name}</h3>
73-
<p>{t("preview.doesNotContainGeospatialData")}</p>
74-
<div className={Styles.previewChart}>
75-
{/* TODO: Show a preview chart
71+
return (
72+
<div className={Styles.previewInner}>
73+
<h3 className={Styles.h3}>{previewed.name}</h3>
74+
<p>{t("preview.doesNotContainGeospatialData")}</p>
75+
<div className={Styles.previewChart}>
76+
{/* TODO: Show a preview chart
7677
<Chart
7778
data={chartData}
7879
axisLabel={{ x: previewed.xAxis.units, y: undefined }}
7980
height={250 - 34}
8081
/>
8182
*/}
83+
</div>
84+
<Description item={previewed} />
8285
</div>
83-
<Description item={previewed} />
84-
</div>;
86+
);
8587
} else if (previewed && CatalogFunctionMixin.isMixedInto(previewed)) {
8688
return (
8789
<InvokeFunction
@@ -101,18 +103,20 @@ class DataPreview extends React.Component {
101103
</div>
102104
);
103105
} else {
104-
<div className={Styles.placeholder}>
105-
<Trans i18nKey="preview.selectToPreview">
106-
<p>Select a dataset to see a preview</p>
107-
<p>- OR -</p>
108-
<button
109-
className={Styles.btnBackToMap}
110-
onClick={() => this.backToMap()}
111-
>
112-
Go to the map
113-
</button>
114-
</Trans>
115-
</div>;
106+
return (
107+
<div className={Styles.placeholder}>
108+
<Trans i18nKey="preview.selectToPreview">
109+
<p>Select a dataset to see a preview</p>
110+
<p>- OR -</p>
111+
<button
112+
className={Styles.btnBackToMap}
113+
onClick={() => this.backToMap()}
114+
>
115+
Go to the map
116+
</button>
117+
</Trans>
118+
</div>
119+
);
116120
}
117121
}
118122

0 commit comments

Comments
 (0)