Skip to content

Conversation

@sleidig
Copy link
Member

@sleidig sleidig commented Jan 2, 2026


Remaining TODOs

  • adapt user guide to explain this option in an additional section

PR Checklist

Before you request a manual PR review from someone, please go through all of this list, check the points and mark them checked here.
This helps us reduce the number of review cycles and use the time of our core reviewers more effectively.

  • all automatic CI checks pass (🟢)
    • i.e. code formatting (ng lint) passes
    • i.e. unit tests (ng test) passes
    • in some cases unit test coverage can be difficult to achieve. If that or any other CI check fails, you can also leave a short comment here why this should be accepted anyway.
  • manually tested (all) required functionality described in the issue manually yourself on the final version of the code (developer)
  • reviewed the "Files changed" section of the PR briefly yourself to check for any unwanted changes
    • e.g. clean up debugging console.log statements, disabled tests, ...
    • please also avoid changes that are not directly related to the issue of the PR, even small code reformatings make the review process much more complex
  • 🚦 PR status is changed to "Ready for Review"
    • while you are still working on initial implementation, keep the PR in "Draft" status
    • once you are done with your initial work, change to "Ready for Review". This will trigger some additional automated checks and reviews.
    • (PR = "Ready for Review" does not immediately request a manual review yet, first complete the further checks below)
  • marked each code review comment as resolved OR commented on it with a question, if unsure
    • both implementing suggestions of automatic code review or discarding them as not applicable is okay
  • all checkboxes in this checklist are checked (to show the reviewer this really is ready)
  • 🚦 moved the issue related to this PR to Status "Functional Review" to request a personal review

⏪ if issues are commented from testing or code review, make changes. Please then re-check every item of the checklist here again.

Summary by CodeRabbit

  • New Features

    • Added an "Additional Settings" panel in the import flow to configure a multi-value separator (default ",") and share it across import steps.
  • Improvements

    • Import parsing now supports separator-delimited and JSON multi-value fields, splits entries, and removes duplicates.
    • Discrete-value mapping dialog: added explanatory hint, improved first-column sizing/spacing, and removed the redundant help-button column.
  • Tests

    • Added unit tests covering parsing behaviors and the new settings UI.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Warning

Rate limit exceeded

@sleidig has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 439b32a and 773f9b0.

📒 Files selected for processing (1)
  • src/app/core/import/import.service.ts

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds configurable multi-value import support: new Additional Settings UI for multiValueSeparator, splitting/deduplication helpers and array-aware import mapping in ImportService, propagation of additionalSettings through import flow and mapping dialogs, discrete-import UI updated to use flattened split values, and datatype import mapping simplified to single-value returns.

Changes

Cohort / File(s) Summary
Import Additional Settings
src/app/core/import/import-additional-settings/import-additional-settings.component.ts, ...component.html, ...component.scss, ...component.spec.ts
New standalone component and tests exposing ImportAdditionalSettings with multiValueSeparator (default ",") and custom-option support.
Import Service & Helpers
src/app/core/import/import.service.ts, src/app/core/import/import.service.spec.ts
Added exported splitArrayValue and array-aware import mapping: parse JSON or separator-delimited strings, per-item datatype mapping, deduplication, and tests for parsing/duplicates.
Import Settings & Data Models
src/app/core/import/import-metadata.ts, src/app/core/import/import-column-mapping/mapping-dialog-data.ts
Extended ImportSettings and MappingDialogData to include optional additionalSettings?: ImportAdditionalSettings.
Import Flow Integration
src/app/core/import/import/import.component.ts, .../import.component.html, src/app/core/import/import-review-data/import-review-data.component.ts
Register and render Additional Settings component; two-way bind importSettings.additionalSettings; propagate additionalSettings into column-mapping and review steps and transform calls.
Column Mapping Components
src/app/core/import/import-column-mapping/import-column-mapping.component.ts, .../import-column-mapping.component.html, edit-import-column-mapping/edit-import-column-mapping.component.ts, .../edit-import-column-mapping.component.spec.ts
Added @Input() additionalSettings: ImportAdditionalSettings to parent/child components and pass through dialog data; spec updated to assert propagation.
Discrete Import Config UI & Logic
src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts, ...component.html, ...component.scss
Added HintBoxComponent, removed help-button column, introduced splitAndFlattenValues(values) to split/deduplicate using provided separator and used flattened values for form generation; new .first-column styling.
Datatype Import Simplification
src/app/core/entity/default-datatype/default.datatype.ts
importMapFunction simplified to always return a single object (array handling removed; array splitting moved to ImportService).
Tests Adjusted / Removed
src/app/core/basic-datatypes/configurable-enum/...configurable-enum.datatype.spec.ts
Removed test validating array mapping inside datatype; other tests updated/added for array parsing and additional settings.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ImportUI as ImportComponent
    participant ColumnCfg as DiscreteImportConfigComponent
    participant Service as ImportService
    participant Registry as EntityRegistry
    participant Datatype as DefaultDatatype

    User->>ImportUI: set multiValueSeparator (Additional Settings)
    ImportUI->>ImportUI: store additionalSettings

    User->>ImportUI: open column mapping
    ImportUI->>ColumnCfg: pass additionalSettings + values
    ColumnCfg->>ColumnCfg: splitAndFlattenValues(values, separator)
    ColumnCfg-->>User: render flattened mapping table

    User->>ImportUI: start import
    ImportUI->>Service: transformRawDataToEntities(rawData, importSettings)
    Service->>Registry: get schema for field
    Registry-->>Service: schema (field.isArray?)

    alt field.isArray
        Service->>Service: splitArrayValue(cellValue, separator / JSON)
        loop each split item
            Service->>Datatype: importMapFunction(item)
            Datatype-->>Service: mapped object
        end
        Service->>Service: deduplicate mapped objects
    else
        Service->>Datatype: importMapFunction(cellValue)
        Datatype-->>Service: mapped object
    end
    Service-->>ImportUI: transformed entities
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

released on @master``, released

Suggested reviewers

  • Abhinegi2

Poem

🐰 I nibble commas, semicolons too,
I split and hop each value through.
Duplicates fall, mappings align,
Multi-value imports now work just fine. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: multi-value import' is concise and directly reflects the main feature added—support for importing multi-value (comma-separated) data for array properties like multi-select dropdowns.
Description check ✅ Passed The PR description includes the issue reference (#1610), explains the feature implementation (comma-separated values parsing), includes completed PR checklist items, and acknowledges remaining TODOs (user guide updates).
Linked Issues check ✅ Passed The PR fully addresses issue #1610 by implementing multi-value array import support. The changes enable parsing comma-separated CSV values into arrays for configurable-enum properties, allowing data import for multi-select fields as required.
Out of Scope Changes check ✅ Passed All code changes are directly aligned with the multi-value import feature objective. Changes span import pipeline (service, components, UI), data handling, and type support—all necessary for implementing array value import from CSV.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Deployed to https://pr-3552.aam-digital.net/

@argos-ci
Copy link

argos-ci bot commented Jan 2, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jan 5, 2026, 9:25 PM

@sleidig sleidig marked this pull request as ready for review January 5, 2026 15:09
Copilot AI review requested due to automatic review settings January 5, 2026 15:09
Copy link
Contributor

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 adds support for importing comma-separated (or custom-separated) values for multi-select dropdown fields and other array-type fields. Users can now configure the separator character used to split multi-value columns during the import process.

Key changes:

  • New ImportAdditionalSettingsComponent allows users to configure the multi-value separator (default: comma, also supports semicolon or custom separators)
  • Modified ImportService to handle array field parsing by splitting values based on the configured separator, with support for JSON arrays
  • Updated discrete import configuration to split and flatten values for proper mapping UI

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
import.service.ts Core logic for splitting and parsing array values with configurable separator, including new splitArrayValue function
import.service.spec.ts Comprehensive test coverage for array field parsing with different separators and edge cases
import-additional-settings.component.ts New component for configuring import settings like multi-value separator
import-additional-settings.component.spec.ts Unit tests for the new settings component
import-additional-settings.component.html UI for separator configuration with autocomplete and help text
import-additional-settings.component.scss Styling for settings panel
import.component.ts & .html Integration of additional settings component into import workflow
import-review-data.component.ts Pass additional settings through to import processing
import-metadata.ts Extended to include additionalSettings in import configuration
import-column-mapping/*.ts Updated components to pass additional settings through mapping pipeline
mapping-dialog-data.ts Extended interface to include additional settings
discrete-import-config.component.ts Modified to split multi-value data for proper value mapping
discrete-import-config.component.html & .scss UI improvements for better layout of mapping table
default.datatype.ts Simplified importMapFunction return type - array handling now in ImportService
configurable-enum.datatype.spec.ts Removed obsolete test for array handling that's now done elsewhere

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Fix all issues with AI Agents 🤖
In
@src/app/core/import/import-additional-settings/import-additional-settings.component.ts:
- Around line 1-51: Add a new spec file
import-additional-settings.component.spec.ts that creates an
ImportAdditionalSettingsComponent test host (or uses standalone TestBed) and
covers: component instantiation, default multiValueSeparator returns "," when
settings is empty, updating settings via the multiValueSeparator setter updates
the settings model (verify settings() or the underlying model update behavior),
separatorOptions contains the expected [",",";"], and createCustomSeparator
returns the passed string; reference the ImportAdditionalSettingsComponent
class, its multiValueSeparator getter/setter, settings model, separatorOptions
array, and createCustomSeparator method in the tests, and follow existing
/*.{component,service}.spec.ts patterns for setup and teardown.

In @src/app/core/import/import.service.ts:
- Around line 235-254: Change the parameter type from any to unknown on
splitArrayValue and add explicit type guards: if val is null or undefined return
an empty array; if val is an array (Array.isArray(val)) coerce/validate its
items to strings and return string[]; if val is a string keep the existing
JSON-parse-first logic but ensure parsed result is an array of strings
(map/validate elements) and on fallback split by separator and trim; for any
other non-string primitive coerce via String(val) into a single-element string
array. Ensure all branches return string[] and avoid wrapping null/undefined.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts (1)

35-35: Remove explicit standalone: true declaration.

Per coding guidelines, standalone components are the default behavior and standalone: true should not be explicitly set.

🔎 Proposed fix
   selector: "app-edit-import-column-mapping",
   templateUrl: "./edit-import-column-mapping.component.html",
   styleUrls: ["./edit-import-column-mapping.component.scss"],
-  standalone: true,
   imports: [

Based on coding guidelines for **/*.component.ts.

🧹 Nitpick comments (6)
src/app/core/import/import-additional-settings/import-additional-settings.component.scss (1)

1-3: Consider using global padding classes.

The custom .settings-content class applies simple vertical padding. Per coding guidelines, global style classes from src/styles/globals/ (e.g., padding-vertical-small) could be used instead if available, reducing custom CSS.

Based on coding guidelines.

src/app/core/import/import-additional-settings/import-additional-settings.component.html (1)

6-6: Consider replacing inline style with a CSS class.

The inline style="float: right" could be replaced with a global style class or a component-specific class for better maintainability.

🔎 Suggested alternatives

Option 1: Use flexbox on the parent (line 3-12):

-    <mat-panel-title>
+    <mat-panel-title class="flex-row">
       <span i18n>Additional Settings [optional]</span>
       <app-help-button
-        style="float: right"
+        style="margin-left: auto"

Option 2: Add a CSS class in the component's SCSS file:

       <app-help-button
-        style="float: right"
+        class="float-right"

Based on coding guidelines, prefer global style classes over inline styles.

src/app/core/import/import-column-mapping/import-column-mapping.component.ts (1)

20-20: Consider migrating to input() function.

The new additionalSettings input follows the existing pattern but uses the @Input() decorator. As per coding guidelines, prefer the input() function over @Input() decorators.

🔎 Proposed refactor to use input() function
-  @Input() additionalSettings: ImportAdditionalSettings;
+  additionalSettings = input<ImportAdditionalSettings>();

Note: This would also apply to the other @Input() decorators in this component (lines 43-44) and the @Output() decorator (line 46) for full consistency with the guidelines.

Based on coding guidelines for **/*.component.ts.

Also applies to: 45-45

src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts (1)

80-83: Consider migrating to input() function.

The new additionalSettings input uses the @Input() decorator. As per coding guidelines, prefer the input() function over @Input() decorators.

🔎 Proposed refactor to use input() function
-  /**
-   * Additional settings for import processing
-   */
-  @Input() additionalSettings: ImportAdditionalSettings;
+  /**
+   * Additional settings for import processing
+   */
+  additionalSettings = input<ImportAdditionalSettings>();

Note: Accessing the value would require calling it as a function: this.additionalSettings() instead of this.additionalSettings (see line 133).

Based on coding guidelines for **/*.component.ts.

src/app/core/import/import-review-data/import-review-data.component.ts (1)

70-70: Consider migrating to input() function.

The new additionalSettings input uses the @Input() decorator. As per coding guidelines, prefer the input() function over @Input() decorators.

🔎 Proposed refactor to use input() function
-  @Input() additionalSettings: ImportAdditionalSettings;
+  additionalSettings = input<ImportAdditionalSettings>();

Note: Accessing the value would require calling it as a function: this.additionalSettings() instead of this.additionalSettings (see line 101).

Based on coding guidelines for **/*.component.ts.

src/app/core/import/import-additional-settings/import-additional-settings.component.ts (1)

40-46: Consider simplifying the getter/setter pattern with signals.

The current getter/setter approach works but could be more idiomatic with signals. Since settings is already a signal model, you could either:

  1. Use computed() for a derived read-only signal, or
  2. Access settings().multiValueSeparator directly in the template
Option 1: Using computed() for a read-only derived value
-  get multiValueSeparator(): string {
-    return this.settings()?.multiValueSeparator ?? ",";
-  }
-
-  set multiValueSeparator(value: string) {
-    this.settings.update((s) => ({ ...s, multiValueSeparator: value }));
-  }
+  multiValueSeparator = computed(() => this.settings()?.multiValueSeparator ?? ",");

Note: This would require adjusting the template if it uses two-way binding.

Option 2: Direct access in template

Access the value directly in the template as settings().multiValueSeparator ?? "," and update via a method or the existing setter.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 503bd13 and fbc1988.

📒 Files selected for processing (20)
  • src/app/core/basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype.spec.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.html
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/entity/default-datatype/default.datatype.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
  • src/app/core/import/import-additional-settings/import-additional-settings.component.scss
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.html
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/import/import-column-mapping/mapping-dialog-data.ts
  • src/app/core/import/import-metadata.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import.service.ts
  • src/app/core/import/import/import.component.html
  • src/app/core/import/import/import.component.ts
💤 Files with no reviewable changes (1)
  • src/app/core/basic-datatypes/configurable-enum/configurable-enum-datatype/configurable-enum.datatype.spec.ts
🧰 Additional context used
📓 Path-based instructions (15)
**/*.component.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.ts: Use standalone components (default behavior, do NOT set standalone: true)
Prefer input() and output() functions over @Input and @Output decorators in Angular components
Use signals for reactive state management with computed() for derived state
Set changeDetection: ChangeDetectionStrategy.OnPush for all components
Prefer inline templates for small components in Angular
Prefer Reactive Forms over Template-driven forms in Angular
Use NgOptimizedImage for static images instead of base64 encoded images
Use Angular Material components for UI consistency following Material Design guidelines
Implement OnPush change detection strategy for performance optimization
Use trackBy functions for lists in Angular templates for performance optimization

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
**/*.{component,service,directive,guard,interceptor,resolver,pipe}.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use inject() function instead of constructor injection for dependencies

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
  • src/app/core/import/import.service.ts
**/*.{component,service}.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{component,service}.ts: Use update() or set() instead of mutate() when modifying signals in Angular
Create interfaces for configuration objects and let component classes implement them

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
  • src/app/core/import/import.service.ts
**/*.{component,directive}.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{component,directive}.ts: Do NOT use @HostBinding and @HostListener decorators; put host bindings inside the host object of @Component or @Directive decorator
Implement proper permissions checking via CASL integration using EntityAbility and DisableEntityOperationDirective

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
src/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.ts: Use strict type checking with TypeScript and avoid any type; use unknown when type is uncertain
Prefer type inference in TypeScript when obvious

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/entity/default-datatype/default.datatype.ts
  • src/app/core/import/import-metadata.ts
  • src/app/core/import/import-column-mapping/mapping-dialog-data.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
  • src/app/core/import/import.service.ts
src/**/*.{ts,js}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,js}: Use ESLint for linting (npm run lint)
Use Prettier for code formatting

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/entity/default-datatype/default.datatype.ts
  • src/app/core/import/import-metadata.ts
  • src/app/core/import/import-column-mapping/mapping-dialog-data.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
  • src/app/core/import/import.service.ts
