Skip to content

NIFI-15908: Disabling the Apply button in the Connector wizard when t…#11222

Open
mcgilman wants to merge 1 commit intoapache:mainfrom
mcgilman:NIFI-15908
Open

NIFI-15908: Disabling the Apply button in the Connector wizard when t…#11222
mcgilman wants to merge 1 commit intoapache:mainfrom
mcgilman:NIFI-15908

Conversation

@mcgilman
Copy link
Copy Markdown
Contributor

@mcgilman mcgilman commented May 8, 2026

…here are no pending edits.

Summary

NIFI-15908

Disables the Connector wizard's Apply button when the backend reports there
is nothing to apply (e.g. no pending working-configuration changes, or a prior
apply still in progress) and surfaces the backend-supplied reason as a tooltip
on hover so the user can discover why the action is unavailable.

Background

The connector entity exposes an availableActions array; the APPLY_UPDATES
action carries allowed: boolean and reasonNotAllowed: string. The framework
already populates these correctly:

  • "No pending changes" when the working configuration matches the active
    configuration.
  • "Connector is updating" while a previous apply is PREPARING_FOR_UPDATE or
    UPDATING.

Until now the wizard ignored the action and only gated Apply on local UI state
(loading / applying / verifying / verification-passed). This PR threads the
backend signal through the wizard store into the summary step, then surfaces
the reason as a tooltip on the disabled button.

Changes

Wizard state plumbing

  • with-connector-wizard.feature.ts — derives applyUpdatesAllowed and
    applyUpdatesDisabledReason computed signals from the connector's
    APPLY_UPDATES action via the existing getConnectorAction() helper.
  • connector-wizard.store.ts — adds the two new signals to the abstract
    ConnectorWizardStore contract.
  • connector-wizard.component.html — passes the signals down to the summary
    step as [applyAllowed] / [applyDisabledReason] inputs.

Summary step UI

  • connector-configuration-summary-step.component.ts — adds applyAllowed
    (default true, preserving existing callers) and applyDisabledReason
    signal inputs; updates applyDisabled and applyTooltip computed signals
    so the backend reason takes precedence over the verify-required hint.
  • connector-configuration-summary-step.component.html — binds
    [matTooltip]="applyTooltip()" plus a local [matTooltipShowDelay]="500".
    The tooltip lives directly on the <button> rather than on a wrapping
    <span>, made possible by the SCSS rule below.
  • connector-configuration-summary-step.component.scss — re-enables
    pointer-events: auto on button[disabled] inside this component so the
    Material tooltip directive receives the hover events the browser would
    otherwise suppress on a native disabled button. Adds
    cursor: not-allowed for visual affordance.

Test coverage

  • connector-configuration-summary-step.component.spec.ts — 5 new tests
    covering: disable state when applyAllowed=false overrides
    verificationPassed=true; tooltip surfacing the backend reason verbatim;
    the verify-required hint still wins when no backend reason is present;
    default values preserve existing-caller behavior.
  • connector-wizard.store.spec.ts — 5 new tests against the
    applyUpdatesAllowed / applyUpdatesDisabledReason selectors covering:
    no connector / missing action / allowed=true / allowed=false with
    reason / allowed=false without reason (verifies the ?? '' fallback).
  • connector-wizard.component.spec.tscreateMockStore factory updated
    to expose the two new signals so the mock continues to fully implement
    the abstract ConnectorWizardStore contract (prevents a future
    "is not a function" failure in tests that render the summary step).

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number NIFI-15908
  • Pull Request commit message starts with Apache NiFi Jira issue number NIFI-15908
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25
  • Frontend verified with nx test shared (725/725 passing) and
    nx lint shared (clean) from nifi-frontend/src/main/frontend

Licensing

  • No new dependencies introduced
  • N/A — no LICENSE/NOTICE updates required

Documentation

  • N/A — UI behavior change with no user-facing documentation impact

@mcgilman mcgilman added the ui Pull requests for work relating to the user interface label May 8, 2026
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.

1 participant