Skip to content

Refactor/import wizard separate skipped column#108

Merged
ManukMinasyan merged 10 commits into3.xfrom
refactor/import-wizard-separate-skipped-column
Jan 27, 2026
Merged

Refactor/import wizard separate skipped column#108
ManukMinasyan merged 10 commits into3.xfrom
refactor/import-wizard-separate-skipped-column

Conversation

@ManukMinasyan
Copy link
Copy Markdown
Contributor

No description provided.

add dedicated 'skipped' column to track value-level skips instead
of using magic string in corrections column. this fixes filter
counts showing incorrect values for skipped and modified items.
- Configure blank_issues_enabled: false to require template use
- Redirect feature requests and support to GitHub Discussions
- Add bug report template with environment details collection
- Add task/improvement template for technical work
- Auto-add new issues to Roadmap project
- Auto-label issues by type (area:bug, area:dev)
- Remove task template (internal use only)
- Add Discord community link to issue template config
- Bug reports now get 'bug' and 'unconfirmed' labels automatically
- GitHub will auto-set Type field to Bug based on label
- add SortField and SortDirection enums for configurable sorting
- add two-section sort dropdown (field + direction) with checkmarks
- implement async column validation with ValidateColumnJob
- add ImportValueValidator for centralized value validation
- show validation progress bar while processing columns
- display error indicators on columns with validation issues
- remove hardcoded sort order from uniqueValuesFor scope
Copilot AI review requested due to automatic review settings January 27, 2026 02:08
@ManukMinasyan ManukMinasyan merged commit 48aaedd into 3.x Jan 27, 2026
3 of 11 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive refactoring of the ImportWizard's value review and validation system, with a major architectural change to separate column-level value skipping from row-level import skipping.

Changes:

  • Introduces asynchronous column validation using queued jobs with batch tracking and progress indication
  • Adds support for number format selection (point vs comma decimal separators) alongside the existing date format functionality
  • Implements granular column-value skipping (marking specific values as null) distinct from row-level skipping
  • Adds sorting controls for review values (by count or value, ascending/descending)

Reviewed changes

Copilot reviewed 26 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ImportValueValidator.php New centralized validator for date, number, and choice field values with caching
ValidateColumnJob.php New background job for async column validation using temporary tables for performance
ImportStore.php Major refactoring: adds validation batch management, value skipping, correction management with batch SQL updates
ImportRow.php Adds skipped column/property and updates scopes to filter by column-specific validation/corrections/skipped state
ReviewStep.php Adds format selection, sorting, batch progress tracking, and methods for corrections/skipping
NumberFormat.php New enum for decimal separator formats with parsing and formatting methods
DateFormat.php Enhanced with parsing methods and UI option generation
SortField.php, SortDirection.php New enums for sorting controls
ImportNumberRule.php New validation rule for number format validation
ImportChoiceRule.php Parameter renamed from $isMulti to $isMultiChoice for clarity
ColumnData.php Adds numberFormat property and methods for format updates and value hashing
RelationshipField.php Refactored to use DRY cloneWith method for immutable updates
Blade templates Updated UI for format selection, sorting, loading states, and column-level value actions
CsvReaderFactoryTest.php Deleted (86 lines of tests removed without replacement)
.github templates Added issue templates for bug reports and community links
composer.lock, package-lock.json Updated dependencies (Filament 5.0 → 5.1, Livewire 4.0.2 → 4.0.3, etc.)
wizard.js Added goToStep method for direct step navigation
notifications.js Added type check before calling animation function

@if ($showUndo)
<button
wire:click.stop.preserve-scroll="updateMappedValue({{ Js::from($selectedColumn) }}, {{ Js::from($rawValue) }}, {{ Js::from($rawValue) }})"
wire:click.stop.preserve-scroll="undoCorrection({{ Js::from($rawValue) }}, {{ Js::from($rawValue) }})"
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The undoCorrection method is being called with 2 parameters (both rawValue), but the method signature only accepts 1 parameter. The second parameter should be removed from this call.

Suggested change
wire:click.stop.preserve-scroll="undoCorrection({{ Js::from($rawValue) }}, {{ Js::from($rawValue) }})"
wire:click.stop.preserve-scroll="undoCorrection({{ Js::from($rawValue) }})"

Copilot uses AI. Check for mistakes.
UPDATE import_rows
SET validation = json_set(COALESCE(validation, '{}'), ?, ?)
WHERE json_extract(raw_data, ?) = ?
", [$jsonPath, $error, $jsonPath, $rawValue]);
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When clearing the skipped flag and the value is valid (error is null), the validation error should also be cleared from the database. Currently, only invalid values get their validation updated. Add an else clause to remove the validation error when the value is valid, similar to the pattern used in clearCorrection method (lines 645-650).

Suggested change
", [$jsonPath, $error, $jsonPath, $rawValue]);
", [$jsonPath, $error, $jsonPath, $rawValue]);
} else {
// Batch clear validation error when the raw value is now valid
$this->connection()->statement("
UPDATE import_rows
SET validation = NULLIF(
json_remove(COALESCE(validation, '{}'), ?),
'{}'
)
WHERE json_extract(raw_data, ?) = ?
", [$jsonPath, $jsonPath, $rawValue]);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants