Skip to content

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

Open
Nandinidasari60 wants to merge 9 commits into
Bahmni:masterfrom
cureinternational:feature-forms-hyperlink-capability
Open

BAH-4952:Add Hyperlink Property Panel for Label Controls#131
Nandinidasari60 wants to merge 9 commits into
Bahmni:masterfrom
cureinternational:feature-forms-hyperlink-capability

Conversation

@Nandinidasari60

Copy link
Copy Markdown

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 and others added 9 commits August 5, 2026 15:15
…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>
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.

3 participants