Skip to content

deposit-ui: fix sections config and form feedback to not use DOM #2072

@slint

Description

@slint

We're currently using the DOM API (e.g. document.querySelectorall(".invenio-accordion-field");) to find all the form accordion section IDs and their form fields, to group them when displaying the form feedback banner at the top of the form.

This is a bad practice in React, which can cause rendering issues down the line. We should refactor this logic to use a React-compatible way for:

  • Defining form sections config at a higher level. This should take into account:
    • Custom fields config in the form
    • Any customizations that instances make to the form, so that e.g. new fields and sections are properly registered
  • Passing the defined sections config to:
    • The accordion section components
    • The form feedback banner component

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog 😴

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions