Skip to content

feat(orchestrator-form): hide wizard steps for conditional ui:hidden#3264

Merged
karthikjeeyar merged 4 commits into
redhat-developer:mainfrom
lokanandaprabhu:fix/orchestrator-conditional-step-ui-hidden
Jun 2, 2026
Merged

feat(orchestrator-form): hide wizard steps for conditional ui:hidden#3264
karthikjeeyar merged 4 commits into
redhat-developer:mainfrom
lokanandaprabhu:fix/orchestrator-conditional-step-ui-hidden

Conversation

@lokanandaprabhu
Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3224

  • Fixes empty wizard steps when ui:hidden is conditional at the step level or when every field in a step is conditionally hidden.
  • getSortedStepEntries previously only filtered steps with static ui:hidden: true. Conditional expressions were evaluated for individual fields but not when building the stepper, so users saw blank wizard pages.

Screen.Recording.2026-06-02.at.1.05.30.PM.mov

------Workflow to test----

{
  "id": "test-conditional-step-hidden",
  "version": "1.0",
  "specVersion": "0.8",
  "name": "Test Conditional Step ui:hidden",
  "description": "Multi-step wizard for RHDHBUGS-3224: whole steps hidden via step-level ui:hidden or when every field in a step is conditionally hidden.",
  "dataInputSchema": "schemas/test-conditional-step-hidden__main-schema.json",
  "start": "PrintOutput",
  "functions": [
    {
      "name": "systemOut",
      "type": "custom",
      "operation": "sysout"
    }
  ],
  "states": [
    {
      "name": "PrintOutput",
      "type": "operation",
      "actions": [
        {
          "name": "printSystemOut",
          "functionRef": {
            "refName": "systemOut",
            "arguments": {
              "message": "."
            }
          }
        }
      ],
      "end": true
    }
  ]
}
{
  "$id": "classpath:/schemas/test-conditional-step-hidden__main-schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Test Conditional Step ui:hidden",
  "description": "Manual QA for hiding entire wizard steps. Step 2 disappears when Step 1 trigger is hide. Step 3 disappears when Step 1 mode is idle (all fields in that step are conditionally hidden).",
  "type": "object",
  "ui:order": ["setup", "optionalDetails", "allHiddenWhenIdle", "confirm"],
  "properties": {
    "setup": {
      "type": "object",
      "title": "Step 1 — Setup",
      "description": "trigger=hide removes Step 2. mode=idle removes Step 3 (all fields hidden).",
      "properties": {
        "trigger": {
          "type": "string",
          "title": "Optional details step",
          "enum": ["show", "hide"],
          "default": "hide"
        },
        "mode": {
          "type": "string",
          "title": "Details step visibility",
          "enum": ["idle", "show"],
          "default": "idle"
        }
      },
      "required": ["trigger", "mode"]
    },
    "optionalDetails": {
      "type": "object",
      "title": "Step 2 — Optional details (step-level ui:hidden)",
      "description": "Hidden when Step 1 trigger is hide.",
      "ui:hidden": {
        "when": "setup.trigger",
        "is": "hide"
      },
      "properties": {
        "detail": {
          "type": "string",
          "title": "Detail"
        }
      }
    },
    "allHiddenWhenIdle": {
      "type": "object",
      "title": "Step 3 — All fields hidden when idle",
      "description": "When Step 1 mode is idle, both fields below are hidden and this step should leave the stepper.",
      "properties": {
        "detailsA": {
          "type": "string",
          "title": "Details A",
          "ui:hidden": {
            "when": "setup.mode",
            "isNot": "show"
          }
        },
        "detailsB": {
          "type": "string",
          "title": "Details B",
          "ui:hidden": {
            "when": "setup.mode",
            "isNot": "show"
          }
        }
      }
    },
    "confirm": {
      "type": "object",
      "title": "Step 4 — Confirm",
      "properties": {
        "notes": {
          "type": "string",
          "title": "Notes",
          "ui:widget": "textarea"
        }
      }
    }
  }
}

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Evaluate conditional ui:hidden when filtering wizard steps using scoped
form data and root fallbacks, align validation with visible steps, and add
isNotEmptyList/notContains operators with unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented Jun 2, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator-form-react workspaces/orchestrator/plugins/orchestrator-form-react patch v2.8.4

lokanandaprabhu and others added 2 commits June 2, 2026 13:16
…ators

Co-authored-by: Cursor <cursoragent@cursor.com>
…ange

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.62%. Comparing base (55e9b9d) to head (39a4de5).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3264      +/-   ##
==========================================
+ Coverage   53.57%   53.62%   +0.05%     
==========================================
  Files        2407     2407              
  Lines       86535    86573      +38     
  Branches    23960    23963       +3     
==========================================
+ Hits        46361    46425      +64     
+ Misses      38593    38567      -26     
  Partials     1581     1581              
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from bd04be0
ai-integrations 70.03% <ø> (ø) Carriedforward from bd04be0
app-defaults 69.60% <ø> (ø) Carriedforward from bd04be0
augment 46.39% <ø> (ø) Carriedforward from bd04be0
bulk-import 72.86% <ø> (ø) Carriedforward from bd04be0
cost-management 16.49% <ø> (ø) Carriedforward from bd04be0
dcm 45.40% <ø> (ø) Carriedforward from bd04be0
extensions 61.79% <ø> (ø) Carriedforward from bd04be0
global-floating-action-button 74.30% <ø> (ø) Carriedforward from bd04be0
global-header 61.63% <ø> (ø) Carriedforward from bd04be0
homepage 51.52% <ø> (ø) Carriedforward from bd04be0
konflux 91.01% <ø> (ø) Carriedforward from bd04be0
lightspeed 68.33% <ø> (ø) Carriedforward from bd04be0
mcp-integrations 85.46% <ø> (ø) Carriedforward from bd04be0
orchestrator 37.41% <90.00%> (+0.81%) ⬆️
quickstart 62.88% <ø> (ø) Carriedforward from bd04be0
sandbox 79.56% <ø> (ø) Carriedforward from bd04be0
scorecard 83.84% <ø> (ø) Carriedforward from bd04be0
theme 64.54% <ø> (ø) Carriedforward from bd04be0
translations 8.49% <ø> (ø) Carriedforward from bd04be0
x2a 78.79% <ø> (ø) Carriedforward from bd04be0

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55e9b9d...39a4de5. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread workspaces/orchestrator/.changeset/conditional-step-hiding-operators.md Outdated
Copy link
Copy Markdown
Member

@karthikjeeyar karthikjeeyar left a comment

Choose a reason for hiding this comment

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

Verified the changes, looks good

Image

…rators.md

Co-authored-by: Karthik Jeeyar <karthik@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

@karthikjeeyar karthikjeeyar merged commit 03ef10a into redhat-developer:main Jun 2, 2026
43 checks passed
karthikjeeyar added a commit that referenced this pull request Jun 2, 2026
…3264, #3253) (#3270)

* fix(orchestrator-form): evaluate conditional ui:hidden with scoped form data

Evaluate sibling when paths against the current object/step form data so
conditionally hidden fields show and hide correctly in wizards. Fix the
review step toggle by iterating schema properties when including hidden
fields and applying the same scoped condition evaluation.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(orchestrator): add changeset for scoped conditional ui:hidden fix

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(orchestrator): clarify changeset for conditional hidden fields fix

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(orchestrator): restore status and date filters on workflow runs

Filtering workflow runs by status or date failed after query variables were introduced. Use the correct filter types so results load instead of showing an error.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(orchestrator-form): hide wizard steps for conditional ui:hidden

Evaluate conditional ui:hidden when filtering wizard steps using scoped
form data and root fallbacks, align validation with visible steps, and add
isNotEmptyList/notContains operators with unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(orchestrator-form): update API reports for HiddenCondition operators

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(orchestrator): revert unrelated report-alpha.api.md ordering change

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update workspaces/orchestrator/.changeset/conditional-step-hiding-operators.md

Co-authored-by: Karthik Jeeyar <karthik@redhat.com>

* detect GitHub SAML SSO session expiry and prompt users to re-authorize

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Karthik Jeeyar <karthik@redhat.com>
Co-authored-by: Karthik <karthik.jk11@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants