Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions workspaces/orchestrator/.changeset/dynamic-ui-hidden.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions workspaces/orchestrator/.changeset/migrate-moment-to-luxon.md

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions workspaces/orchestrator/.changeset/oneof-support-feature.md

This file was deleted.

7 changes: 0 additions & 7 deletions workspaces/orchestrator/.changeset/renovate-7505a0d.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
### Dependencies

## 8.5.1

### Patch Changes

- d91ef65: Updated dependency `@types/express` to `4.17.25`.
Updated dependency `@openapitools/openapi-generator-cli` to `2.25.2`.
- Updated dependencies [8524940]
- Updated dependencies [d91ef65]
- @red-hat-developer-hub/[email protected]

## 8.5.0

### Minor Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/backstage-plugin-orchestrator-backend",
"version": "8.5.0",
"version": "8.5.1",
"license": "Apache-2.0",
"main": "src/index.ts",
"types": "src/index.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## @red-hat-developer-hub/backstage-plugin-orchestrator-common [1.13.1](https://github.com/janus-idp/backstage-plugins/compare/@red-hat-developer-hub/[email protected]...@red-hat-developer-hub/[email protected]) (2024-08-02)

## 3.3.1

### Patch Changes

- 8524940: Fix TypeScript compilation errors in orchestrator plugins
- d91ef65: Updated dependency `@types/express` to `4.17.25`.
Updated dependency `@openapitools/openapi-generator-cli` to `2.25.2`.

## 3.3.0

### Minor Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/backstage-plugin-orchestrator-common",
"version": "3.3.0",
"version": "3.3.1",
"license": "Apache-2.0",
"main": "src/index.ts",
"types": "src/index.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @red-hat-developer-hub/backstage-plugin-orchestrator-form-api

## 2.4.1

### Patch Changes

- Updated dependencies [8524940]
- Updated dependencies [d91ef65]
- @red-hat-developer-hub/[email protected]

## 2.4.0

### Minor Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@red-hat-developer-hub/backstage-plugin-orchestrator-form-api",
"description": "library for orchestrator form api, enabling creating a factory to extend the workflow execution form",
"version": "2.4.0",
"version": "2.4.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,100 @@
### Dependencies

## 2.5.0

### Minor Changes

- 5771568: Add dynamic conditional visibility for ui:hidden

**Conditional Hiding Feature:**
- Add `HiddenCondition` type supporting boolean and condition objects
- Implement `evaluateHiddenCondition` utility for evaluating hide conditions
- Support condition objects with `when`, `is`, `isNot`, and `isEmpty` operators
- Support composite conditions with `allOf` (AND) and `anyOf` (OR) logic
- Support nested field paths using dot notation (e.g., `config.server.port`)
- Update `HiddenFieldTemplate` to dynamically evaluate hide conditions based on form data
- Update `generateReviewTableData` to respect conditional hiding in review pages
- Hidden field visibility updates in real-time when form data changes

**Condition Object Patterns:**
- `{ when: "field", is: "value" }` - Hide when field equals value
- `{ when: "field", is: ["val1", "val2"] }` - Hide when field equals any value (OR)
- `{ when: "field", isNot: "value" }` - Hide when field does NOT equal value
- `{ when: "field", isEmpty: true }` - Hide when field is empty
- `{ allOf: [...] }` - Hide when ALL conditions are true (AND)
- `{ anyOf: [...] }` - Hide when ANY condition is true (OR)

**Documentation:**
- Update `orchestratorFormWidgets.md` with comprehensive examples of conditional hiding
- Add examples for all condition patterns and composite conditions
- Include complete real-world deployment configuration example

**Testing:**
- Add comprehensive unit tests for condition evaluation
- Test simple conditions, composite conditions, and nested conditions
- Test edge cases (empty values, nested paths)

- c35d07c: Add fetch:error:ignoreUnready and fetch:response:default options for form widgets

**Feature 1: fetch:error:ignoreUnready**

When using widgets with `fetch:retrigger` dependencies, the initial fetch often fails because dependent fields don't have values yet. This results in HTTP errors being displayed during initial load.
- Add `fetch:error:ignoreUnready` option to suppress fetch error display until all `fetch:retrigger` dependencies have non-empty values
- Errors are only suppressed when dependencies are empty; once filled, real errors are shown
- Supported by: ActiveTextInput, ActiveDropdown, ActiveMultiSelect, SchemaUpdater

**Feature 2: fetch:response:default**

Widgets previously required `fetch:response:value` for defaults, meaning fetch must succeed. This adds static fallback defaults.
- Add `fetch:response:default` option for static default values applied immediately on form initialization
- Defaults are applied at form initialization level in `OrchestratorForm`, ensuring controlled components work correctly
- Static defaults act as fallback when fetch fails, hasn't completed, or returns empty
- Fetched values only override defaults when non-empty
- Supported by: ActiveTextInput (string), ActiveDropdown (string), ActiveMultiSelect (string[])

**Usage Examples:**

```json
{
"action": {
"ui:widget": "ActiveTextInput",
"ui:props": {
"fetch:url": "...",
"fetch:retrigger": ["current.appName"],
"fetch:error:ignoreUnready": true,
"fetch:response:default": "create"
}
}
}
```

- 2be9dcc: Fix custom widgets not rendering in dependencies+oneOf (RHIDP-10952)

**Widget Rendering Fix:**
- Fix `generateUiSchema` to extract `ui:` properties from `dependencies` + `oneOf` branches
- Custom widgets (ActiveTextInput, ActiveDropdown, etc.) now render correctly in conditional schemas
- Resolves issue where widgets fell back to plain text inputs inside dependencies

**Form Data Management:**
- Update `pruneFormData` to correctly handle oneOf schemas with dependencies
- Clean up stale form data when switching between oneOf options

### Patch Changes

- f030878: Fix validation errors incorrectly shown on wrong step when navigating back.

When using widgets with `validate:url`, the `getExtraErrors` callback validates all fields across all steps and returns a nested error object. The previous logic had full error object when the current step had no errors, causing validation errors from other steps to appear on the wrong step.

This fix:
- Sets `extraErrors` to `undefined` when current step has no errors
- Updates step navigation to only check current step's errors before proceeding

- 8524940: Fix TypeScript compilation errors in orchestrator plugins
- Updated dependencies [8524940]
- Updated dependencies [d91ef65]
- @red-hat-developer-hub/[email protected]
- @red-hat-developer-hub/[email protected]

## 2.4.0

### Minor Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@red-hat-developer-hub/backstage-plugin-orchestrator-form-react",
"description": "Web library for the orchestrator-form plugin",
"version": "2.4.0",
"version": "2.5.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
Loading