Skip to content

Conversation

@Kovy95
Copy link
Contributor

@Kovy95 Kovy95 commented Nov 4, 2025

Description

  • add resolving i18n to panels

Fixes NAE-2251

Dependencies

none

Third party dependencies

No new dependencies were introduced

Blocking Pull requests

There are no dependencies on other PR

How Has Been This Tested?

manually

Test Configuration

<Please describe configuration for tests to run if applicable, like program parameters, host OS, VM configuration etc. You can use >

Name Tested on
OS linux mint 22
Runtime node 20.18.0
Dependency Manager npm 10
Framework version angular 17
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @...
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

Summary by CodeRabbit

  • New Features

    • Multi-language support for form field values and button labels with improved fallback resolution.
    • Field option metadata extended to include per-option translations and optional identifier keys for richer localization.
    • Search/filter update: identifier is now optional and a new optional processId filter is available.
  • Tests

    • Test fixtures updated to include translation fields for enum and immediate-data examples.

@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Walkthrough

Adds locale-aware translation resolution for immediate-data values, expands ImmediateData.options to use per-key I18nFieldValue entries, makes PetriNetSearchRequest.identifier optional and adds processId?: string, and updates test fixtures to include empty translations objects for enum defaults.

Changes

Cohort / File(s) Summary
Search request model
projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts
PetriNetSearchRequest.identifier changed from identifier: string to identifier?: string; added optional processId?: string with comment "Queried PetriNet mongo ID".
ImmediateData interface
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts
Import I18nFieldValue added; ImmediateData.options changed from options?: { defaultValue?: string } to options?: { [k: string]: I18nFieldValue } (per-key i18n metadata).
Translation support & panel logic
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
Imported I18nFieldValue; added `protected getTranslation(i18n: I18nFieldValue
Test fixtures
projects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.ts, projects/netgrif-components/src/lib/panel/case-panel/case-panel.component.spec.ts
Test enum/defaultValue fixtures extended to include translations: {} inside their defaultValue objects.

Sequence Diagram(s)

sequenceDiagram
    participant Panel as PanelWithImmediateData
    participant Options as ImmediateData.options
    participant I18n as I18nFieldValue

    rect rgb(240,248,255)
    Note right of Panel: Resolve displayed label/value (new flow)
    Panel->>Options: read option entry (enum/multichoice/button)
    alt option includes I18nFieldValue
        Panel->>I18n: getTranslation(i18n)
        I18n-->>Panel: localized string (preferred)
    else no i18n metadata
        Options-->>Panel: return defaultValue (fallback)
    end
    Panel->>Panel: render resolved label/value
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus:
    • panel-with-immediate-data.ts: verify getTranslation logic, locale fallback behavior, and all replaced call sites.
    • immediate-data.ts: ensure type change to I18nFieldValue aligns with all usages and imports.
    • case-search-request-body.ts: confirm callers tolerate optional identifier and the new processId field.
    • Tests: validate updated fixture shapes do not break assumptions about defaultValue structure.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately reflects the main objective: adding i18n translation support for map field options, which is the core change across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8af27f2 and 42b46b6.

📒 Files selected for processing (1)
  • projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (1)
projects/netgrif-components-core/src/lib/data-fields/i18n-field/models/i18n-field-value.ts (1)
  • I18nFieldValue (1-5)
⏰ 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). (6)
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
  • GitHub Check: Matrix Test (20)
  • GitHub Check: Matrix Test (22)
  • GitHub Check: Matrix Test (24)
  • GitHub Check: Test with SonarCloud
🔇 Additional comments (1)
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (1)

51-53: Looking at the search results, I need to verify the implementation details of the translation helper and confirm compatibility.

Breaking change in ImmediateData.options type requires verification of all usages.

The options property changes from a simpler structure to a map of I18nFieldValue objects. Based on codebase analysis, only panel-with-immediate-data.ts accesses option values (lines 52, 59), and it already uses the getTranslation() helper for this PR. Other usages only check existence or iterate keys, which are compatible with the new structure.

However, verify:

  1. Backend/API responses for enumeration_map and multichoice_map fields provide the full I18nFieldValue structure with {defaultValue, key?, translations?}
  2. Any test fixtures or mock data in the codebase that create ImmediateData with options are updated accordingly
  3. Confirm no dynamic option creation code exists outside the searched paths

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.

@coderabbitai coderabbitai bot added the bugfix label Nov 4, 2025
Copy link

@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: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37711a2 and 8ea7246.

📒 Files selected for processing (4)
  • projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts (1 hunks)
  • projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts (4 hunks)
  • projects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.ts (1 hunks)
  • projects/netgrif-components/src/lib/panel/case-panel/case-panel.component.spec.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-21T11:17:07.053Z
Learnt from: renczesstefan
Repo: netgrif/components PR: 295
File: projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts:0-0
Timestamp: 2025-08-21T11:17:07.053Z
Learning: In the netgrif-components codebase, `stringId` has been deprecated in favor of `id` in search request bodies like CaseSearchRequestBody. When creating search payloads for SimpleFilter.fromCaseQuery() or similar methods, use `id` instead of `stringId`. However, accessing the `.stringId` property on existing objects like Case is still valid since the objects retain this property.

Applied to files:

  • projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts
🧬 Code graph analysis (1)
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts (1)
projects/netgrif-components-core/src/lib/data-fields/i18n-field/models/i18n-field-value.ts (1)
  • I18nFieldValue (1-5)
⏰ 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). (5)
  • GitHub Check: task-list-completed
  • GitHub Check: Matrix Test (24)
  • GitHub Check: Matrix Test (22)
  • GitHub Check: Test with SonarCloud
  • GitHub Check: Matrix Test (20)
🔇 Additional comments (4)
projects/netgrif-components/src/lib/panel/case-panel/case-panel.component.spec.ts (1)

107-107: LGTM! Test data updated for I18nFieldValue support.

The enum value structure now correctly matches the I18nFieldValue interface used in the production code, with the translations object properly initialized.

projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts (1)

10-10: LGTM! I18nFieldValue import added.

The import correctly brings in the I18nFieldValue interface needed for translation support.

projects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.ts (1)

166-166: LGTM! Test data structure updated consistently.

The enum value structure correctly matches the I18nFieldValue interface, maintaining consistency with the parallel test file update in the components library.

projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts (1)

85-89: I need to verify the actual baseline state of the identifier field. Let me search for validation logic and check test files.

Based on my verification of the codebase and industry standards, the original review comment contains an incorrect characterization of the changes.

The characterization of making identifier optional as a breaking change is incorrect.

According to standard API design practices, adding optional parameters to an invocation target can be safe, whereas adding required parameters is a breaking change. You can enhance your code gradually by adding optional fields without breaking existing code or interfaces.

The code review shows:

  • identifier?: string; (already optional)
  • processId?: string; (new optional field)
  • Existing usage at line 492 creates objects with only identifier: {identifier: id} as a PetriNetSearchRequest

This pattern is compatible with both fields being optional. The change is additive and non-breaking for client code.

However, a valid concern remains: If both fields can now be omitted, the backend must validate that at least one is present for meaningful queries. This is not a breaking change to the TypeScript interface, but a requirement for runtime correctness that should be documented and validated at the API boundary (backend endpoint).

Likely an incorrect or invalid review comment.

Comment on lines +43 to 62
return {value: this.getTranslation(immediate.value), icon: undefined, type: immediate.type};
case 'multichoice':
return {
value: immediate.value.map(it => it.defaultValue).join(', '),
value: immediate.value.map(it => this.getTranslation(it)).join(', '),
icon: undefined,
type: immediate.type
};
case 'enumeration_map':
return {
value: immediate.options[immediate.value].defaultValue,
value: this.getTranslation(immediate.options[immediate.value]),
icon: undefined,
type: immediate.type
};
case 'multichoice_map':
return {
value: immediate.value.map(it =>
immediate.options[it].defaultValue).join(', '), icon: undefined, type: immediate.type
this.getTranslation(immediate.options[it])).join(', '),
icon: undefined,
type: immediate.type
};
Copy link

@coderabbitai coderabbitai bot Nov 4, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify type compatibility for immediate data values.

The code now assumes that values for enumeration, multichoice, enumeration_map, and multichoice_map field types conform to the I18nFieldValue interface. Ensure that:

  1. The ImmediateData interface definitions for these field types guarantee values are I18nFieldValue objects
  2. Backend APIs always return data in this format for these field types
  3. Existing data in the system has been migrated to include the translations field (even if empty)

Run the following script to verify the ImmediateData type definitions:


🏁 Script executed:

#!/bin/bash
# Description: Verify ImmediateData interface and type definitions

# Find ImmediateData interface definition
ast-grep --pattern 'interface ImmediateData {
  $$$
}'

# Find type definitions for immediate data values
rg -nP --type=ts 'type.*=.*enumeration|multichoice' -A5 -B5 -g '!node_modules'

Length of output: 113361


Looking at the shell script results to verify the type safety concerns in the panel-with-immediate-data.ts code.


🏁 Script executed:

#!/bin/bash
# Search for I18nFieldValue type definition and getTranslation method

echo "=== Searching for I18nFieldValue type ==="
rg -nP --type=ts 'type I18nFieldValue|interface I18nFieldValue' -A5

echo "=== Searching for getTranslation method in panel-with-immediate-data.ts ==="
rg -nP --type=ts 'getTranslation' projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts -B5 -A5

echo "=== Searching for where immediate.options is used ==="
rg -nP --type=ts 'immediate\.options' -B3 -A3

Length of output: 5260


🏁 Script executed:

#!/bin/bash
# Deep dive into getTranslation and I18nFieldValue

echo "=== Find I18nFieldValue definition ==="
fd -t f -e ts | xargs grep -l "I18nFieldValue" | head -5
rg -nP "type I18nFieldValue|interface I18nFieldValue" -A10 --type=ts

echo "=== Find getTranslation implementation ==="
ast-grep --pattern 'getTranslation($_) {
  $$$
}'

echo "=== Check panel-with-immediate-data.ts full content ==="
cat projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts | head -100

Length of output: 6895


Type definitions for ImmediateData are insufficient for enumeration_map and multichoice_map field types.

The ImmediateData interface (line 50) defines options?: { defaultValue?: string }, but the code at lines 52 and 59 treats it as a map of I18nFieldValue objects. Additionally, value is typed as any rather than enforcing the expected I18nFieldValue structure for enumeration and multichoice cases.

The type mismatch should be fixed in the interface definition:

// Current ImmediateData.options definition
options?: { defaultValue?: string };

// Should be (for enumeration_map/multichoice_map types)
options?: Record<string, I18nFieldValue>;

Also consider tightening the value field type for these field types using discriminated unions if possible, or at minimum document the expected structure in comments.

🤖 Prompt for AI Agents
In
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
around lines 43 to 62, the ImmediateData type is too loose for enumeration_map
and multichoice_map: options is currently declared as { defaultValue?: string }
and value is any, but the code treats options as a map of I18nFieldValue and
values as keys/arrays of those keys; update the ImmediateData.interface so
options?: Record<string, I18nFieldValue> (or equivalent map type) and narrow
value types (use a discriminated-union for field type cases or at minimum
document expected structures and replace any with the appropriate string or
string[] types for enumeration_map and multichoice_map) so the runtime access
immediate.options[immediate.value] and immediate.options[it] types-check
correctly.

Copy link
Member

Choose a reason for hiding this comment

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

Options in ImmediateData interface is defined as follows:

options?: {
        [k: string]: I18nFieldValue
    };

Interface si defined in file projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the current ImmediateData interface definition
echo "=== Current ImmediateData interface definition ==="
cat projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts

Length of output: 1225


@tuplle, thank you for the correction! You're absolutely right. I've verified that the ImmediateData interface in projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts correctly defines options as:

options?: {
    [k: string]: I18nFieldValue
};

This properly supports the usage in panel-with-immediate-data.ts where immediate.options[immediate.value] and immediate.options[it] are accessed. The type definitions are correct, and my earlier concern was based on incorrect information. I apologize for the confusion.

The implementation looks good from a type safety perspective! ✅


🧬 Code Graph Analysis Results

projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts

export interface ImmediateData { /** * @ignore */ stringId: string; /** * @ignore */ // TODO Exist only in Net Immediate data title?: any; /** * @ignore */ type: string; /** * @ignore */ value?: any; /** * Only for Fields of type `CaseRef` and `Filter` */ allowedNets?: Array; /** * Only for Fields of type `Filter` */ filterMetadata?: FilterMetadata; /** * Only for Currency Number Fields */ format?: FormatFilter; /** * Only for Currency Number Fields */ component?: Component; /** * @ignore */ // TODO Exists only in case immediate data name?: any; /** * Only for enumeration_map and multichoice_map */ options?: { [k: string]: I18nFieldValue }; }

projects/netgrif-components-core/src/lib/data-fields/i18n-field/models/i18n-field-value.ts

export interface I18nFieldValue { defaultValue: string; key?: string; translations?: I18nFieldTranslations; }

@machacjozef machacjozef changed the base branch from release/7.0.0-rev9 to release/7.0.0-rev8 November 9, 2025 11:16
@renczesstefan
Copy link
Member

Please check AI's comments, I do not think it is correct in all cases.

Copy link

@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

♻️ Duplicate comments (1)
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (1)

4-55: Restore the map typing for options. The new shape models a single I18nFieldValue, but parseImmediateValue() still does keyed lookups (immediate.options[immediate.value]). Without a string index signature the build breaks and the runtime contract for enumeration_map / multichoice_map stays wrong. Please keep options as a keyed collection, e.g. Record<string, I18nFieldValue>, and adjust the import accordingly.

Apply this diff:

-import {I18nFieldTranslations} from "../../data-fields/i18n-field/models/i18n-field-value";
+import {I18nFieldValue} from "../../data-fields/i18n-field/models/i18n-field-value";
@@
-    options?: {
-        defaultValue?: string,
-        key?: string;
-        translations?: I18nFieldTranslations;
-    };
+    options?: Record<string, I18nFieldValue>;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ea7246 and 92c22c5.

📒 Files selected for processing (2)
  • projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts (4 hunks)
  • projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (1)
projects/netgrif-components-core/src/lib/data-fields/i18n-field/models/i18n-field-value.ts (1)
  • I18nFieldTranslations (7-9)
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts (1)
projects/netgrif-components-core/src/lib/data-fields/i18n-field/models/i18n-field-value.ts (1)
  • I18nFieldValue (1-5)
🪛 Biome (2.1.2)
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts

[error] 81-81: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

⏰ 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). (8)
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
  • GitHub Check: task-list-completed
  • GitHub Check: Matrix Test (22)
  • GitHub Check: Test with SonarCloud
  • GitHub Check: Matrix Test (24)
  • GitHub Check: Matrix Test (20)

Comment on lines +81 to 93
let buttonValue: string;
if ((immediate as any).placeholder?.defaultValue !== undefined) {
buttonValue = this.getTranslation((immediate as any).placeholder);
} else if (immediate.name?.defaultValue !== undefined) {
buttonValue = this.getTranslation(immediate.name);
} else {
buttonValue = this._translate.instant('dialog.submit');
}
return {
value: (immediate as any).placeholder && (immediate as any).placeholder.defaultValue !== undefined
? (immediate as any).placeholder.defaultValue : (immediate.name && immediate.name.defaultValue !== undefined
? immediate.name.defaultValue : this._translate.instant('dialog.submit')),
icon: undefined, type: immediate.type
value: buttonValue,
icon: undefined,
type: immediate.type
};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Wrap the button clause in a block. Declaring let buttonValue directly in the case violates noSwitchDeclarations (Biome error) because the binding leaks to sibling clauses. Enclose this case in braces so the lint/build passes.

Apply this diff:

-                case 'button':
+                case 'button': {
                     let buttonValue: string;
                     if ((immediate as any).placeholder?.defaultValue !== undefined) {
                         buttonValue = this.getTranslation((immediate as any).placeholder);
                     } else if (immediate.name?.defaultValue !== undefined) {
                         buttonValue = this.getTranslation(immediate.name);
                     } else {
                         buttonValue = this._translate.instant('dialog.submit');
                     }
                     return {
                         value: buttonValue,
                         icon: undefined,
                         type: immediate.type
                     };
+                }

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Biome (2.1.2)

[error] 81-81: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.

The declaration is defined in this switch clause:

Safe fix: Wrap the declaration in a block.

(lint/correctness/noSwitchDeclarations)

🤖 Prompt for AI Agents
In
projects/netgrif-components-core/src/lib/panel/abstract/panel-with-immediate-data.ts
around lines 81 to 93, the switch case that declares let buttonValue leaks the
binding to sibling clauses and violates noSwitchDeclarations; wrap that case
body in a block (add { ... }) and move the let buttonValue declaration inside
that block (or change to const) so the variable scope is limited to the case;
ensure the return object remains unchanged and formatting/indentation is updated
accordingly.

Copy link

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92c22c5 and 8af27f2.

📒 Files selected for processing (1)
  • projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (1)
projects/netgrif-components-core/src/lib/data-fields/i18n-field/models/i18n-field-value.ts (1)
  • I18nFieldTranslations (7-9)
⏰ 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: task-list-completed
  • GitHub Check: Test with SonarCloud
  • GitHub Check: task-list-completed
🔇 Additional comments (1)
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts (1)

51-57: The key field is not redundant—it's an intentional part of the normalized data structure.

The original concern is based on a misunderstanding. The key field serves a legitimate purpose: it stores the map key in the value object, following the established pattern from I18nFieldValue in the codebase. This is confirmed by:

  • I18nFieldValue interface (lines 1–5 in i18n-field-value.ts) explicitly includes key?: string
  • I18nField.fromObject() method (line 71–74 in i18n-field.ts) intentionally sets key: templateKey
  • task-content.service.ts (line 283) explicitly converts options: {key: optionKey, value: updatedField.options[optionKey]}

The key field denormalizes the map key into the value object, allowing each option to be self-contained and easier to work with in isolation.

That said, add JSDoc comments to document:

  • The purpose of the options property
  • When and how the translations field is populated
  • The role of the key field (to store the map key for convenience)

Likely an incorrect or invalid review comment.

import {FilterMetadata} from '../../search/models/persistance/filter-metadata';
import {FormatFilter} from '../../data-fields/models/format-filter';
import {Component} from '../../data-fields/models/component';
import {I18nFieldTranslations} from "../../data-fields/i18n-field/models/i18n-field-value";
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix quote style inconsistency.

The import uses double quotes while all other imports in this file use single quotes. Maintain consistency with the existing code style.

Apply this diff to fix the quote style:

-import {I18nFieldTranslations} from "../../data-fields/i18n-field/models/i18n-field-value";
+import {I18nFieldTranslations} from '../../data-fields/i18n-field/models/i18n-field-value';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import {I18nFieldTranslations} from "../../data-fields/i18n-field/models/i18n-field-value";
import {I18nFieldTranslations} from '../../data-fields/i18n-field/models/i18n-field-value';
🤖 Prompt for AI Agents
In
projects/netgrif-components-core/src/lib/resources/interface/immediate-data.ts
around line 4, the import uses double quotes instead of the file's single-quote
style; change the import statement to use single quotes for consistency with the
rest of the file (replace " with ' in that import).

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
43.5% Coverage on New Code (required ≥ 50%)

See analysis details on SonarQube Cloud

@machacjozef machacjozef merged commit 3355fb8 into release/7.0.0-rev8 Nov 11, 2025
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants