* feat(scaffolder): add BUI theme for scaffolder forms
Add a Backstage UI (BUI) form theme as an alternative to the Material
UI theme. Toggled via formProps.theme or enableBackstageUi page config.
Includes BUI widgets, templates, field extension variants, and a ported
React Aria Autocomplete component.
Signed-off-by: benjdlambert <ben@blam.sh>
* refactor(scaffolder): use BUI Combobox and CheckboxGroup for form widgets
Signed-off-by: benjdlambert <ben@blam.sh>
* chore(scaffolder): enable BUI form flag and add kitchen sink demo template
Signed-off-by: benjdlambert <ben@blam.sh>
* fix(scaffolder): use outlined input style for BUI form widgets
Signed-off-by: benjdlambert <ben@blam.sh>
* fix(scaffolder): address BUI form PR feedback
Signed-off-by: benjdlambert <ben@blam.sh>
* fix(scaffolder): format CSS and regen API reports
Signed-off-by: benjdlambert <ben@blam.sh>
---------
Signed-off-by: benjdlambert <ben@blam.sh>
* feat(scaffolder): promote formDecorators out of experimental
Signed-off-by: benjdlambert <ben@blam.sh>
* fix(scaffolder): parse form decorator input through the configured zod schema
Signed-off-by: benjdlambert <ben@blam.sh>
* refactor(scaffolder-backend): emit single formDecorators field on the parameter-schema response
Signed-off-by: benjdlambert <ben@blam.sh>
* feat(scaffolder): promote form decorator blueprints to public API
Signed-off-by: benjdlambert <ben@blam.sh>
---------
Signed-off-by: benjdlambert <ben@blam.sh>
* feat: Add status check functions for scaffolder steps
- Introduced `always()` and `failure()` functions to control step execution after failures.
- Updated documentation to explain usage of new status check functions.
- Enhanced NunjucksWorkflowRunner to process these functions in step conditions.
- Added tests to verify behavior of steps using `always()` and `failure()`.
Signed-off-by: ferin79 <ferinpatel79@gmail.com>
* feat: Enhance status check functions in scaffolder steps
- Updated documentation to clarify usage of status check functions with template expressions.
- Modified tests to reflect changes in syntax for status checks.
- Refactored NunjucksWorkflowRunner to ensure proper handling of status check functions in step conditions.
Signed-off-by: ferin79 <ferinpatel79@gmail.com>
* docs: Clarify usage of status check functions in writing templates
- Removed redundant explanation about truthy conditions after step failure.
- Streamlined the description for better clarity on status check functions.
Signed-off-by: ferin79 <ferinpatel79@gmail.com>
---------
Signed-off-by: ferin79 <ferinpatel79@gmail.com>
The uuid package dropped its CommonJS entry point in v14, making it
incompatible with Backstage's CJS build output and Jest test runner.
Rather than working around the ESM-only issue, replace all usage with
the built-in crypto.randomUUID() which has been available in Node.js
since v16.7 and in all major browsers since March 2022.
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
* Add sample template for conditional output demo
Add a scaffolder template that exercises conditional `if` on output
links and text items, for testing issue #24805.
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Support conditional `if` on scaffolder output links and text
Add `if` property to output link and text items in scaffolder templates,
allowing template authors to conditionally show/hide output items based
on parameters or step results. Items with a falsy `if` condition are
filtered out before being sent to the frontend.
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Add changesets for conditional output feature
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Document conditional if on output links and text
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Guard against non-object items in output arrays
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Skip array items in output if-filtering destructuring
Add Array.isArray guard to prevent corrupting array items
into plain objects during the rest-destructuring step.
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Extract filterConditionalItems helper to deduplicate logic
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Align output if schema descriptions with step if semantics
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Fix docs quality check: replace 'falsy' wording
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
* Refactor filterConditionalItems to use flatMap and generics
Replace .filter().map() with a single flatMap call and make the function
generic to eliminate JsonArray casts at call sites.
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
---------
Signed-off-by: Dmitry Gusev <gusevda90@gmail.com>
The hasProperty rule was not included in the scaffolderActionRules export
or the public API report. Remove it and its associated tests.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Add a `toError` utility function to `@backstage/errors` that converts
unknown values to `ErrorLike` objects. If the value is already error-like
it is returned as-is. Strings are used directly as the error message, and
other values are stringified with a fallback to JSON.stringify to avoid
unhelpful `[object Object]` messages.
Non-error causes passed to `CustomErrorBase` are now converted and stored
using `toError` rather than discarded. Existing `assertError` call sites
across the codebase are migrated to `toError`.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor