Improve Merge States dialog: hover highlight + color boxes + clearer instructions#1336
Conversation
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ions Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
…d reverse map-hover highlight Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
|
@copilot, one more change, please - add small svg box of state color next to each state in the list. It will allow to quickly see what state it is by color. See how it's implemented in States Editor (state may have a color or a hatching). |
…log rows Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Done in b635899. Added |
…tes.hovered Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
|
Upgrade the version. |
|
@copilot, update the version. |
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR significantly improves the usability of the Merge States dialog by adding visual feedback and clearer instructions. The changes address user confusion when merging countries/states by implementing bidirectional highlighting between the dialog and map, adding color swatches for quick visual identification, and providing explicit instructions that distinguish the radio button (ruling state) from checkboxes (states to absorb).
Changes:
- Added hover-based highlighting: hovering a row in the Merge dialog highlights that state on the map with an animated red outline, and hovering a state on the map highlights its row in the dialog
- Fixed a generic bug in
highlightEditorLinethat only cleared hovered rows with the "states" class, now clears any hovered row - Added color boxes (fill-box SVG swatches) to each state row for quick visual identification
- Replaced vague one-liner instructions with a clear explanatory paragraph
- Fixed HTML validation bug (extra
}in checkbox value attribute)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.html | Updated version hashes for CSS and general.js to reflect the changes |
| public/versioning.js | Bumped version from 1.113.0 to 1.113.1 |
| public/modules/ui/general.js | Fixed highlightEditorLine to work with any editor (not just states editor), added merge dialog to map hover highlighting |
| public/modules/dynamic/editors/states-editor.js | Implemented hover highlighting, color swatches, clearer instructions, and fixed checkbox HTML bug |
| public/index.css | Added hover styling for merge dialog rows consistent with states editor |

The Merge States dialog had no visual feedback and ambiguous instructions, making it difficult to identify states and understand the radio/checkbox roles.
Description
highlightEditorLineingeneral.js. Fixed the clearing selector from.states.hovered→.hoveredso it works for any editor, not just rows with thestatesclass.<fill-box>SVG swatch (supports solid color and hatching) for quick visual identification — consistent with States Editor.}from checkboxvaluetemplate string.Key fix in
general.js:Type of change
Versioning
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.