**/*.component.{ts,html}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.{ts,html}: All user-facing strings must be translatable using Angular i18n markers or $localize in Aam Digital
Follow existing translation key patterns in Aam Digital
Use Angular Material accessibility features in components

Files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.html
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.html
  • src/app/core/import/import/import.component.html
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
**/*.component.scss

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.scss: Use SCSS for styling with global variables and mixins from src/styles/
If custom styles are necessary, create a class with meaningful name in component-specific SCSS file instead of inline styles

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
  • src/app/core/import/import-additional-settings/import-additional-settings.component.scss
**/*.component.{scss,html}

📄 CodeRabbit inference engine (AGENTS.md)

Use global style classes from src/styles/globals/ (e.g., flex-row, margin-regular) instead of creating new custom styles

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
  • src/app/core/import/import-additional-settings/import-additional-settings.component.scss
  • src/app/core/import/import-column-mapping/import-column-mapping.component.html
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.html
  • src/app/core/import/import/import.component.html
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
**/*.component.{html,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Follow WCAG guidelines for accessibility in Aam Digital

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
  • src/app/core/import/import-additional-settings/import-additional-settings.component.scss
  • src/app/core/import/import-column-mapping/import-column-mapping.component.html
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.html
  • src/app/core/import/import/import.component.html
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
**/*.{component,service}.spec.ts

📄 CodeRabbit inference engine (AGENTS.md)

Write unit tests for all new components and services using Jasmine/Karma

Files:

  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts
**/*.spec.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.spec.ts: Mock dependencies properly using Angular testing utilities in unit tests
Use established testing patterns from the Aam Digital project in unit tests

Files:

  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts
**/*.component.html

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.html: Use native control flow (@if, @for, @switch) instead of structural directives (*ngIf, *ngFor, *ngSwitch)
Use class bindings instead of ngClass directive in Angular templates
Use style bindings instead of ngStyle directive in Angular templates
Keep templates simple and avoid complex logic in Angular templates
Use async pipe for observables in Angular templates instead of manual subscriptions

Files:

  • src/app/core/import/import-column-mapping/import-column-mapping.component.html
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.html
  • src/app/core/import/import/import.component.html
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
**/*.service.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.service.ts: Use providedIn: 'root' for singleton services in Angular
Implement proper error handling and logging in Angular services

Files:

  • src/app/core/import/import.service.ts
src/app/core/**/*.{service,module}.ts

📄 CodeRabbit inference engine (AGENTS.md)

Core system modules and services belong in src/app/core/

Files:

  • src/app/core/import/import.service.ts
🧠 Learnings (20)
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.ts : Use Angular Material components for UI consistency following Material Design guidelines

Applied to files:

  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.{scss,html} : Use global style classes from `src/styles/globals/` (e.g., `flex-row`, `margin-regular`) instead of creating new custom styles

Applied to files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.{ts,html} : Use Angular Material accessibility features in components

Applied to files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss
  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import-column-mapping/import-column-mapping.component.ts
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.scss : If custom styles are necessary, create a class with meaningful name in component-specific SCSS file instead of inline styles

Applied to files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.scss
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/models/**/*.entity.ts : Define entity schemas through `DatabaseField()` annotations in model classes

Applied to files:

  • src/app/core/entity/default-datatype/default.datatype.ts
  • src/app/core/import/import-metadata.ts
  • src/app/core/import/import.service.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*datatype*.{service,component}.ts : Implement specific datatypes extending the `DefaultDatatype` class with 'edit' and 'display' components in Aam Digital

Applied to files:

  • src/app/core/entity/default-datatype/default.datatype.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*entity*.{service,component}.ts : Use proper generics for entity types in TypeScript

Applied to files:

  • src/app/core/entity/default-datatype/default.datatype.ts
  • src/app/core/import/import.service.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.ts : Use standalone components (default behavior, do NOT set `standalone: true`)

Applied to files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
  • src/app/core/import/import/import.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.{ts,html} : All user-facing strings must be translatable using Angular i18n markers or `$localize` in Aam Digital

Applied to files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.{component,service}.ts : Create interfaces for configuration objects and let component classes implement them

Applied to files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.{ts,html} : Follow existing translation key patterns in Aam Digital

Applied to files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*entity*.spec.ts : Test entity operations with proper data setup/teardown in unit tests

Applied to files:

  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
  • src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.spec.ts : Use established testing patterns from the Aam Digital project in unit tests

Applied to files:

  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.{component,service}.spec.ts : Write unit tests for all new components and services using Jasmine/Karma

Applied to files:

  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.spec.ts : Mock dependencies properly using Angular testing utilities in unit tests

Applied to files:

  • src/app/core/import/import.service.spec.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to src/app/core/demo-data/**/*.ts : Provide demo data generators for new entities using `faker-js/faker` following existing demo data patterns

Applied to files:

  • src/app/core/import/import.service.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*entity*.service.ts : Use entity services for data access and caching in Aam Digital

Applied to files:

  • src/app/core/import/import.service.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.ts : Prefer Reactive Forms over Template-driven forms in Angular

Applied to files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to src/app/core/demo-data/**/*.ts : Follow existing demo data patterns in `core/demo-data/` when creating test data

Applied to files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to src/app/core/common-components/**/*.component.ts : Shared components belong in `src/app/core/common-components/`

Applied to files:

  • src/app/core/import/import-review-data/import-review-data.component.ts
  • src/app/core/import/import/import.component.ts
🧬 Code graph analysis (9)
src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts (1)
src/app/core/import/import-additional-settings/import-additional-settings.component.ts (1)
  • ImportAdditionalSettings (14-16)
src/app/core/import/import-metadata.ts (1)
src/app/core/import/import-additional-settings/import-additional-settings.component.ts (1)
  • ImportAdditionalSettings (14-16)
src/app/core/import/import-column-mapping/mapping-dialog-data.ts (3)
src/app/core/import/column-mapping.ts (1)
  • ColumnMapping (4-22)
src/app/core/entity/model/entity.ts (1)
  • EntityConstructor (43-46)
src/app/core/import/import-additional-settings/import-additional-settings.component.ts (1)
  • ImportAdditionalSettings (14-16)
src/app/core/import/import-additional-settings/import-additional-settings.component.ts (3)
src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.ts (1)
  • Component (31-164)
src/app/core/import/import-column-mapping/import-column-mapping.component.ts (1)
  • Component (26-80)
src/app/core/import/import-review-data/import-review-data.component.ts (1)
  • Component (38-150)
src/app/core/import/import.service.spec.ts (4)
src/app/core/entity/model/entity.ts (1)
  • Entity (68-490)
src/app/core/entity/database-field.decorator.ts (1)
  • DatabaseField (12-32)
src/app/core/entity/database-entity.decorator.ts (1)
  • EntityRegistry (5-24)
src/app/core/import/column-mapping.ts (1)
  • ColumnMapping (4-22)
src/app/core/import/import-column-mapping/import-column-mapping.component.ts (1)
src/app/core/import/import-additional-settings/import-additional-settings.component.ts (1)
  • ImportAdditionalSettings (14-16)
src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts (1)
src/app/core/import/import.service.ts (1)
  • splitArrayValue (235-254)
src/app/core/import/import-review-data/import-review-data.component.ts (1)
src/app/core/import/import-additional-settings/import-additional-settings.component.ts (1)
  • ImportAdditionalSettings (14-16)
src/app/core/import/import.service.ts (1)
src/app/core/import/import-processing-context.ts (1)
  • ImportProcessingContext (9-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-image
  • GitHub Check: qa / test-e2e
🔇 Additional comments (26)
src/app/core/import/import-additional-settings/import-additional-settings.component.spec.ts (1)

6-45: Well-structured unit tests.

The test suite appropriately covers the component's core functionality:

  • Component creation
  • Default multi-value separator behavior
  • Settings update reactivity
  • Custom separator creation

The tests follow established Angular testing patterns with proper setup and focused assertions.

src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.scss (1)

1-17: Layout improvements support multi-value display.

The styling changes improve the dialog layout for multi-value imports:

  • New .first-column class provides appropriate width and spacing for the imported values column
  • Removed max-width constraints allow the table to utilize available space for better readability

The component-specific layout adjustments are reasonable for this dialog's requirements.

src/app/core/import/import-column-mapping/import-column-mapping.component.html (1)

23-23: The additionalSettings property binding is correctly configured. Both the parent component (ImportColumnMappingComponent) and child component (EditImportColumnMappingComponent) have the property properly declared as @Input() additionalSettings: ImportAdditionalSettings.

src/app/core/entity/default-datatype/default.datatype.ts (1)

113-120: Array handling correctly moved upstream and integrated into ImportService.

The breaking signature change from Promise<EntityType | EntityType[]> to Promise<EntityType> has been properly implemented. Array splitting now occurs in ImportService.importMapValue() before calling importMapFunction, which correctly:

  • Calls splitArrayValue() when schema.isArray is true
  • Loops through individual values, calling importMapFunction once per value
  • Accumulates results in the final array

All callers have been updated, and array field imports continue to work as verified by existing tests.

src/app/core/import/import-column-mapping/mapping-dialog-data.ts (1)

3-3: LGTM: Clean interface extension for additional settings.

The addition of the optional additionalSettings property to MappingDialogData is well-typed and backward compatible, enabling the import flow to pass multi-value separator configuration through to mapping dialogs.

Also applies to: 9-9

src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.html (2)

2-7: LGTM: Helpful user guidance added.

The hint box provides clear upfront explanation of the mapping process, improving user experience. The text is properly internationalized.


11-11: The "first-column" CSS class is defined in the component's SCSS file and correctly replaces inline styles with a meaningful class name.

src/app/core/import/import/import.component.ts (1)

23-23: LGTM: Proper component registration.

The ImportAdditionalSettingsComponent is correctly imported and registered in the standalone component's imports array, enabling its use in the template. This follows Angular standalone component patterns correctly.

Also applies to: 42-42

src/app/core/import/import-metadata.ts (1)

6-6: LGTM: Well-documented interface extension.

The addition of the optional additionalSettings property to ImportSettings is properly typed and includes clear JSDoc documentation. The placement at the end of the interface is appropriate and maintains backward compatibility.

Also applies to: 76-78

src/app/core/import/import-additional-settings/import-additional-settings.component.html (2)

1-13: LGTM: Well-structured expansion panel with helpful guidance.

The expansion panel is appropriately disabled until an entity type is selected, and the help button provides clear context to users. Internationalization is properly implemented.


15-29: LGTM: Clear form field implementation.

The multi-value separator field is well-implemented with autocomplete functionality and helpful guidance. The internationalization is properly applied.

Note: The template uses [(ngModel)] for two-way binding. While this works, the coding guidelines prefer Reactive Forms for most scenarios. However, for a simple settings panel like this, the template-driven approach is acceptable.

src/app/core/import/import-column-mapping/edit-import-column-mapping/edit-import-column-mapping.component.spec.ts (1)

66-66: LGTM! Test correctly verifies the new data flow.

The test properly sets additionalSettings and verifies it's passed through to the dialog data, ensuring the new functionality works as expected.

Also applies to: 83-83

src/app/core/import/import-additional-settings/import-additional-settings.component.ts (4)

14-16: LGTM! Clean interface definition.

The ImportAdditionalSettings interface is well-defined with an optional multiValueSeparator property, providing clear typing for the additional import settings.


21-34: LGTM! Component configuration follows best practices.

The component properly uses:

  • OnPush change detection strategy for performance
  • Angular Material components for UI consistency
  • Appropriate module imports

36-38: LGTM! Proper use of signal-based inputs.

The component correctly uses input() and model() functions instead of decorators, following the coding guidelines for modern Angular patterns.

Based on coding guidelines for **/*.component.ts.


50-50: Remove this comment; the function is necessary.

createCustomSeparator is the createOption callback passed to BasicAutocompleteComponent (line 21) that enables users to create custom separators beyond the predefined options. The current implementation (returning input unchanged) is valid and tested. It can accept additional validation logic in the future without changing the function's signature.

Likely an incorrect or invalid review comment.

src/app/core/import/import.service.ts (2)

181-213: Array handling implementation looks solid.

The logic correctly:

  • Splits values using the configurable separator
  • Maps each item individually with isArray: false to ensure datatypes handle single values
  • Filters out empty/null/undefined mapped results
  • Deduplicates values using Set

This approach properly delegates single-value mapping to existing datatype logic.


216-222: LGTM! Empty array validation is appropriate.

Treating empty arrays as undefined is consistent with the existing validation logic for other falsy values and prevents saving meaningless empty array fields.

src/app/core/import/import.service.spec.ts (3)

212-254: LGTM! Comprehensive test coverage for array parsing.

The test thoroughly validates:

  • JSON array parsing
  • Comma-separated value splitting
  • Single value handling
  • Empty string handling (returns undefined)
  • Invalid JSON fallback (treated as single string)

Proper mocking and spy verification ensure the datatype's importMapFunction is invoked correctly.

Based on learnings, this follows established testing patterns for the Aam Digital project.


256-299: LGTM! Validates configurable separator functionality.

The test effectively demonstrates that the multiValueSeparator setting works correctly by testing the same raw data with different separators and verifying different parsing results. This ensures the separator configuration flows through the import pipeline properly.


301-328: LGTM! Verifies deduplication behavior.

The test confirms that duplicate values are properly filtered from both comma-separated and JSON array inputs, preventing data bloat in multi-select fields.

src/app/core/import/import/import.component.html (2)

80-83: LGTM! Additional settings properly integrated into import flow.

The new app-import-additional-settings component is correctly positioned in STEP 2 after entity type selection, with appropriate bindings for entity context and two-way data flow.


132-132: LGTM! Settings correctly propagated to downstream components.

The additionalSettings are properly passed to both the column mapping and review data components, ensuring the multi-value separator configuration is available throughout the import pipeline.

Also applies to: 162-162

src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts (3)

17-17: LGTM! Proper code reuse and component imports.

Importing splitArrayValue from the import service promotes code reuse and consistency. The addition of HintBoxComponent aligns with UI enhancements for the discrete import configuration dialog.

Also applies to: 24-24, 41-41


66-87: LGTM! Proper value splitting and deduplication.

The method correctly:

  • Uses the configured separator with a sensible default
  • Leverages splitArrayValue for consistent parsing
  • Filters out null/empty values before and after splitting
  • Deduplicates using Set

This ensures the discrete import mapping dialog displays unique values from potentially multi-value cells.


60-63: LGTM! Good refactoring for separation of concerns.

Extracting the splitting logic into splitAndFlattenValues and passing the result to getFormValues makes the data flow explicit and improves testability. The signature change clearly indicates that getFormValues operates on pre-processed values.

Also applies to: 89-89

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In
@src/app/core/import/import-additional-settings/import-additional-settings.component.html:
- Around line 23-27: The i18n attribute is placed incorrectly on the component
element; change the bare i18n on the app-help-button to target the text input by
replacing i18n with i18n-text so the text attribute is marked for translation
(update the app-help-button instance where text="Which character..." to use
i18n-text instead of i18n).
🧹 Nitpick comments (1)
src/app/core/import/import-additional-settings/import-additional-settings.component.html (1)

5-11: Replace inline style with a class binding.

Line 6 uses an inline style attribute, which violates the coding guidelines. Based on coding guidelines, prefer using global style classes or style bindings instead of inline styles.

🔎 Suggested fix using a style class

If a global utility class exists for float-right, use it:

     <app-help-button
-      style="float: right"
+      class="float-right"
       text="Configure additional settings for the import process.

Alternatively, use style binding:

     <app-help-button
-      style="float: right"
+      [style.float]="'right'"
       text="Configure additional settings for the import process.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbc1988 and bbc7307.

📒 Files selected for processing (3)
  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
  • src/app/core/import/import.service.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/app/core/import/import.service.ts
🧰 Additional context used
📓 Path-based instructions (10)
**/*.component.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.ts: Use standalone components (default behavior, do NOT set standalone: true)
Prefer input() and output() functions over @Input and @Output decorators in Angular components
Use signals for reactive state management with computed() for derived state
Set changeDetection: ChangeDetectionStrategy.OnPush for all components
Prefer inline templates for small components in Angular
Prefer Reactive Forms over Template-driven forms in Angular
Use NgOptimizedImage for static images instead of base64 encoded images
Use Angular Material components for UI consistency following Material Design guidelines
Implement OnPush change detection strategy for performance optimization
Use trackBy functions for lists in Angular templates for performance optimization

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
**/*.{component,service,directive,guard,interceptor,resolver,pipe}.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use inject() function instead of constructor injection for dependencies

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
**/*.{component,service}.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{component,service}.ts: Use update() or set() instead of mutate() when modifying signals in Angular
Create interfaces for configuration objects and let component classes implement them

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
**/*.{component,directive}.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{component,directive}.ts: Do NOT use @HostBinding and @HostListener decorators; put host bindings inside the host object of @Component or @Directive decorator
Implement proper permissions checking via CASL integration using EntityAbility and DisableEntityOperationDirective

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
src/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.ts: Use strict type checking with TypeScript and avoid any type; use unknown when type is uncertain
Prefer type inference in TypeScript when obvious

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
src/**/*.{ts,js}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,js}: Use ESLint for linting (npm run lint)
Use Prettier for code formatting

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
**/*.component.{ts,html}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.{ts,html}: All user-facing strings must be translatable using Angular i18n markers or $localize in Aam Digital
Follow existing translation key patterns in Aam Digital
Use Angular Material accessibility features in components

Files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
**/*.component.html

📄 CodeRabbit inference engine (AGENTS.md)

**/*.component.html: Use native control flow (@if, @for, @switch) instead of structural directives (*ngIf, *ngFor, *ngSwitch)
Use class bindings instead of ngClass directive in Angular templates
Use style bindings instead of ngStyle directive in Angular templates
Keep templates simple and avoid complex logic in Angular templates
Use async pipe for observables in Angular templates instead of manual subscriptions

Files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
**/*.component.{scss,html}

📄 CodeRabbit inference engine (AGENTS.md)

Use global style classes from src/styles/globals/ (e.g., flex-row, margin-regular) instead of creating new custom styles

Files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
**/*.component.{html,scss}

📄 CodeRabbit inference engine (AGENTS.md)

Follow WCAG guidelines for accessibility in Aam Digital

Files:

  • src/app/core/import/import-additional-settings/import-additional-settings.component.html
🧠 Learnings (3)
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.ts : Use Angular Material components for UI consistency following Material Design guidelines

Applied to files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.ts : Prefer Reactive Forms over Template-driven forms in Angular

Applied to files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
📚 Learning: 2025-11-26T16:20:52.119Z
Learnt from: CR
Repo: Aam-Digital/ndb-core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-26T16:20:52.119Z
Learning: Applies to **/*.component.{ts,html} : Use Angular Material accessibility features in components

Applied to files:

  • src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts
🧬 Code graph analysis (1)
src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts (1)
src/app/core/import/import.service.ts (1)
  • splitArrayValue (235-255)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: qa / test-unit
  • GitHub Check: qa / test-e2e
  • GitHub Check: build-webapp
🔇 Additional comments (7)
src/app/core/import/import-additional-settings/import-additional-settings.component.html (1)

1-30: Overall structure looks good.

The template properly uses Angular Material components, provides accessibility features (labels, help buttons, disabled state), and implements the multi-value separator setting as intended. The help text on line 24 appropriately describes the feature for array-type fields with multi-select as an example.

src/app/core/basic-datatypes/discrete/discrete-import-config/discrete-import-config.component.ts (6)

17-17: LGTM: Imports are correct and necessary.

The imports of splitArrayValue and HintBoxComponent support the new multi-value splitting functionality and UI updates.

Also applies to: 24-24


41-41: LGTM: Component import follows standalone pattern.

Adding HintBoxComponent to the imports array is correct for standalone components.


60-63: LGTM: ngOnInit correctly integrates multi-value splitting.

The initialization logic properly computes split values before passing them to form construction, maintaining clean separation of concerns.


69-87: LGTM: splitAndFlattenValues correctly implements multi-value splitting.

The implementation properly handles:

  • Configurable separator with sensible default
  • Null and empty value filtering at both input and part levels
  • Type safety via String(part) conversion (necessary since splitArrayValue returns [val] for non-string inputs)
  • Efficient deduplication using Set

The JSDoc clearly documents the method's purpose.


89-89: LGTM: Method signature update is appropriate.

Adding the values parameter enables the method to work with pre-split values. Since this is a private method called only from within the component, the signature change doesn't create breaking changes.


101-101: LGTM: Iteration correctly uses pre-split values.

Iterating the values parameter instead of this.data.values ensures form controls are created for the deduplicated, split values as intended.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@sleidig sleidig requested review from Abhinegi2 and sadaf895 January 5, 2026 21:11
Copy link
Contributor

@sadaf895 sadaf895 left a comment

Choose a reason for hiding this comment

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

@sleidig The PR is technically sound with good architecture and test coverage. Just one edge case in my mind that the current implementation doesn't handle CSV standard quoting conventions. If a field value is ["value, with comma"] and the separator is , (comma) it will be split incorrectly. Isn't it?

@sleidig
Copy link
Member Author

sleidig commented Jan 6, 2026

Just one edge case in my mind that the current implementation doesn't handle CSV standard quoting conventions. If a field value is ["value, with comma"] and the separator is , (comma) it will be split incorrectly. Isn't it?

What do we define as correct splitting there? 😅
You are probably right - especially because we don't let users disable the parsing of JSON (or explain that functionality anywhere), they would probably expect [["value, with comma"]] as a result, instead of interpreting this as JSON? That'S a good observation!

... because I don't see a very simple way out, I'll give myself the excuse saying "it's extremely rare that you have a perfectly correct JSON string but don't want it to be interpreted as JSON". Let's keep it aside for now. The clean solution would probably be to add another option to the settings UI that allows to turn JSON parsing on/off.

@sleidig sleidig merged commit 1e4955a into master Jan 6, 2026
17 checks passed
@sleidig sleidig deleted the feat/import-array-values branch January 6, 2026 13:37
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.68.0-master.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released on @master managed by CI (semantic-release) label Jan 6, 2026
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.68.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released managed by CI (semantic-release) label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @master managed by CI (semantic-release) released managed by CI (semantic-release)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import array of values (for enum-multi)

4 participants