MediaWiki talk:Common.js: Difference between revisions
Discussion page of MediaWiki:Common.js
More actions
Eloise Zomia (talk | contribs) |
Eloise Zomia (talk | contribs) No edit summary |
||
| Line 10: | Line 10: | ||
* Leaflet.markercluster 1.4.1 | * Leaflet.markercluster 1.4.1 | ||
* Turf.js 6 | * Turf.js 6 | ||
}} | |||
{{TalkBox | |||
|title=Template Dependencies | |||
|body= | |||
'''Talk page preload system:''' | |||
* [[Template:Talk preload/Default]] | |||
* [[Template:Talk preload/Country]] | |||
* [[Template:Talk preload/State]] | |||
* [[Template:Talk preload/Growing region]] | |||
* [[Template:Talk preload/Growing area]] | |||
* [[Template:Talk preload/Accession]] | |||
}} | }} | ||
{{TalkBox | {{TalkBox | ||
| Line 33: | Line 44: | ||
* '''Reason:''' Consistent talk page structure without manual setup | * '''Reason:''' Consistent talk page structure without manual setup | ||
* '''Result:''' Creating Talk:India auto-loads Country template; Talk:Koch Bihar auto-loads Growing Area template, etc. | * '''Result:''' Creating Talk:India auto-loads Country template; Talk:Koch Bihar auto-loads Growing Area template, etc. | ||
* '''Dependencies:''' Requires Template:Talk preload/* subpages to exist | * '''Dependencies:''' Requires [[Template:Talk preload/Default|Template:Talk preload/*]] subpages to exist | ||
=== 2026-01-13 === | === 2026-01-13 === | ||
| Line 76: | Line 87: | ||
; 3km hull buffer (2026-01-13) | ; 3km hull buffer (2026-01-13) | ||
: Prevents linear point distributions from creating thin unusable polygons | : Prevents linear point distributions from creating thin unusable polygons | ||
; Talk page preload by category (2026-01-14) | |||
: JS detects subject page category and loads appropriate template — scales automatically as new page types added | |||
Revision as of 01:51, 14 January 2026
Talk
Discussion for: MediaWiki:Common.js • View • Links • Related changes
Use this page for verification notes, disputes, and action items. Keep narrative content on the article.
Purpose
Coordination + change tracking for MediaWiki:Common.js (site-wide JavaScript). Keep implementation on the JS page. Use this page for tasks, regression notes, and decisions.
Current Libraries
* Leaflet 1.9.4
- Leaflet.markercluster 1.4.1
- Turf.js 6
Template Dependencies
Known issues / watchlist
* Fullscreen expand button — not yet functional
- Hulls require 3+ accessions per Growing Area to display
- Region labels removed (were overlapping with sparse data)
Open tasks
* [ ] Fix fullscreen map overlay
- [ ] Side panel navigation (click area → filtered accession list)
- [ ] Add a small "Discuss" link/button to key infoboxes (later)
Changelog
2026-01-14
- Talk page auto-preload
- Change: Added automatic preload for new talk pages based on subject page category
- Reason: Consistent talk page structure without manual setup
- Result: Creating Talk:India auto-loads Country template; Talk:Koch Bihar auto-loads Growing Area template, etc.
- Dependencies: Requires Template:Talk preload/* subpages to exist
2026-01-13
- Marker clustering
- Change: Added Leaflet.markercluster with worst-status bubble-up
- Reason: Overlapping pins at zoomed-out view
- Result: Clusters show count + color of worst status inside
- Hull boundaries
- Change: Added Turf.js auto-generated convex/concave hulls for Growing Areas
- Reason: Visual indication of area coverage without manual GeoJSON
- Result: Dashed polygons appear at zoom 6-12, colored by worst status
- Hull buffer
- Change: Added 3km buffer around all hulls
- Reason: Linear accession distributions created thin/weird shapes
- Result: Capsule-shaped boundaries that look like proper areas
- Labels removed
- Change: Removed permanent region/area labels, kept hover tooltips only
- Reason: Visual clutter with sparse/clustered data
- Result: Cleaner map, area info on hover/click
- Satellite layer
- Change: Added Esri World Imagery as third base layer option
- Reason: Useful for seeing actual terrain/cultivation areas
- Result: 3-button toggle (basic/terrain/satellite)
2026-01-12
- CSV URL encoding fix
- Change: Added encoding for dashes (-2D) and colons (-3A) in buildCSVUrl()
- Reason: Accession IDs with dashes/colons broke SMW CSV export URLs
- Result: Maps display pins correctly
Decisions
- Auto-generated hulls vs manual GeoJSON (2026-01-13)
- Chose auto-generated — updates automatically as accessions added, dashed style communicates "approximate"
- Interaction-only labels (2026-01-13)
- Removed permanent labels — too cluttered with sparse data, hover tooltips sufficient
- 3km hull buffer (2026-01-13)
- Prevents linear point distributions from creating thin unusable polygons
- Talk page preload by category (2026-01-14)
- JS detects subject page category and loads appropriate template — scales automatically as new page types added