Commit Graph

1499 Commits

Author SHA1 Message Date
Patrik Oldsberg 36fb574fff use new mockApis
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-02-05 23:50:28 +01:00
Mitesh Kumar 4e581a66e5 fix(scaffolder): show template-specific title in browser tab (#32343)
* fix(scaffolder): show template-specific title in browser tab

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>

* adding changeset

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>

* updating api report

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>

* prefixing  Create new

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>

* updating the report

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>

---------

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
2026-02-03 15:03:02 +01:00
Fredrik Adelöw f02219a054 Merge pull request #32516 from backstage/freben/nodecolon
Add a rule for the use of `node:` prefix on native imports
2026-01-27 14:17:14 +01:00
Patrik Oldsberg 2eeca031c4 scaffolder: migrate nfs form fields to utility API
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2026-01-26 16:53:04 +01:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
martina-equinix 9d75495644 Fix autocomplete in scaffolder RepoUrlPickerRepoName (#32106)
* Fix autocomplete in scaffolder RepoUrlPickerRepoName

... since it was not filtering the list as the user types.

Signed-off-by: martina-equinix <martina.iglesias@eu.equinix.com>

* Add changeset

Signed-off-by: martina-equinix <martina.iglesias@eu.equinix.com>

* Update .changeset/tricky-tips-invite.md

Co-authored-by: Benjamin Janssens <benji.janssens@gmail.com>
Signed-off-by: martina-equinix <161837167+martina-equinix@users.noreply.github.com>

---------

Signed-off-by: martina-equinix <martina.iglesias@eu.equinix.com>
Signed-off-by: martina-equinix <161837167+martina-equinix@users.noreply.github.com>
Co-authored-by: Benjamin Janssens <benji.janssens@gmail.com>
2026-01-12 15:59:20 +01:00
Ben Lambert 08f8a58f82 Merge pull request #32105 from benjidotsh/scaffolder/repo-owner-picker
feat(scaffolder): add RepoOwnerPicker
2025-12-16 15:00:10 +01:00
Benjamin Janssens cdca772097 test: update tests
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-16 10:53:44 +01:00
Benjamin Janssens 49579170e9 refactor: remove coupling with form context
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-16 09:49:35 +01:00
Benjamin Janssens 014791a0d2 test: use renderInTestApp instead of render in tests for GitHubRepoOwnerPicker as well
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-12 11:47:56 +01:00
Benjamin Janssens 7acc84623e test: use renderInTestApp instead of render
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-12 11:23:48 +01:00
Johan Persson cd0b8a11a3 chore: make jest a peer dependency with v29/v30 support
Move jest from dependencies to peer dependencies, allowing users to
choose between Jest 29 and Jest 30.

The CLI now detects the Jest version at runtime and uses the
appropriate environment:
- Jest 29: Uses standard jest-environment-jsdom
- Jest 30: Uses a custom environment based on @jest/environment-jsdom-abstract
  with fixes for Web API globals (fetch, streams, Error, etc.)

The cross-fetch polyfill is only injected for Jest 29, as with Jest 30+
our patched Jest environment is used. The network request blocker is made
MSW-compatible by checking if fetch was wrapped before blocking.

Jest 30 (with jsdom v27) fixes `Could not parse CSS stylesheet`
warnings/errors when testing components from @backstage/ui or other
packages using CSS `@layer` declarations.

New peer dependencies (install based on your Jest version):
- jest (required, ^29 or ^30)
- Jest 29 requires: jest-environment-jsdom
- Jest 30 requires: @jest/environment-jsdom-abstract, jsdom

Production code changes for jsdom 27 testability:
- AppIdentityProxy: extract navigateToUrl method for spying
- LiveReloadAddon: export utils.reloadPage for spying
- collect.ts: export internal.resolvePackagePath for mocking

MockFetchApi: evaluate global.fetch at call time instead of construction
time, allowing MSW to patch fetch after MockFetchApi is constructed.

Test adaptations for jsdom 27:
- Use RGB values instead of named colors in CSS assertions
- Update error format expectations (hyphenated type names, SyntaxError
  instead of FetchError for JSON parse errors)
- Simplify URL error assertions for cross-version compatibility
- Fix accessible name whitespace handling for external links
- Use history.replaceState for location mocking (non-configurable)
- Use fireEvent.blur for contentEditable elements
- Move async assertions inside waitFor for race conditions
- Remove Blob.prototype.text polyfill (now native)
- Remove test case using credentials in plugin:// URLs

Test adaptations for Jest 30:
- Replace `expect.objectContaining([...])` with direct array equality
- Replace `expect.objectContaining({ length: N })` with
  `expect.any(Array)` + separate `toHaveLength()` assertions
- Use child process for native Node.js module resolution in
  collect.test.ts to work around Jest 30's resolver behavior
- Update snapshot headers for new Jest format

Also removes the jest-haste-map patch which is no longer needed.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:06:55 +01:00
Benjamin Janssens 2a8a10a87f feat: use translations for RepoOwnerPicker title and description fallback
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-11 14:48:40 +01:00
Benjamin Janssens 6c5a34ebf8 feat: add RepoOwnerPicker
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-10 17:10:12 +01:00
Patrik Oldsberg 1c7ea4a3e8 plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-23 14:36:02 +01:00
Patrik Oldsberg d02db50b42 plugins: cleanup unnecessary use of compatWrapper
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-23 12:56:54 +01:00
Paul Schultz 161999e837 fix tsc issues
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-14 08:29:22 -05:00
Paul Schultz 05f60e1e0a refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-14 08:29:21 -05:00
Tommy Le 90496fe472 fix: forward disabled prop
Signed-off-by: Tommy Le <tommy_le@outlook.com>
2025-09-30 17:10:30 +02:00
Hellgren Heikki 4ee97cf3ab chore(scaffolder): clean up api report from schemas and validators
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-09-24 11:22:45 +03:00
Hellgren Heikki 48d409f4ab fix: correct year for copyright headers
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-09-24 10:28:42 +03:00
Hellgren Heikki 075e0648b8 feat(scaffolder): add missing form fields for the nfs
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2025-09-24 10:28:41 +03:00
Ben Lambert 572845d2e5 Merge pull request #31077 from gauravagrawal01/fix/scaffolder-router-templatingExtensions
fix(scaffolder): add missing templatingExtensions option to RouterProps contextMenu
2025-09-23 14:42:10 +02:00
Alec Jacobs 7151260d27 fix(scaffolder): prevent MultiEntityPicker from removing existing options from form data
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2025-09-12 14:34:03 -07:00
Gaurav Agrawal e0ffe84d55 fix(scaffolder): add missing templatingExtensions flag to RouterProps contextMenu
Signed-off-by: Gaurav Agrawal <gaurav.agrawal01@nagarro.com>
2025-09-07 18:05:57 +00:00
David Fankhänel 5b64169384 fix(TemplateListPage): fix tsc error
Signed-off-by: David Fankhänel <david.fankhaenel@aeb.com>
2025-08-27 10:28:28 +02:00
David Fankhänel 0d415ae014 fix(scaffolder): render TechDocs link on Template List page for TechDocs annotations
Show “View TechDocs” link when template has backstage.io/techdocs-ref or backstage.io/techdocs-entity.
Append backstage.io/techdocs-entity-path when set.
Use buildTechDocsURL from @backstage/plugin-techdocs-react.
Add tests covering both annotations and path handling.
Update dependencies to include @backstage/plugin-techdocs-common and @backstage/plugin-techdocs-react.
Add sample TechDocs scaffolding to notifications-demo template.
Closes #29076.

Signed-off-by: David Fankhänel <david.fankhaenel@aeb.com>
2025-08-26 15:08:55 +02:00
Ben Lambert 9869424ffa Merge pull request #30456 from stephenglass/feat/add-adjustable-panels-template-editor
feat(scaffolder): adjustable panels width in template editor layouts
2025-08-11 10:27:44 +02:00
Patrik Oldsberg 147482b700 frontend-plugin-api: switch naming recommendation from define to defineParams
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-08-04 17:17:05 +02:00
Patrik Oldsberg e4ddf22854 frontend-plugin-api,catalog-react: remove default* prefix from blueprint params
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-08-04 16:46:55 +02:00
Stephen Glass b1c06969b6 Add resizable panel width feature to template editor layout
Signed-off-by: Stephen Glass <stephen@stephen.glass>
2025-07-29 23:27:17 -04:00
Ben Lambert 1315a825cf Merge pull request #27771 from solimant/23819_scaffolder_openapi
Move Scaffolder API to OpenAPI
2025-07-29 14:36:47 +02:00
Ben Lambert cf6fb4b5aa Merge pull request #30670 from backstage/export
Export `FormField` type from Scaffolder
2025-07-29 14:08:29 +02:00
benjdlambert c48a43fe53 chore: small refactor and moving types around
Signed-off-by: benjdlambert <ben@blam.sh>
2025-07-29 13:45:11 +02:00
benjdlambert df41cf9557 chore: cleanup breaking change
Signed-off-by: benjdlambert <ben@blam.sh>
2025-07-29 13:24:48 +02:00
James Brooks c4b7c5012e Export FormField type from Scaffolder
Signed-off-by: James Brooks <jamesbrooks@spotify.com>
2025-07-28 23:21:28 +01:00
solimant 29d8a18841 Fix tests
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:34 +00:00
solimant d2da49c568 Deprecate and re-export
Signed-off-by: solimant <solimant@users.noreply.github.com>
2025-07-28 20:59:34 +00:00
Patrik Oldsberg f2f133ce8d update all usages of ApiBlueprint
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-07-28 22:27:13 +02:00
Matt Benson b0dc9b8781 fix: differentiate between entirely and partially composite schemas
Signed-off-by: Matt Benson <gudnabrsam@gmail.com>
2025-07-22 17:30:27 -05:00
Ben Lambert d95621b1ee Merge pull request #29202 from 04kash/scaffolder-task-granular-permissions
Scaffolder task granular permissions
2025-07-08 12:54:43 +02:00
gaelgoth c4a0830215 Remove 'allowedHosts' from Publish action input in template files
Signed-off-by: gaelgoth <gothuey.gael@gmail.com>
2025-07-04 07:58:40 +02:00
Fredrik Adelöw 42ac5e0dc5 Merge pull request #30183 from koalaty-code/multi-entity-picker-filter-entity-presentation
fix(Scaffolder): filter MultiEntityPicker options based on rendered option values
2025-06-24 11:42:47 +02:00
Kashish Mittal cd8bf7e144 fix failing tests
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
2025-06-18 16:47:29 -04:00
Kashish Mittal d2b8e6e461 address review comments
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
2025-06-18 16:24:01 -04:00
Kashish Mittal 9bdd6dedf3 update tests for Ongoing Tasks Page
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
2025-06-18 16:19:11 -04:00
Kashish Mittal c1ce3164ae added files related to db queries, api-reports and changeset
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
2025-06-18 16:19:11 -04:00
Kashish Mittal 152ae1e3c5 feat: initial implementation of scaffolder granular permissions
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
Co-authored-by: Frank Kong <frkong@redhat.com>
2025-06-18 16:18:33 -04:00
Vincenzo Scamporlino 5b2a34ab58 scaffolder: adjust link component
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-06-13 15:38:44 +02:00
Vincenzo Scamporlino 90dc85d9d4 scaffolder: track edit link
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-06-13 13:07:04 +02:00