Commit f98f696
feat(components,app-shell): enable column drag-reorder in Studio + persist field order (#2092)
The data-table already implements column drag-reorder; this enables it in the
Studio Data grid (design mode) and persists the new order to the object's FIELD
METADATA (field display order = metadata order), per spec — no drag re-implemented.
- GridFieldAuthoring context gains onReorderFields(orderedFieldNames). Providing it
enables the table's built-in reorder (reorderEnabled) and routes the drop's new
column order to the host.
- data-table calls fieldAuthoring.onReorderFields on column drop (alongside its
existing onColumnsReorder) and gates the drag affordances on reorderEnabled.
- DataPillar reorders the object's fields to match — keeping system/hidden fields
(not shown as columns) in place, reordering only the visible fields among their
slots — then save + publish + remount.
Verified live (showcase_account): drag Industry to the front → effective field order
[owner_id,name,industry,...] → [industry,owner_id,name,...]; system fields
(organization_id/created_at/...) stay first; persisted to the env overlay.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 186f5a1 commit f98f696
3 files changed
Lines changed: 56 additions & 8 deletions
File tree
- packages
- app-shell/src/views/studio-design
- components/src
- context
- renderers/complex
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
734 | 768 | | |
735 | 769 | | |
736 | 770 | | |
| |||
799 | 833 | | |
800 | 834 | | |
801 | 835 | | |
| 836 | + | |
802 | 837 | | |
803 | 838 | | |
804 | 839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
| |||
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
565 | | - | |
| 568 | + | |
566 | 569 | | |
567 | 570 | | |
568 | 571 | | |
569 | 572 | | |
570 | 573 | | |
571 | | - | |
| 574 | + | |
572 | 575 | | |
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
576 | 579 | | |
577 | 580 | | |
578 | | - | |
| 581 | + | |
579 | 582 | | |
580 | | - | |
| 583 | + | |
581 | 584 | | |
582 | 585 | | |
583 | 586 | | |
| |||
587 | 590 | | |
588 | 591 | | |
589 | 592 | | |
590 | | - | |
| 593 | + | |
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
594 | | - | |
| 597 | + | |
595 | 598 | | |
596 | 599 | | |
597 | 600 | | |
598 | 601 | | |
| 602 | + | |
| 603 | + | |
599 | 604 | | |
600 | 605 | | |
601 | 606 | | |
| |||
927 | 932 | | |
928 | 933 | | |
929 | 934 | | |
930 | | - | |
| 935 | + | |
931 | 936 | | |
932 | 937 | | |
933 | 938 | | |
| |||
940 | 945 | | |
941 | 946 | | |
942 | 947 | | |
943 | | - | |
| 948 | + | |
944 | 949 | | |
945 | 950 | | |
946 | 951 | | |
| |||
0 commit comments