docs(shipwrecks): describe the layer on its own, not by a layer that is not on main

Air accidents (#1584) is not merged, so comments, the changelog fragment and
CURRENT-STATE no longer explain the shipwrecks markers, card and picker by
it; the row-range test fixture is the shipwrecks row. CURRENT-STATE now says
the markers are one billboard collection and the period is stored swapped.
This commit is contained in:
Sameh Khamis committed 2026-11-10 13:27:26 -08:00
1 parent 32e5768954
commit dd731a5da9
7 files changed
+16 -17

No files matched your search

+1 -2
View File
@@ -54,8 +54,7 @@ export function cardLink(record) {
}
/**
* Title and detail lines for one wreck card, laid out like the air-accident
* card: deaths first, then when and where, then the ship facts. Only facts
* Title and detail lines for one wreck card: deaths first, then when and where, then the ship facts. Only facts
* about the ship: the records carry no names of people, and victims appear as
* a count only.
* @param {object} record A normalized shipwreck record.
+2 -3
View File
@@ -30,8 +30,7 @@ const CARD_HOST_OPTIONS = Object.freeze({
});
const MAX_CARD_LINES = 14;
/**
* Marker size in pixels: grows with the death toll, as on the air-accidents
* layer, from 16 px (no deaths known) to 36 px (about a thousand or more).
* Marker size in pixels: grows with the death toll, from 16 px (no deaths known) to 36 px (about a thousand or more).
*/
export function markerPixelSize(casualties) {
const n = Number.isFinite(casualties) && casualties > 0 ? casualties : 0;
@@ -285,7 +284,7 @@ export function createShipwrecksLayer({
return count;
}
/** The start and end year pickers, side by side, as on Air accidents. */
/** The start and end year pickers, side by side. */
function periodControls() {
if (!_extent || _extent.min === _extent.max) return {};
const range = periodRange(_period, _extent);
+1 -1
View File
@@ -1,5 +1,5 @@
<script setup>
// A row's start and end pickers on one line (e.g. the Air Accidents period).
// A row's start and end pickers on one line (e.g. the Shipwrecks period).
// Both ends share one option list; `onSelect` reports which end moved
// ('from' or 'to') and the chosen option value.
defineProps({
+3 -3
View File
@@ -166,8 +166,8 @@ test('a row range renders start and end pickers and reports which end moved', ()
const picks = [];
const item = {
...row(false),
key: 'air-accidents',
id: 'air-accidents',
key: 'shipwrecks',
id: 'shipwrecks',
controls: {
hidden: false,
chips: [],
@@ -215,6 +215,6 @@ test('a row range renders start and end pickers and reports which end moved', ()
);
to.value = '2007';
to.dispatchEvent(new Event('change', { bubbles: true }));
assert.deepEqual(picks, [['air-accidents', 'period', 'to', '2007']]);
assert.deepEqual(picks, [['shipwrecks', 'period', 'to', '2007']]);
render(null, container);
});
+1 -1
View File
@@ -1067,7 +1067,7 @@ html:not([lang='en']) .data-row-list-text {
letter-spacing: 0.8px;
}
/* Optional start and end pickers on one line (Air Accidents period). The
/* Optional start and end pickers on one line (e.g. a layer's period). The
shared field style paints each select. */
.data-toggle-range {
flex-basis: 100%;