Repository navigation
fix(intake-forms): UI + locale cherry-pick of #30614 onto 1.13 - #30723
anuj-kumary wants to merge 1 commit into
Conversation
Conflict-resolved UI portion of the #30614 cherry-pick: - AddDomainForm, AddGlossaryTermForm, PropertyValue, useGridEditController, CSVUtilsClassBase - IntakeForm Playwright spec - All 19 locale JSON files (keys merged from both 1.13 and main) Backend + new files landed directly on 1.13 in the preceding commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
| useEffect(() => { | ||
| form.setValue( | ||
| 'extensionDefinitions', | ||
| Object.fromEntries( | ||
| customProperties.map((definition) => [definition.name, definition]) | ||
| ), | ||
| { | ||
| shouldDirty: false, | ||
| shouldTouch: false, | ||
| shouldValidate: false, | ||
| } | ||
| ); | ||
| }, [customProperties, form]); |
There was a problem hiding this comment.
🚨 Bug: antd FormInstance called with react-hook-form API (setValue/control)
The merge mixed the PR's react-hook-form code onto 1.13's antd form. form comes from antd's Form.useForm(formRef) (line 291), so it is a FormInstance that has no setValue method and no control property. The effect at lines 376-388 calls form.setValue('extensionDefinitions', ...), which throws TypeError: form.setValue is not a function on mount (the effect runs on initial render), crashing the Add Domain / Add Data Product form. Additionally, line 927 passes control={form.control} (undefined) into AddDomainFormExtensionFields, whose child FormField/useController calls require a valid react-hook-form control and will also throw. Fix: either populate extensionDefinitions via antd (form.setFieldsValue) and adapt the extension component to antd, or fully migrate this component to react-hook-form (as the original PR did) instead of leaving Form.useForm in place.
Was this helpful? React with 👍 / 👎
| const handleSubmit = useCallback( | ||
| (data: DomainFormValues) => { | ||
| const { extensionDefinitions, extensionFormValues, ...submittedData } = | ||
| data; | ||
|
|
||
| return onSubmit({ | ||
| ...submittedData, | ||
| extension: normalizeExtensionForApi( | ||
| data.extension, | ||
| extensionDefinitions, | ||
| extensionFormValues | ||
| ), | ||
| }); | ||
| }, | ||
| [onSubmit] |
There was a problem hiding this comment.
⚠️ Quality: Dead react-hook-form leftovers: handleSubmit & normalizeExtension divergence
The wired antd submit handler is handleFormSubmit (onFinish at line 883), while the PR's handleSubmit (lines 774-789) and transformDomainFormData are defined but never used in the component — react-hook-form leftovers from the merge. More importantly, handleFormSubmit serializes extensions via the local normalizeExtension (lines 813-825), which only unwraps single entityReference arrays and never processes extensionFormValues nor calls serializeExtensionValue/normalizeExtensionForApi. So the extension serialization the PR intended is not applied on the path that actually submits. Consolidate onto a single submit path and remove the unused code to avoid confusion and ensure custom-property values are serialized correctly.
Was this helpful? React with 👍 / 👎
Code Review 🚫 Blocked 0 resolved / 2 findingsCherry-picks intake-form UI and locale updates onto 1.13, but the merge incorrectly mixes react-hook-form APIs with antd FormInstance, causing dead leftovers and incompatible form submission logic. 🚨 Bug: antd FormInstance called with react-hook-form API (setValue/control)📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:291 📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:376-388 📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:925-931 The merge mixed the PR's react-hook-form code onto 1.13's antd form.
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source
| const descriptionRequiredRule = useMemo( | ||
| () => ({ | ||
| required: | ||
| intakeFormRequiredMessage('description') ?? |
There was a problem hiding this comment.
When the domain or data-product form is built or rendered, intakeFormRequiredMessage and applyIntakeFormRequired are referenced without declarations or imports, causing TypeScript compilation errors or a runtime ReferenceError.
Context Used: CLAUDE.md (source)
Knowledge Base Used: OpenMetadata React UI
| {customPropertiesLoaded && ( | ||
| <AddDomainFormExtensionFields | ||
| control={form.control} | ||
| customProperties={customProperties} | ||
| formFields={extensionFormFields} | ||
| /> |
There was a problem hiding this comment.
Mismatched form controller APIs
When custom-property metadata loads, this passes form.control from an Ant Design FormInstance to a component requiring a react-hook-form Control; Ant forms have no such controller, so the intake fields cannot register or submit their values.
Context Used: CLAUDE.md (source)
Knowledge Base Used: OpenMetadata React UI
| dataSource: Record<string, string>[]; | ||
| setDataSource: React.Dispatch<React.SetStateAction<Record<string, string>[]>>; | ||
| columns: Column<Record<string, string>[]>[]; | ||
| columns: Column<Record<string, string>>[]; |
There was a problem hiding this comment.
The public hook now accepts Column<Record<string, string>>[], but its clipboard helper and existing callers retain Column<Record<string, string>[]>[]; the incompatible row renderer and formatter types produce TypeScript assignment errors and prevent the UI build.
Context Used: CLAUDE.md (source)
|
Closing — reverting the full cherry-pick and redoing as backend-only, properly adapted for 1.13. |
Summary
UI-only portion of the #30614 cherry-pick onto
1.13. The backend changes (Java, SQL migrations, JSON schemas, and all new files) were pushed directly to1.13as they had zero conflicts.This PR contains only the 27 files that had merge conflicts — they have been manually resolved:
Components (5 files)
AddDomainForm.component.tsx— merged 1.13 additions with PR's newuseWatch+ extension serializer wiringAddDomainForm.interface.ts— merged both sides' new fieldsAddGlossaryTermForm.component.tsx— merged intake-form field wiring with 1.13 changesPropertyValue.tsx— merged both sidesuseGridEditController.ts— merged both sidesPlaywright (1 file)
IntakeForm.spec.ts— merged 1.13 spec additions with PR's new test casesLocale JSON (19 files)
1.13andmainmerged; no duplicates;sv-se.jsonexcluded (deleted on 1.13)CSV (1 file)
CSVUtilsClassBase.tsx— merged both sidesRelated
Test plan
IntakeForm.spec.tsPlaywright suite on 1.13🤖 Generated with Claude Code
Greptile Summary
This cherry-pick brings intake-form UI and locale changes from the original fix onto 1.13.
Confidence Score: 4/5
The PR is not safe to merge until the broken domain-form merge and inconsistent grid column types are corrected.
The domain and data-product form references undeclared helpers, passes an Ant Design form as a react-hook-form controller, and bypasses its extension serializer, while the grid hook exposes a row type incompatible with its clipboard helper and callers.
Files Needing Attention: openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx, openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.interface.ts, openmetadata-ui/src/main/resources/ui/src/hooks/useGridEditController.ts
Important Files Changed
Comments Outside Diff (1)
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx, line 850 (link)When the domain or data-product form submits custom properties, the active
handleFormSubmitpath only unwraps single references and never invokes the addednormalizeExtensionForApilogic, so numeric, date, hyperlink, and extension-form values remain raw or are omitted, causing invalid API payloads and failed creation.Context Used: CLAUDE.md (source)
Knowledge Base Used: OpenMetadata React UI
Reviews (1): Last reviewed commit: "fix(intake-forms): UI + locale cherry-pi..." | Re-trigger Greptile
Context used: