Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ObjectControl #26

Merged
merged 5 commits into from
Mar 9, 2024
Merged

Adding ObjectControl #26

merged 5 commits into from
Mar 9, 2024

Conversation

TrangPham
Copy link
Contributor

No description provided.

() =>
isEmpty(path)
? Generate.uiSchema(schema, "VerticalLayout")
: { ...Generate.uiSchema(schema, "Group"), label },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I migrated the GroupRenderer since I think this needs that

Copy link
Contributor

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can revisit the naming conventions later if we want.

Comment on lines +41 to +43
if (!visible) {
return null
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I've been moving these to the top so you don't call findUISchema.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since findUISchema is within a react hook it cannot be conditional.

elements: UISchema[]
}

export function GroupComponent({ visible, enabled, uischema, ...props }: LayoutRendererProps) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to wrap my head around these layouts. Why is this called GroupComponent but the file is called GroupRenderer? I don't love the names "component' or "renderer" TBH. What would you think if we called them both GroupLayout and aliased the jsonforms interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good. Not sure why it was named that before, but I just ported the naming over.

@TrangPham TrangPham merged commit f7c56a7 into main Mar 9, 2024
2 of 3 checks passed
@TrangPham TrangPham deleted the object-control branch March 9, 2024 17:29
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants