Skip to content

debezium/dbz#1859 add support for boolean and integer types in additi…#397

Open
KMohnishM wants to merge 1 commit into
debezium:mainfrom
KMohnishM:dbz-1859
Open

debezium/dbz#1859 add support for boolean and integer types in additi…#397
KMohnishM wants to merge 1 commit into
debezium:mainfrom
KMohnishM:dbz-1859

Conversation

@KMohnishM
Copy link
Copy Markdown

…onal configuration properties

Fixes debezium/dbz#1859

Description

Here is a professional PR title and description for your changes:

Currently, additional configuration properties (those not defined in the static schema) are treated as strings by default, requiring users to enter values in a free-style text box. This PR updates the UI to allow users to explicitly select the value type—String, Boolean, or Integer—and provides type-safe input controls for each.

Key Changes

  • New UI Components:
    • Created AdditionalPropertiesRows to handle dynamic rendering of input controls based on the selected type.
    • Integrated Boolean Toggles and Integer NumberInputs (using PatternFly components).
  • Data Serialization & Hydration:
    • Updated additionalConfigProperties.ts to correctly serialize values into actual JSON types (boolean/number) before API submission.
    • Enhanced splitSourceConfigForHydration to automatically detect value types when loading existing configurations, ensuring the UI reflects the correct state.
  • Improved UX:
    • Added a "Value Kind" dropdown for every additional property row.
    • Improved validation logic to prevent invalid integer inputs.
  • Testing & Stability:
    • Updated AdditionalProperties.test.tsx and sourceConfigSplit.test.ts to cover new type-safe flows.
    • Increased global test timeout in vite.config.ts to resolve intermittent timeouts in the development environment.

How to Test

  1. Navigate to Create/Edit Source or Destination.
  2. Scroll to Additional Properties.
  3. Add a new property and change the Type dropdown.
  4. Verify that:
    • Boolean shows a toggle switch.
    • Integer shows a numeric input.
    • Data is correctly persisted as a primitive type (not a string) in the final configuration.

PR Checklist

  • I have read the contribution guidelines and the governance document on PR expectations.
  • Minimal changes to code not directly related to your change (e.g. no unnecessary formatting changes or refactoring to existing code)
  • One feature/change per PR unless tightly coupled
  • Do a rebase on upstream main

@mfvitale mfvitale requested a review from indraraj May 14, 2026 07:49
@mfvitale
Copy link
Copy Markdown
Member

@KMohnishM Thanks for your first contribution. Where we states with this?

…onal configuration properties

Signed-off-by: Mohnish <kmohnishm@gmail.com>
@KMohnishM KMohnishM marked this pull request as ready for review May 19, 2026 09:41
@KMohnishM
Copy link
Copy Markdown
Author

Hi @mfvitale,

I have just completed the following updates and force-pushed the branch:

  1. Rebase & Conflict Resolution: Rebased the branch on top of the latest upstream/main and resolved the yarn.lock conflict.
  2. TypeScript & Lint Fixes: Resolved all compilation/typing errors and ESLint check violations.
  3. E2E Test Stability: Fixed a minor HTML input ID mismatch that was causing the Cypress E2E test selectors to fail.

All local builds, type-checks (npm run type-check), lints (npm run lint), and unit tests (npm run test) are now passing successfully.

Thanks !

@mfvitale
Copy link
Copy Markdown
Member

@indraraj could you please take a look?

@indraraj
Copy link
Copy Markdown
Member

@KMohnishM, thanks for the contribution. Can you please also upload the screenshot for the UI changes?

@KMohnishM
Copy link
Copy Markdown
Author

Hi @indraraj,

Sure! Here is a summary of the UI changes introduced in this PR:

1. Form Editor (Create/Edit Flow)

  • "Value Kind" Dropdown: In both Create/Edit Source and Create/Edit Destination forms under the Additional Properties section, we added a type dropdown selector next to the property key. Users can now explicitly choose between:
    • String
    • Boolean
    • Integer
    image
  • Dynamic Input Fields: The input field next to the key now dynamically changes depending on the selected type:
    • String: Displays a standard text input box.
    • Boolean: Replaces the text box with a PatternFly Switch toggle (Switch ON/OFF corresponding to true/false).
    • Integer: Displays a text input restricted to numeric input (inputMode="numeric"), preventing non-integer input.
image image

2. Read-Only Review Page

  • Type-Aware Display: In the read-only configuration review screens (e.g., when viewing a completed schema/connector overview), instead of assuming all custom properties are strings, the UI dynamically inspects the value type. It formats and displays the stored boolean ("true"/false") or numeric value correctly.
Screenshot_19-5-2026_21330_localhost

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for handling the boolean and integer type value for additional configuration properties in source and destination

3 participants