Skip to content

NIFI-15959: Rendering a banner when a previously selected value in a …#11270

Open
mcgilman wants to merge 1 commit into
apache:mainfrom
mcgilman:NIFI-15959
Open

NIFI-15959: Rendering a banner when a previously selected value in a …#11270
mcgilman wants to merge 1 commit into
apache:mainfrom
mcgilman:NIFI-15959

Conversation

@mcgilman
Copy link
Copy Markdown
Contributor

…STRING_LIST property is no longer available. STRING_LIST is handled specifically because the UI automatically deselects it unlike single selection.

Summary

When a connector configuration step loads allowable values for a STRING_LIST multi-select, saved selections that are no longer in the catalog are automatically removed from the form control. The configuration step shows a dismissible caution banner listing which property(ies) lost values and what was stripped. Single-select properties are unchanged: stale values remain visible as disabled “(no longer available)” options so the user can pick a replacement.

Also introduces reusable StatusBanner and Banner components and migrates WizardContextBanner from legacy ErrorBanner to BannerStatusBanner, so variant (e.g. critical) is honored for wizard store errors. Verify-all general errors on the config step still use ErrorBanner for now.

Changes

STRING_LIST orphan detection (connector-property-input)

  • Detects values not present in the loaded static or dynamic allowable list.
  • For multi-select only: schedules a coalesced strip via afterNextRender (stringListStripScheduled) and emits stringListOrphansStripped once per strip pass.
  • New type: StringListOrphansStrippedEvent in connector-property-input.types.ts.

Configuration step banner

  • Handles stringListOrphansStripped, maintains per-property banner entries (replace on re-strip for same property).
  • Renders caution StatusBanner with intro copy, property labels, removed values (cap 20 + “… and N more”), dismiss, and clear on form re-init.
  • Wires (stringListOrphansStripped) on each connector-property-input in the step template.

Banner components

  • StatusBanner: themed status shell (FA4 icons, fa-2x to match ErrorBanner), icon dismiss, content projection + statusBannerTitle / statusBannerDescription directives.
  • Banner: message list wrapper (single vs list, dedupe) over StatusBanner.
  • WizardContextBanner: thin store adapter → <banner> (replaces ErrorBanner).

Exports

  • banner, status-banner, directives, and connector-property-input.types exported from libs/shared index.ts.

…STRING_LIST property is no longer available. STRING_LIST is handled specifically because the UI automatically deselects it unlike single selection.
@rfellows rfellows added the ui Pull requests for work relating to the user interface label May 20, 2026
@rfellows
Copy link
Copy Markdown
Contributor

reviewing...

Copy link
Copy Markdown
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things inline... I'd also welcome some eyes on this from @scottyaslan when he has a chance.

Comment on lines +18 to +27
.banner-container {
ul {
list-style-type: disc;
list-style-position: inside;
}

.error-banner-message {
word-break: break-word;
}
}
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.

these can all be just tailwind styles in the template.

limitations under the License.
-->

<div class="status-banner-container status-variant p-4 flex gap-x-2 text-sm rounded-lg" [class]="variant">
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.

I'm concerned that we now have 2 competing flavors of warning/caution banners. one is the overlapping-connections-banner used on the canvas:

Image

and now this one that looks much more re-usable but also not as clean to look at.
Image

I think we should leverage the new component, but consider updating the look of it to be more pleasing to the eye.

switch (variant) {
case 'success':
return 'fa-check-circle';
case 'active':
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.

The shared .status-variant theme only defines neutral, critical, caution, success, and info in nifi-frontend/src/main/frontend/libs/shared/src/assets/themes/material.scss:366 and :883. That means a future status-banner caller using active would get the icon choice but not the matching container styling.

I think we can get rid of this case

Suggested change
case 'active':

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui Pull requests for work relating to the user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants