ash-project / ash-project/ash_admin

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

Open
#408 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
180
Forks
78
Avg merge
5h 30m
Merged PRs (30d)
5

Description

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

### AI Policy

- [x] 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

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing update_array_sorting implementation and its use of to_indexed_map/1 and reorder_by_indices/2. Then inspect data_table.ex, generic_action.ex, and show.ex to wire the existing sortable behavior into query filters, action arguments, and calculation arguments. Done means drag-and-drop reordering works and preserves array order in all three contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.