Skip to content
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
4 changes: 4 additions & 0 deletions packages/column-views/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format
is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.2] - 2025-06-26

- UnitDetailsPanel strat name and interval now clickable

## [2.1.1] - 2025-06-26

- Remove local reference
Expand Down
2 changes: 2 additions & 0 deletions packages/column-views/src/unit-details/panel.module.sass
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@
.sep
margin: 0 0.3em

.clickable
cursor: pointer
11 changes: 9 additions & 2 deletions packages/column-views/src/unit-details/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,14 @@ function UnitDetailsContent({
{
label: "Stratigraphic name",
},
h("span.strat-name-id", unit.strat_name_id),
h(
"span",
{
className: "strat-name-id" + (onClickItem ? " clickable" : ""),
onClick: (e) => onClickItem(e, { strat_name_id: unit.strat_name_id }),
},
unit.strat_name_id,
),
),
outcropField,
h.if(features.has(UnitDetailsFeature.AdjacentUnits))([
Expand Down Expand Up @@ -531,7 +538,7 @@ function IntervalProportions({ unit, onClickItem }) {

const handleClick = (event: MouseEvent) => {
if (onClickItem) {
onClickItem({ event, data: interval0 });
onClickItem(event, interval0);
}
};

Expand Down
6 changes: 5 additions & 1 deletion packages/column-views/stories/unit-details.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ function UnitDetailsExt({

return h(
LithologiesProvider,
h(UnitDetailsPanel, { onClickItem: (e) => console.log(e), unit, ...rest }),
h(UnitDetailsPanel, {
onClickItem: (e, data) => console.log(data),
unit,
...rest,
}),
);
}

Expand Down