CSV import enhancements — column mapping, preview, and validation #27

Closed
opened 2026-05-21 20:30:38 +00:00 by jmiller · 0 comments
Owner

Summary

Enhance the existing CSV import with an interactive column mapping UI, data preview/validation step, and robust error handling. The basic CSV import (issue #10) is functional but needs a production-grade UX.

Current State

Basic CSV import works with fixed column headers (title, address, city, etc.). Geocoding and update-existing options are functional.

Requirements

Column Mapping UI

  • Step 1: Upload CSV file
  • Step 2: Interactive column mapper — dropdown for each CSV column to map to a location field
  • Auto-detect common column names (Name→title, Address→address, Zip→postcode, etc.)
  • Support for ignoring columns ("Skip this column")
  • Remember last-used mapping (store in session or component params)

Preview & Validation

  • Step 3: Preview first 10 rows with mapped data before committing
  • Highlight validation issues per row (missing title, invalid lat/lng range, duplicate detection)
  • Row-level skip/include toggle
  • Summary: "X rows valid, Y rows with warnings, Z rows will be skipped"

Import Options

  • Match existing locations by: title, alias, or custom field (configurable)
  • Conflict resolution: skip, overwrite, or merge (fill empty fields only)
  • Category assignment during import (select category for all imported rows)
  • Default published state for imported locations
  • Dry-run mode (validate without inserting)

File Format Support

  • CSV with configurable delimiter (comma, semicolon, tab)
  • Auto-detect file encoding (UTF-8, Latin-1, Windows-1252)
  • Handle quoted fields with embedded commas/newlines
  • XLS/XLSX support via PhpSpreadsheet (optional, if composer dependency acceptable)

Progress & Reporting

  • Progress bar for large imports (AJAX-based)
  • Import result summary: imported, updated, skipped with reasons
  • Downloadable error report (CSV of failed rows with error messages)
  • Import history log in admin

Geocoding During Import

  • Batch geocode with progress indicator
  • Skip geocoding for rows that already have coordinates
  • Rate limit indicator (especially for Nominatim 1req/sec)
  • Option to queue geocoding for background processing

Acceptance Criteria

  • Non-technical admin can import a CSV without knowing the exact column names
  • Preview catches errors before they enter the database
  • Large files (1000+ rows) import without timeout
  • Import is resumable if interrupted
## Summary Enhance the existing CSV import with an interactive column mapping UI, data preview/validation step, and robust error handling. The basic CSV import (issue #10) is functional but needs a production-grade UX. ## Current State Basic CSV import works with fixed column headers (title, address, city, etc.). Geocoding and update-existing options are functional. ## Requirements ### Column Mapping UI - [ ] Step 1: Upload CSV file - [ ] Step 2: Interactive column mapper — dropdown for each CSV column to map to a location field - [ ] Auto-detect common column names (Name→title, Address→address, Zip→postcode, etc.) - [ ] Support for ignoring columns ("Skip this column") - [ ] Remember last-used mapping (store in session or component params) ### Preview & Validation - [ ] Step 3: Preview first 10 rows with mapped data before committing - [ ] Highlight validation issues per row (missing title, invalid lat/lng range, duplicate detection) - [ ] Row-level skip/include toggle - [ ] Summary: "X rows valid, Y rows with warnings, Z rows will be skipped" ### Import Options - [ ] Match existing locations by: title, alias, or custom field (configurable) - [ ] Conflict resolution: skip, overwrite, or merge (fill empty fields only) - [ ] Category assignment during import (select category for all imported rows) - [ ] Default published state for imported locations - [ ] Dry-run mode (validate without inserting) ### File Format Support - [ ] CSV with configurable delimiter (comma, semicolon, tab) - [ ] Auto-detect file encoding (UTF-8, Latin-1, Windows-1252) - [ ] Handle quoted fields with embedded commas/newlines - [ ] XLS/XLSX support via PhpSpreadsheet (optional, if composer dependency acceptable) ### Progress & Reporting - [ ] Progress bar for large imports (AJAX-based) - [ ] Import result summary: imported, updated, skipped with reasons - [ ] Downloadable error report (CSV of failed rows with error messages) - [ ] Import history log in admin ### Geocoding During Import - [ ] Batch geocode with progress indicator - [ ] Skip geocoding for rows that already have coordinates - [ ] Rate limit indicator (especially for Nominatim 1req/sec) - [ ] Option to queue geocoding for background processing ## Acceptance Criteria - [ ] Non-technical admin can import a CSV without knowing the exact column names - [ ] Preview catches errors before they enter the database - [ ] Large files (1000+ rows) import without timeout - [ ] Import is resumable if interrupted
jmiller added the type/featurearea/componentarea/adminarea/import-export labels 2026-05-21 20:30:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomStoreLocator#27