Conversation
mohan-13
requested review from
PratitiP,
angshu,
devsingh05298,
rahu1ramesh and
sumaztwcode
December 8, 2025 03:15
PratitiP
reviewed
Dec 9, 2025
| isValid: false, | ||
| error: null, | ||
| }); | ||
|
|
Contributor
There was a problem hiding this comment.
We can use tanstack query useQuery hook to call validateConfig as queryFunction
PratitiP
reviewed
Dec 9, 2025
Contributor
There was a problem hiding this comment.
Can we do this more javascript way using Module pattern with closures instead of class-based singleton pattern? which might align better with modern JavaScript practices.
But we can take this up later as refactoring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Thank you for your contribution. Please find the details of this pull request below.
JIRA → BN-78
Description
Key Features
ConfigValidatorComponent - Reusable validation wrapper with error UI for invalid configurationsuseConfigValidationHook - Centralized validation logic with Ajv JSON Schema validationType Consistency- Standardized unknown type for config until the Widget level which can define its own type for subsequent access.VitalFlowSheetIntegration - Reference implementation with JSON schema validationImplementation Details
UI Components
ConfigValidatorcomponent with error display and stylingVitalFlowSheetas validation wrapperCustom Hooks
useConfigValidationhook for schema-based validation with AjvType Definitions
WidgetProps.configandControlConfig.configtounknownunknownconsistentlyPerformance & Optimization
Internationalisation
CONFIG_VALIDATION_ERRORandCONFIG_VALIDATION_DETAILSlabelsTesting & Type Definitions
Unit Tests
ConfigValidatorcomponent testsuseConfigValidationhook testsVitalFlowSheettestsIntegration Tests
Type Definitions
Screenshots
Note: Please ensure sensitive information is not included in screenshots.
Next Steps
Important
Checklist
Reviewer(s)
@bahnew/developers
Kindly review the proposed changes when convenient. Your feedback is appreciated.