Skip to content

BAH-4952:Add Hyperlink Property Panel for Label Controls - #131

Merged
vvkpd merged 15 commits into
Bahmni:masterfrom
cureinternational:feature-forms-hyperlink-capability
Aug 26, 2026
Merged

BAH-4952:Add Hyperlink Property Panel for Label Controls#131
vvkpd merged 15 commits into
Bahmni:masterfrom
cureinternational:feature-forms-hyperlink-capability

Conversation

@Nandinidasari60

Copy link
Copy Markdown
Contributor

Summary

  • Adds hyperlinkUrl input field to control property panel for Label controls
  • Implements real-time hyperlink validation with error display
  • Adds hyperlinkLabel disabled state management
  • Extracts hyperlink constants for maintainability
  • Supports backward compatibility with old allowedDomains format
  • Updates property panel layout for hyperlink configuration

Behaviour

Scenario Before After
Select Label control No hyperlink property Hyperlink URL input visible
Enter invalid URL N/A Error message shows below input
Enter allowed domain N/A URL accepted, no error
Save form with hyperlink N/A Form saves with hyperlink property
Load form with hyperlink N/A URL populates in property panel

Files Changed

  • src/form-builder/components/ControlPropertyPanel.jsx - Add hyperlink input
  • src/form-builder/components/Label/HyperlinkUrlInput.jsx - Hyperlink URL input component
  • src/form-builder/helpers/propertyValidation.js - URL validation integration
  • src/form-builder/constants/hyperlinkConstants.js - Extract constants
  • test/form-builder/components/Label/HyperlinkUrlInput.spec.js - Input component tests

Test plan

  • Select Label control - verify hyperlink property input appears
  • Enter valid domain URL (who.int, usda.gov) - no error
  • Enter invalid domain (evil.com) - error message displays
  • Try javascript: URL - error message displays
  • Save form with hyperlink URL - data persists
  • Load saved form - hyperlink URL appears in property panel
  • Edit hyperlink URL - changes save correctly
  • Clear hyperlink URL - field accepts empty value
  • Backward compatibility: old allowedDomains format still works

@vvkpd
vvkpd requested review from angshu, binduak, mohan-13 and ravinderkabli and removed request for ravinderkabli August 12, 2026 04:54
Comment thread src/form-builder/helpers/hyperlinkValidationHelper.js
Comment thread src/form-builder/components/ControlPropertiesContainer.jsx
Comment thread src/form-builder/components/FormDetailContainer.jsx Outdated
Comment thread src/form-builder/components/FormDetailContainer.jsx Outdated
Comment thread src/form-builder/components/ControlReduxWrapper.jsx
Comment thread src/form-builder/helpers/hyperlinkValidationHelper.js Outdated
Comment thread src/form-builder/helpers/hyperlinkValidationHelper.js
Comment thread src/form-builder/helpers/hyperlinkValidationHelper.js
Comment thread src/form-builder/components/FormDetailContainer.jsx Outdated
Comment thread src/form-builder/components/FormDetailContainer.jsx
vvkpd and others added 15 commits August 26, 2026 10:54
…uilder

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…state and tests

- className undefined (not empty string) on non-text wrapper divs
- hyperlinkLabel input disabled when hyperlinkUrl is empty
- Add regression tests for property-text-row and hyperlinkUrl onBlur

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Restore FormDetailContainer, FormList, FormPrinterContainer, FormPrivilegeTable
to their original state — these were changed by ESLint auto-fix during test runs
and are unrelated to the hyperlink feature.

co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The lockfile stored the exact version key (1.0.2) but package.json
uses a caret range (^1.0.2), causing --frozen-lockfile CI failure.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@vvkpd
vvkpd force-pushed the feature-forms-hyperlink-capability branch from 64ba796 to ed2956c Compare August 26, 2026 05:27

@ravinderkabli ravinderkabli left a comment

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.

Looks fine

@vvkpd
vvkpd merged commit 184627c into Bahmni:master Aug 26, 2026
4 checks passed
ravinderkabli pushed a commit that referenced this pull request Aug 31, 2026
* HIVE-119155: Vivek: Add hyperlink URL as a control property in form builder

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* HIVE-119155: Vivek: Fix Property layout, add hyperlinkLabel disabled state and tests

- className undefined (not empty string) on non-text wrapper divs
- hyperlinkLabel input disabled when hyperlinkUrl is empty
- Add regression tests for property-text-row and hyperlinkUrl onBlur

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* HIVE-119155: Vivek: Revert unrelated let-to-const ESLint auto-fixes

Restore FormDetailContainer, FormList, FormPrinterContainer, FormPrivilegeTable
to their original state — these were changed by ESLint auto-fix during test runs
and are unrelated to the hyperlink feature.

co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* HIVE-119155: Vivek: Extract hyperlinkUrl and hyperlinkLabel as constants

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Add support for hyperlink to label control and enhance validations

* PR review changes

* fix lint erros

* PR review changes

* remove redundant constants

* BAH-4952: Vivek: upgrade bahmni-form-controls to 1.0.1

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* BAH-4952: Vivek: address PR review comments

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* BAH-4952: Vivek: fix no-script-url lint error in test

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* BAH-4952: Vivek: upgrade bahmni-form-controls to 1.0.2

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* BAH-4952: fix yarn.lock key mismatch for bahmni-form-controls

The lockfile stored the exact version key (1.0.2) but package.json
uses a caret range (^1.0.2), causing --frozen-lockfile CI failure.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* BAH-4952: Vivek: upgrade bahmni-form-controls to 1.0.3

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Vivek Kumar Pandey <vivekp@thoughtworks.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: SasikiranJ <sasikiran.jakkula@thoughtworks.com>
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.

4 participants