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

feat: K8sNameDescriptionField and related components #63

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

adamviktora
Copy link
Collaborator

@adamviktora adamviktora commented Oct 23, 2024

Closes #4

Mostly a copy of the current odh-dashboard component + a prop to hide the "Description" form field.

Uses just some basic logic in the example to generate some kind of resource name. Actual logic comes from the useK8sNameDescriptionFieldData hook.

Also adds the FieldGroupHelpLabelIcon component with recommendation to use FormGroupLabelHelp, instead of the current DashboardPopupIconButton when migrating to V6.

POSSIBLE ENHANCEMENTS: provide props for hardcoded texts

@patternfly-build
Copy link

patternfly-build commented Oct 23, 2024

@jeff-phillips-18
Copy link
Member

@adamviktora I think it may be better to just have a prop to hide the description field rather than introducing another component.

@nicolethoen
Copy link
Contributor

@jeff-phillips-18 which new component are you referring to?

@jeff-phillips-18
Copy link
Member

I guess I looked at it wrong. I thought there were 2 components, one with the description and one without. I see now that there are two sub-components used but the outer component K8sNameDescriptionField.

What we do need here is the ability to not show the description for the K8sNameDescriptionField component.

@adamviktora
Copy link
Collaborator Author

adamviktora commented Nov 8, 2024

Jeff is right, there is a new subcomponent called NameWithResourceNameField. Yeah, it makes sense to just add a prop to K8sNameDescriptionField to hide it. I'll push a fix.

@nicolethoen nicolethoen merged commit fbf966f into patternfly:main Nov 19, 2024
5 checks passed
Copy link

🎉 This PR is included in version 1.3.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form - Resource name field
4 participants