Skip to content

Refactor: Standardize drawer-based forms using DynamicForm (Namespaces, Badges, and VR) #2238

@LuizFNJ

Description

@LuizFNJ

Background Information

Currently, the forms within our drawers follow inconsistent implementation patterns. The Namespaces and Badges workflows are still using manual form structures, while the Verification Request (VR) editor uses a hybrid approach—utilizing the DynamicForm but manually defining fields instead of leveraging the built-in createFormField utility.

Additionally, some inputs (such as the source input in VR) were built outside the dynamic ecosystem, requiring manual error handling, requirement controls, and validation logic.

Transitioning these workflows to a 100% DynamicForm approach is beneficial because:

  • Standardization: It aligns all drawer-based workflows with the platform's existing dynamic architecture.
  • Reduced Complexity: It eliminates the need for boilerplate code like manual setError, isRequired checks, and custom validation states.
  • Native Support: It provides out-of-the-box support for defaultValues in edit modes and centralized error handling.
  • Maintainability: Using createFormField ensures that any future updates to the dynamic system automatically propagate to these forms.

How

  • Namespaces & Badges: Perform a full migration to DynamicForm. Replace all manual state management and native HTML/UI inputs with the standard dynamic configuration.
  • Verification Request: Refactor the existing VR editor to use the createFormField helper for all fields, ensuring consistency with the platform's best practices.
  • Input Integration: Migrate the custom "source" input (and any other standalone inputs) into the DynamicInput component ecosystem so they can benefit from global validation and error handling.
  • Lifecycle Management: Ensure that defaultValues are correctly mapped for edit workflows and that all required/optional logic is handled via the dynamic schema.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions