Uh oh!
There was an error while loading. Please reload this page.
feat(components,app-shell): Studio 列拖动重排 → 写回字段元数据顺序 - #2092
Merged
Conversation
…rsist field order 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: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Uh oh!
There was an error while loading. Please reload this page.
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
按用户方向:列拖动重排是表格组件已有功能,不重复开发——只在设计模式启用它,并把新顺序保存到对象的字段元数据(字段显示顺序 = 元数据顺序;拖动即改元数据顺序)。
改了什么
GridFieldAuthoringcontext 加onReorderFields(orderedFieldNames)。提供它就启用 data-table 内建的列拖拽(reorderEnabled)并把 drop 的新列序回调给宿主。data-table在列 drop 时调fieldAuthoring.onReorderFields(与它原有的onColumnsReorder并存),拖拽手柄/draggable 都 gate 在reorderEnabled。DataPillar把对象fields重排成新序——只重排可见字段(在它们各自的槽位内),系统/隐藏字段(不作为列显示的,如 organization_id/created_at)保持原位——再save+publish+重挂网格。验证(浏览器实测,showcase_account)
把 Industry 拖到最前 → effective 字段顺序
[owner_id, name, industry, …]→[industry, owner_id, name, …];系统字段(organization_id/created_at/…)仍在最前(没被挤走);写入 env overlay 持久化、刷新后保持。eslint .0 error /tsc0 error / data-table 6 测通过。仅 objectui main,未 live。🤖 Generated with Claude Code