Skip to content

Create EntityAttributeDynamicListField component in Catalog-UI #75

@Zorin95670

Description

@Zorin95670

Description
We need to create a EntityAttributeDynamicListField component in the Catalog-UI frontend. This component will allow managing dynamic lists by fetching values from the backend.

By default, the component should support the following rules:

  • required — ensures a value is selected.
  • useApiValidation — enables validation of the selected value against backend rules.

⚠️ Note: An update in CoreLib will be required to support this component.

Scope

The EntityAttributeDynamicListField component must provide:

  • Fetching the list of available options from the backend endpoint.
  • Rendering the list for user selection.
  • Applying the default rules (required and useApiValidation).
  • Handling empty states and API errors gracefully.

Functional Details

  • Data Fetching

    • The component must call the backend endpoint to retrieve the available values.
    • Values must be displayed in a dropdown or other selectable UI element.
    • The component should update dynamically when the backend data changes.
  • Validation

    • The required rule must enforce selection before form submission.
    • The useApiValidation rule must validate the selected value using backend-provided validation logic.
    • Validation feedback should be visible to the user.
  • UI/UX

    • The component must follow existing Catalog-UI design system conventions.
    • Display loading state while fetching data.
    • Display a clear message if the list is empty or the API fails.

Requirements

  • The component must be reusable across multiple forms.
  • The backend endpoint URL should be configurable via props or context.
  • The component must be compatible with existing form libraries used in Catalog-UI.
  • Must support accessibility standards (keyboard navigation, screen readers).
  • CoreLib must be updated to support the dynamic list rules and API validation required by this component.

Acceptance Criteria

  • The EntityAttributeDynamicListField component exists and can fetch values from the backend.
  • The component correctly applies required and useApiValidation rules.
  • The list updates dynamically based on backend responses.
  • Proper loading and error states are displayed.
  • The component follows Catalog-UI design and accessibility standards.
  • Documentation is provided for how to use the component and configure the backend endpoint.
  • CoreLib changes supporting dynamic list rules and API validation are merged and available.

Rationale
Providing a reusable EntityAttributeDynamicListField component standardizes the way dynamic lists are displayed and validated across Catalog-UI forms, reducing duplicated logic and ensuring consistency in form behavior.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions