Repository navigation
Make generated component docs match customValidationMessage(s) support - #476
Draft
alexluckett wants to merge 1 commit into
Draft
alexluckett wants to merge 1 commit into
alexluckett wants to merge 1 commit into
Conversation
The generated component docs listed customValidationMessage and customValidationMessages on every component whose forms-model type declares them, even where the engine ignores the option - 11 of 28 component types documented an option with no effect. The lists proving which components actually honour each option already existed as private constants in the two test files, so extracting them into a shared module lets the doc generator use the same source of truth: it now omits the customValidationMessages row for components that only inherit it, and appends a no-effect note to customValidationMessage where a component declares it but ignores it.
|
alexluckett
added this pull request to stack #477
October 5, 2026 14:06
This branch has not been deployed
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.



The generated component docs list
customValidationMessageandcustomValidationMessageson every component whose forms-model type declares them, even where the engine ignores the option. This change makes the doc generator use the same support data the tests already assert against, so the docs and the tests cannot drift apart.Architecture
The lists recording which
ComponentTypes readcustomValidationMessageandcustomValidationMessagesused to live as private constants in the two test files. They now live in one shared module,customValidationMessageSupport.ts, imported by both test files and bygenerate-component-docs.js. Each test file keeps its own "accounts for every ComponentType" guard test, which now guards the shared lists instead of a local copy - a component whose support changes without a matching list update still fails a test.Key changes
SUPPORTS_SINGULAR_MESSAGE,IGNORES_SINGULAR_MESSAGE,NO_SINGULAR_MESSAGE_OPTION,SUPPORTS_PLURAL_MESSAGES,IGNORES_PLURAL_MESSAGESandNO_PLURAL_MESSAGES_OPTIONintocustomValidationMessageSupport.ts.customValidationMessage.test.tsandcustomValidationMessages.test.tsimport these lists instead of declaring their own, removing the duplicate constants.generate-component-docs.jsimports the same lists.customValidationMessagesis declared on the sharedFormFieldBaseoptions type, so every field component inherits it whether it reads it or not - the generator now omits that row for components that ignore it, rather than documenting an option with no effect.customValidationMessageis added per-component rather than inherited, so a component that declares it but ignores it keeps the row with a note explaining it has no effect.