[Studio] Expand objectbrick fields in schema mapping class attributes tree#1085
Merged
markus-moser merged 9 commits into2.4from Apr 20, 2026
Merged
[Studio] Expand objectbrick fields in schema mapping class attributes tree#1085markus-moser merged 9 commits into2.4from
markus-moser merged 9 commits into2.4from
Conversation
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
…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.
|
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 free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Uh oh!
There was an error while loading. Please reload this page.