Skip to content

Commit e1888a7

Browse files
authored
Merge pull request #164 from UW-Macrostrat/info-panel
Location details update
2 parents 8eb6e09 + d1ca895 commit e1888a7

File tree

5 files changed

+9
-30
lines changed

5 files changed

+9
-30
lines changed

packages/map-interface/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ All notable changes to this project will be documented in this file. The format
44
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
55
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.5.6] - 2025-08-01
8+
9+
- Fossils component just show data, not panel
10+
- Better error handling for components
11+
712
## [1.5.5] - 2025-08-01
813

9-
- MAcrostrat linked data error handling
14+
- Macrostrat linked data error handling
1015

1116
## [1.5.4] - 2025-07-31
1217

packages/map-interface/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macrostrat/map-interface",
3-
"version": "1.5.5",
3+
"version": "1.5.6",
44
"description": "Map interface for Macrostrat",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm/index.js",
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import h from "@macrostrat/hyper";
2-
import { ExpansionPanel } from "@macrostrat/map-interface";
32
import PBDBCollections from "./collections";
43

54
export function FossilCollections(props) {
@@ -8,14 +7,5 @@ export function FossilCollections(props) {
87
if (!data || data.length <= 0) {
98
return null;
109
}
11-
return h(
12-
ExpansionPanel,
13-
{
14-
className: "regional-panel",
15-
title: "Fossil collections",
16-
helpText: "via PBDB",
17-
expanded,
18-
},
19-
[h(PBDBCollections, { data })],
20-
);
10+
return h(PBDBCollections, { data });
2111
}

packages/map-interface/src/location-details/location-details.stories.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ export function RegionalStratigraphyExample() {
2626
const mapInfo = fetchMapInfo(lng, lat, zoom);
2727
const columnInfo = fetchColumnInfo(lng, lat);
2828

29-
if (!mapInfo || !mapInfo.mapData) {
30-
return null;
31-
}
32-
3329
return h(RegionalStratigraphy, {
3430
mapInfo,
3531
columnInfo,
@@ -41,10 +37,6 @@ export function RegionalStratigraphyExample() {
4137
export function PhysiographyExample() {
4238
const mapInfo = fetchMapInfo(lng, lat, zoom);
4339

44-
if (!mapInfo) {
45-
return null;
46-
}
47-
4840
return h(Physiography, {
4941
mapInfo,
5042
expanded: true,
@@ -54,10 +46,6 @@ export function PhysiographyExample() {
5446
export function MacrostratLinkedDataExample() {
5547
const mapInfo = fetchMapInfo(lng, lat, zoom);
5648

57-
if (!mapInfo) {
58-
return null;
59-
}
60-
6149
const source =
6250
mapInfo && mapInfo?.mapData && mapInfo?.mapData.length
6351
? mapInfo?.mapData[0]
@@ -96,9 +84,5 @@ export function xddInfoExample() {
9684
export function FossilsExample() {
9785
const fossilInfo = fetchFossilInfo(-89.3938453, 43.0735407);
9886

99-
if (!fossilInfo) {
100-
return null;
101-
}
102-
10387
return h(FossilCollections, { data: fossilInfo, expanded: true });
10488
}

packages/map-interface/src/location-details/macrostrat-linked.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function MacrostratLinkedData(props) {
2424
expanded = true,
2525
} = props;
2626

27-
if (!mapInfo.mapData[0]) return h("div");
27+
if (!mapInfo.mapData[0]) return null;
2828

2929
return h(
3030
ExpansionPanel,

0 commit comments

Comments
 (0)