NIFI-15978: Rendering allowable value descriptions in the Connector w…#11286
Merged
Conversation
Contributor
|
Reviewing... |
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.
…izard.
NIFI-15978 Rendering allowable value descriptions in the Connector wizard
Summary
The Connector wizard's property dropdowns currently render only an allowable value's display name, even though the framework's
AllowableValueDTOalready serializes adescriptionfield (used elsewhere — e.g. processor property dialogs — to give users context about each option). This PR plumbs that description through to the wizard'ssearchable-selectso users see the same secondary descriptive text per option that they see in the rest of the UI.Changes
libs/shared/src/types/index.ts— Added the optionaldescription?: stringto the nestedAllowableValue.allowableValueshape so it matches what the backend already returns fromAllowableValueDTO.libs/shared/src/components/connector-property-input/connector-property-input.component.ts— IncomputeSelectOptions, propagateav.allowableValue.descriptiononto the emittedSearchableSelectOption. Thesearchable-selectcomponent already renders an option'sdescriptionas a secondary line (and already sizes virtual-scroll rows accordingly), so no template or styling changes are needed.libs/shared/src/components/connector-property-input/connector-property-input.component.spec.ts— Extended themakeAllowablehelper to accept an optional description, adjusted existing assertions to expectdescription: undefinedwhere appropriate, and added focused specs covering description propagation for both the staticproperty.allowableValuespath and the dynamicPropertyAllowableValuesStatepath.Backend alignment
No backend changes are required. Verified that:
AllowableValueDTOalready exposesdescription(getDescription()/setDescription()).DtoFactory.createAllowableValueDto(...)populates the description for statically declared allowable values.StandardNiFiServiceFacadepopulates the description for allowable values produced dynamically via a property'sAllowableValuesProvider.So any connector that declares descriptions on its
AllowableValues — static or dynamic — will surface them in the wizard with no further wiring.