Skip to content

[Studio] Expand objectbrick fields in schema mapping class attributes tree#1085

Merged
markus-moser merged 9 commits into2.4from
feat/studio-objectbrick-schema-mapping
Apr 20, 2026
Merged

[Studio] Expand objectbrick fields in schema mapping class attributes tree#1085
markus-moser merged 9 commits into2.4from
feat/studio-objectbrick-schema-mapping

Conversation

@markus-moser
Copy link
Copy Markdown
Contributor

@markus-moser markus-moser commented Apr 16, 2026

In the GraphQL schema definition modal's class attributes sidebar,
objectbricks fields now expand into individual brick type group nodes
(peer-level to 'System columns'), each containing the brick's fields
as draggable items.

- Scan class layout for objectbricks fields with non-empty allowedTypes
- Fetch all required brick layouts in parallel via RTK Query dispatch
- Remove objectbricks container nodes from the data object columns tree
- Build peer-level '<BrickType> Columns' group nodes with fields keyed
  as 'BrickType~fieldname' (tilde separator expected by PHP backend)
- Single loading spinner held until both class layout and all brick
  layouts are fully resolved — no intermediate flash of partial tree

Closes #1022
@markus-moser markus-moser changed the title feat: expand objectbrick fields in schema mapping class attributes tree [Studio] Expand objectbrick fields in schema mapping class attributes tree Apr 16, 2026
markus-moser and others added 6 commits April 17, 2026 09:52
…ck schema mapping

- Bridge the render-cycle gap between class layout resolving and the
  brick layout fetch effect firing by treating the state as still
  loading when allBrickKeys are known but brickLayouts is still empty,
  preventing the intermediate spinner flash.
- Extend getFieldDefinitions() to also collect field definitions from
  brick-group nodes (top-level siblings of object-columns), so that
  'Insert all definitions' now includes objectbrick attributes.
- Remove unused ConfigLayoutDefinition import from use-class-attributes-tree
- Use String.localeCompare in use-objectbrick-layouts sort for reliable
  alphabetical ordering
- Extract static helper functions (filterTreeNodesRecursive,
  collectAllKeys, scanForObjectBricksFields, removeObjectBricksNodes)
  into class-attributes-tree-helpers.ts to bring use-class-attributes-tree
  under the 300-line max-lines limit
- Cast fieldDefinition.fieldtype to string to fix unsafe-argument error
- Add missing useMemo deps (allBrickKeys, fieldDefinitionRegistry, t)
  and remove invalid eslint-disable comment for non-existent
  react-hooks/exhaustive-deps rule
- Cast responses[index].data to ConfigLayoutDefinition to fix
  unsafe-argument error in use-objectbrick-layouts
- Add dispatch to useEffect deps and remove invalid eslint-disable
  comment in use-objectbrick-layouts
Type the responses parameter of Promise.all().then() as
Array<{ data?: ConfigLayoutDefinition }> so the data property is
already correctly typed, eliminating both the unsafe-argument lint
error and the redundant-cast static analysis warning.
@markus-moser markus-moser added this to the 2.4.1 milestone Apr 20, 2026
@sonarqubecloud
Copy link
Copy Markdown

@markus-moser markus-moser marked this pull request as ready for review April 20, 2026 12:11
@markus-moser markus-moser merged commit 76a91d2 into 2.4 Apr 20, 2026
1 check passed
@markus-moser markus-moser deleted the feat/studio-objectbrick-schema-mapping branch April 20, 2026 12:11
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants