Skip to content

fix(intake-forms): UI + locale cherry-pick of #30614 onto 1.13 - #30723

Closed
anuj-kumary wants to merge 1 commit into
1.13from
ui-cherry-pick-30614-1.13
Closed

anuj-kumary wants to merge 1 commit into
1.13from
ui-cherry-pick-30614-1.13

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

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 to 1.13 as 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 new useWatch + extension serializer wiring
  • AddDomainForm.interface.ts — merged both sides' new fields
  • AddGlossaryTermForm.component.tsx — merged intake-form field wiring with 1.13 changes
  • PropertyValue.tsx — merged both sides
  • useGridEditController.ts — merged both sides

Playwright (1 file)

  • IntakeForm.spec.ts — merged 1.13 spec additions with PR's new test cases

Locale JSON (19 files)

  • All locale files: keys from both 1.13 and main merged; no duplicates; sv-se.json excluded (deleted on 1.13)

CSV (1 file)

  • CSVUtilsClassBase.tsx — merged both sides

Related

Test plan

  • Create Domain / Data Product with custom properties — each type renders correctly, no 400 on submit
  • Create Glossary Term with intake-form fields
  • Run IntakeForm.spec.ts Playwright 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.

  • Adds custom-property rendering and serialization for domain, data-product, and glossary-term forms.
  • Expands Playwright and unit coverage for intake-form design, validation, deletion, and property types.
  • Adds inline CSV/grid editors and configurable grid row identifiers.
  • Synchronizes intake-form translation keys across locale files.

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

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx The manual merge leaves unresolved helpers, mixes Ant Design and react-hook-form APIs, and bypasses the new extension serializer on submission.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.interface.ts Adds new form value shapes but retains an Ant FormInstance contract incompatible with the extension-field wiring.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossaryTermForm/AddGlossaryTermForm.component.tsx Adds create-only intake custom-property loading, validation, and serialization with explicit edit-mode handling.
openmetadata-ui/src/main/resources/ui/src/hooks/useGridEditController.ts Adds configurable row identifiers but introduces inconsistent react-data-grid Column row generics.
openmetadata-ui/src/main/resources/ui/src/utils/CSV/CSVUtilsClassBase.tsx Adds inline bulk-edit, reference, custom-property, and description editors without an independently established runtime defect.
openmetadata-ui/src/main/resources/ui/src/components/common/CustomPropertyTable/PropertyValue.tsx Moves HTML text extraction to the pure utility and centralizes date and date-time custom-property parsing and formatting.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/IntakeForm.spec.ts Broadens intake-form coverage across supported entities, field removal, custom-property deletion, and serialization types.

Comments Outside Diff (1)

  1. openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx, line 850 (link)

    P1 Serializer bypassed during submission

    When the domain or data-product form submits custom properties, the active handleFormSubmit path only unwraps single references and never invokes the added normalizeExtensionForApi logic, 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

Greptile also left 3 inline comments on this PR.

Context used:

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>
@anuj-kumary
anuj-kumary requested a review from a team as a code owner July 30, 2026 18:55
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Comment on lines +376 to +388
useEffect(() => {
form.setValue(
'extensionDefinitions',
Object.fromEntries(
customProperties.map((definition) => [definition.name, definition])
),
{
shouldDirty: false,
shouldTouch: false,
shouldValidate: false,
}
);
}, [customProperties, form]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 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 👍 / 👎

Comment on lines +774 to +788
const handleSubmit = useCallback(
(data: DomainFormValues) => {
const { extensionDefinitions, extensionFormValues, ...submittedData } =
data;

return onSubmit({
...submittedData,
extension: normalizeExtensionForApi(
data.extension,
extensionDefinitions,
extensionFormValues
),
});
},
[onSubmit]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ 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 👍 / 👎

@gitar-bot

gitar-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Code Review 🚫 Blocked 0 resolved / 2 findings

Cherry-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. 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.

⚠️ Quality: Dead react-hook-form leftovers: handleSubmit & normalizeExtension divergence

📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:774-788 📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:813-827

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.

🤖 Prompt for agents
Code Review: Cherry-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.

1. 🚨 Bug: antd FormInstance called with react-hook-form API (setValue/control)
   Files: 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. `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.

2. ⚠️ Quality: Dead react-hook-form leftovers: handleSubmit & normalizeExtension divergence
   Files: openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:774-788, openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:813-827

   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.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

const descriptionRequiredRule = useMemo(
() => ({
required:
intakeFormRequiredMessage('description') ??

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Undefined intake-form helpers

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

Comment on lines +925 to +930
{customPropertiesLoaded && (
<AddDomainFormExtensionFields
control={form.control}
customProperties={customProperties}
formFields={extensionFormFields}
/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 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>>[];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Inconsistent grid row generic

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)

@anuj-kumary anuj-kumary self-assigned this Jul 30, 2026
@anuj-kumary anuj-kumary added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jul 30, 2026
@anuj-kumary

Copy link
Copy Markdown
Member Author

Closing — reverting the full cherry-pick and redoing as backend-only, properly adapted for 1.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant