BUI link components with relative hrefs (e.g. `../other`) would
navigate to the wrong URL because React Aria's navigate callback
receives the raw href string and cannot resolve it correctly from
where it is called in Backstage's routing setup.
This adds a `resolveHref` flag to the component definition system.
When enabled, `useDefinition` calls `useHref()` to turn relative
hrefs into absolute paths before they reach the React Aria layer.
A compile-time type guard ensures components with `href` in their
props cannot omit the flag.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Refactor `SignInResolverFactoryOptions` and `createSchemaFromZod` to use
`TSchema extends ZodType` instead of `ZodSchema<Output, Def, Input>`,
avoiding "excessively deep" TypeScript inference errors when multiple
Zod copies are resolved in a project.
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Add `DOM.AsyncIterable` to the shared TypeScript configuration in
`@backstage/cli`, making standard async iteration methods available on
DOM APIs like `FileSystemDirectoryHandle`. This aligns behavior with
TypeScript 6.0, where this lib is included in `DOM` by default.
With the async iterable types now available, replace the custom
`IterableDirectoryHandle` and `WritableFileHandle` types in the scaffolder
plugin with the standard `FileSystemDirectoryHandle` and
`FileSystemFileHandle` DOM types. Add type guard functions for
`FileSystemHandle` since it is not a discriminated union.
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Update the MUI to BUI migration skill to reflect the current state
of the @backstage/ui package.
Made-with: Cursor
Made-with: Cursor
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
TypeScript 6.0 no longer applies bivariant checking to method-shorthand
functions that don't reference `this`. This causes the `fix` callbacks in
suggestion descriptors to fail type checking when they return `void`
instead of a valid `Fix | null` value.
- Return `null` from non-fixable suggestion `fix` handlers
- Add explicit `SuggestionReportDescriptor[]` type annotation to `suggest`
- Remove redundant `@param` JSDoc annotations now covered by the array type
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Vale validation can require backticks around component names like
`useTable` in changesets. The sync script now strips backticks so
these names are matched correctly.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Component names in the "Affected components" examples should use
PascalCase (Button, Card, Table) to match actual component names.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Migrate all humanizeEntityRef and humanizeEntity usages to the Catalog
Presentation API across catalog, catalog-react, org-react,
catalog-import, scaffolder, and techdocs plugins.
- Use useEntityPresentation hook in React component contexts
(AncestryPage)
- Use defaultEntityPresentation for non-React contexts like sort
comparators, filter functions, and data mappers
- Add @deprecated tags to humanizeEntityRef and humanizeEntity
- Improve TSDoc on entityPresentationApiRef, EntityPresentationApi,
useEntityPresentation, EntityDisplayName, and
defaultEntityPresentation with guidance on which to use when
- Add Entity Presentation docs page with usage examples and migration
guide
Made-with: Cursor
Signed-off-by: Marat Dyatko <maratd@spotify.com>
New plugin nav items like "Catalog Graph" cause Playwright's
substring-based getByRole name matching to find multiple elements
when searching for "Catalog". Switch to exact: true.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor