Note UX polish: pin marker, icon picker, fix Save button color

- The clicked location now stays marked (a plain maplibre-gl Marker,
  removed on save/cancel/deactivate) while the note form is open —
  before, nothing on the map showed where the pending note would land.
- POI_ICONS gains a dozen more symbols (water, dump station, toilets,
  playground, viewpoint, swimming, fishing, climbing, hiking, …) via
  Object.assign after PARK4NIGHT_TAGS' own icon constants are declared
  (they're below POI_ICONS in the file, so the literal itself can't
  reference them directly) — reused as real marker-badge glyphs, not
  just PARK4NIGHT_TAGS' inline description-tag icons. NoteSaveForm
  gets a picker grid for these, shown only for a Point note (a
  Measure-drawn line/polygon has no one spot for a badge).
- Fixed: .notes-panel__save's blue background was losing to
  .notes-panel__actions button's gray — same class-vs-class+element
  specificity trap .gpx-panel__action[hidden] already has a comment
  about elsewhere in this file. The button was never actually blue.

Verified live (properly simulating a logged-in session this time, via
Page.addScriptToEvaluateOnNewDocument rather than a post-load DOM
poke, since NotesControl's mount decision happens once, synchronously,
at page load): marker appears and clears correctly, 19 icons + "none"
render and select, Save renders #1a5fb4. Full suite: 115 runs, 0
failures.
This commit is contained in:
randy committed 2026-09-09 13:14:19 +02:00
1 parent 465a644365
commit 5576d2edf1
4 files changed
+142 -5

No files matched your search

+47 -1
View File
@@ -888,6 +888,48 @@ html, body {
resize: vertical;
}
.notes-panel__icons {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 2px;
margin: 2px 0;
}
/* Same "author display wins over the UA [hidden] rule" gotcha as
.gpx-panel__action[hidden] elsewhere in this file. */
.notes-panel__icons[hidden] {
display: none;
}
.notes-panel__icon-option {
width: auto;
height: auto;
display: flex;
align-items: center;
justify-content: center;
padding: 3px;
border: 1px solid transparent;
border-radius: 4px;
background: none;
color: #555;
cursor: pointer;
}
.notes-panel__icon-option svg {
width: 16px;
height: 16px;
}
.notes-panel__icon-option:hover {
background: #f0f0f0;
}
.notes-panel__icon-option.active {
border-color: #1a5fb4;
color: #1a5fb4;
background: #dbe9ff;
}
.notes-panel__target,
.notes-panel__new-name {
width: 100%;
@@ -917,7 +959,11 @@ html, body {
cursor: pointer;
}
.notes-panel__save {
/* ".notes-panel__actions " prefix (not just ".notes-panel__save") to
outrank ".notes-panel__actions button" — same class-count-vs-class+
element specificity trap as elsewhere in this file; without it this
lost and the Save button just looked like a second Cancel button. */
.notes-panel__actions .notes-panel__save {
background: #1a5fb4;
color: #fff;
}