Skip to content

Expand drag-and-drop array reordering to secondary form contexts (Data Tables, Generic Actions, Calculations) #408

Description

@JoyceIli

Code of Conduct

  • I agree to follow this project's Code of Conduct

AI Policy

  • I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.

Is your feature request related to a problem? Please describe.

Drag-and-drop primitive array reordering has been introduced for standard create/update resource forms in the UI. However, secondary form interfaces across the admin panel still rely on static array inputs. Users currently have no way to adjust item sequences in these areas without deleting and completely re-typing the entries from scratch, creating a fragmented user experience.

Describe the solution you'd like

I would like to extend the update_array_sorting event-handling pattern and server-side map reindexing math across the remaining form contexts:

  • Data Tables (data_table.ex): Implement the event handler to support drag-and-drop list reordering inside query filter configurations.

  • Generic Actions (generic_action.ex): Support array argument sorting within custom script and action parameter execution forms.

  • Resource Show Page Calculations (show.ex): Enable reordering for calculation argument inputs handled natively via low-level map tracking states rather than standard form structs.

Describe alternatives you've considered

No response

Additional context

The core UI layout, CSS styling rules (.sortable-ghost, .sortable-drag), frontend hook logic (Hooks.Sortable), and backend normalization handlers (to_indexed_map/1, reorder_by_indices/2) already exist in the codebase. This issue specifically covers wiring those existing pieces into the remaining LiveView component layers

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions