Commit Graph

73357 Commits

Author SHA1 Message Date
Fredrik Adelöw 8a871869fa Merge pull request #34018 from backstage/freben/fix-swappable-components-docs
docs(swappable-components): fix missing backticks and small typos
2026-04-22 09:23:44 +02:00
backstage-goalie[bot] 14b50d85ac Merge pull request #34020 from backstage/renovate/npm-dompurify-vulnerability
Update dependency dompurify to v3.4.0 [SECURITY]
2026-04-22 00:13:57 +00:00
Fredrik Adelöw e2fdc2b61f Merge pull request #33911 from backstage/changeset-release/master
Version Packages (next)
2026-04-21 18:05:23 +02:00
renovate[bot] 4c66f3e96c Update dependency dompurify to v3.4.0 [SECURITY]
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-21 15:14:31 +00:00
github-actions[bot] 1cc86bee1c Version Packages (next) 2026-04-21 15:07:43 +00:00
Charles de Dreuille 50a66a9183 Merge pull request #33909 from backstage/cursor/add-date-range-picker
feat(ui): add DateRangePicker component
2026-04-21 15:54:38 +01:00
Fredrik Adelöw 8c8199cdf9 Update docs/frontend-system/building-plugins/06-swappable-components.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-04-21 16:29:15 +02:00
Fredrik Adelöw ffb749e4b6 docs(swappable-components): fix missing backticks and small typos
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
2026-04-21 16:21:03 +02:00
Patrik Oldsberg 957be583cd Merge pull request #34017 from drodil/home_fix_patch
chore: add patch file for #33721
2026-04-21 11:56:07 +02:00
Hellgren Heikki 81f8d5f7de chore: add patch file for #33721
Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
2026-04-21 12:42:00 +03:00
Fredrik Adelöw e5e7700c7b Merge pull request #34001 from backstage/freben/facets-perf
catalog-backend: fix facets endpoint performance regression
2026-04-21 09:59:56 +02:00
Patrik Oldsberg 94e941867b Merge pull request #34011 from backstage/rugvip/remove-unused-integration-exports
integration: remove unnecessary exports from internal helpers
2026-04-20 19:59:42 +02:00
Patrik Oldsberg 05eca714b6 Merge pull request #34008 from backstage/rugvip/remove-unused-addunprocessedentitiesresult
catalog-backend: 🧹
2026-04-20 19:59:20 +02:00
Andre Wanlin 391ef097e9 Merge pull request #34002 from awanlin/blog/bc-kc-amsterdam-2026
Backstage in Amsterdam: Highlights from BackstageCon and KubeCon + CloudNativeCon Europe 2026
2026-04-20 10:59:53 -05:00
Andre Wanlin 54b58d0fed Prettier
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-20 10:47:47 -05:00
Johan Persson e8a1a35714 feat(ui): add isPending prop and deprecate loading
Add `isPending` prop to Alert, Button, ButtonIcon, Table, and
TableRoot, aligning with React Aria naming conventions. The
`loading` prop is deprecated but remains functional as an alias.

CSS selectors now target `data-ispending` instead of `data-loading`
for pending state styling. The `data-loading` attribute is still
emitted for backward compatibility.

Internal Table hooks (`PaginationResult`, `UsePageCacheResult`)
renamed `loading` to `isPending`. The `useTable` hook returns both
`isPending` and `loading` on `tableProps` to preserve backward
compatibility.

Updated docs-ui documentation and stories accordingly.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-20 17:36:21 +02:00
Fredrik Adelöw 0ecb700add Remove NOT IN unstitched guard from facets no-filter path
The NOT IN guard against null final_entity rows was preventing the
query planner from using parallel workers and (with a future covering
index) index-only scans. Without the covering index it caused a 2.6x
regression on the no-filter path (7s -> 18.4s).

The filtered path already excludes unstitched entities via the
whereNotNull('final_entities.final_entity') in the inner
entityIdSubquery, so no guard is needed there.

The no-filter path now matches 1.49.x behavior. A followup migration
adding a covering index can re-introduce the guard efficiently.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 17:31:00 +02:00
Patrik Oldsberg 191b41a0b3 integration: remove unnecessary exports from internal helpers
Remove `export` from five internal helper functions that are not part of
the published API and are only used within their own files. The `sleep`
function in GitLabIntegration is kept exported for test access but marked
as `@internal`.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-20 16:49:21 +02:00
Patrik Oldsberg 6316dc66d3 catalog-backend: remove unused AddUnprocessedEntitiesResult type
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-04-20 16:40:38 +02:00
Fredrik Adelöw f32d334034 Exclude unstitched entities from facets via NOT IN null set
Instead of checking IS NOT NULL against ~520k rows (which adds a
2.6x regression on the no-filter path), exclude the tiny set of
entities where final_entity IS NULL (~3,700 rows). The anti-join
is nearly free and allows the guard to be applied unconditionally,
so facets results consistently exclude not-yet-stitched (or future
tombstoned) entities regardless of whether filters are present.

Also addresses review feedback:
- Add regression test for unstitched entity exclusion
- Extract setupFacetsCatalog helper to reduce test boilerplate
- Tighten assertions: use exact arrays instead of arrayContaining

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 16:14:03 +02:00
Fredrik Adelöw 88409600ba Revert to conditional final_entities constraint for facets
Benchmarking on a production-like database shows that always applying
the final_entities subquery (even without filters) causes a 2.6x
regression on the no-filter path (5.2s -> 13.5s) due to ~530k
memoized index lookups against final_entities. The FK cascade from
search -> final_entities already guarantees search rows only exist
for entities with a final_entities row, so the constraint is only
needed when filters route through final_entities.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 15:46:37 +02:00
Fredrik Adelöw d7c6ad8e14 Remove unnecessary whereNotNull guard from facets subquery
The whereNotNull('final_entities.final_entity') was copied from other
code paths that select the final_entity column, but the facets subquery
only needs entity_id. Removing it preserves exact v1.49 semantics
(search rows only exist for stitched entities anyway, due to the FK
cascade from search -> final_entities) and avoids an inconsistency
where the no-filter path did not exclude unstitched entities while the
with-filter path did.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:43:22 +02:00
Fredrik Adelöw 9ae08d07e2 Add thorough facets tests for predicate queries and compound filters
Adds standalone test coverage for the facets method in
DefaultEntitiesCatalog to ensure it works correctly with:
- Predicate query filtering (simple key match)
- Predicate query filtering using $in operator
- Compound allOf filters
- Compound anyOf filters
- Both filter and query combined

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:21:57 +02:00
Andre Wanlin 0d14cb6acf Clean up
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-20 07:03:42 -05:00
Fredrik Adelöw 673587dd4f Add patch release file for PR #34001
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:03:19 +02:00
Fredrik Adelöw cf195de72c catalog-backend: fix facets endpoint performance regression
Route the EXISTS-based filters through final_entities (one row per
entity) instead of correlating against the search table directly.
This avoids the pathological case where correlated subqueries scan
the much larger search table for every row in the outer facets query.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-20 14:02:02 +02:00
MT Lewis 7192e84cad Merge pull request #33948 from backstage/flex-item-props
ui: add support for flex-item props to generic layout components
2026-04-20 09:54:14 +01:00
Fredrik Adelöw e6f30e028a Merge pull request #33993 from backstage/freben/fix-scheduler-sleep
fix(scheduler): handle setTimeout overflow for long sleep durations
2026-04-20 09:47:11 +02:00
Fredrik Adelöw 1688bdc19d Merge pull request #33996 from backstage/freben/owner-column-cleanup
Simplify OwnerEntityColumn to use EntityRefLink directly
2026-04-20 09:46:34 +02:00
Andre Wanlin 60d785e5c9 Edits
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2026-04-19 15:25:15 -05:00
Charles de Dreuille 3e9f20340a fix(ui): improve DateRangePicker accessibility and fix docs link
- Add aria-label="Open calendar" and aria-hidden on icon for the calendar trigger button
- Add aria-hidden on nav button icons (React Aria provides built-in labels for prev/next slots)
- Update React Aria docs link to react-aria.adobe.com format

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 07:36:48 +02:00
Charles de Dreuille dc17c01a53 Update page.mdx
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-19 07:33:10 +02:00
Charles de Dreuille d676565abb fix(ui): refine DateRangePicker calendar button styling
- Fixed size: 1.5rem (small), 2rem (medium) in rem units
- No padding, flex-centered icon
- Inset focus ring using 1px box-shadow with --bui-ring token
- Border radius bumped to radius-2
- Medium size padding-inline-end reduced to space-1

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:59:06 +02:00
Charles de Dreuille b6d52bdb7d chore: dedupe yarn.lock
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:45:32 +02:00
Charles de Dreuille f221068ab9 fix(ui): use BUI Popover and add unavailable dates story in DateRangePicker
- Switch DateRangePicker to use the BUI Popover component (with hideArrow)
  instead of the raw react-aria-components Popover
- Add WithUnavailableDates story showing isDateUnavailable with weekends
  blocked and non-contiguous ranges disallowed (default behaviour)

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:38:47 +02:00
Charles de Dreuille ff68a57b14 Update report.api.md
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-19 06:38:21 +02:00
Charles de Dreuille 20a5de0605 Fix styles
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-04-19 06:38:21 +02:00
Charles de Dreuille 401916d55b feat(ui): add DateRangePicker component
Adds a new DateRangePicker component to @backstage/ui built on React Aria,
featuring a custom field group with two DateInput fields and a calendar
trigger, a RangeCalendar popover with proper range selection visuals
(solid circles for start/end, transparent solid fill for in-range cells
with row-boundary rounding), and full BUI token usage including bg
consumer auto-increment. Includes Storybook stories and a docs-ui page.

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Made-with: Cursor
2026-04-19 06:38:19 +02:00
Fredrik Adelöw 83ac69be86 Fix ListTaskPage test to match simplified OwnerEntityColumn
Update assertions to expect the entity presentation short ref (e.g.
'foo') instead of the old catalog-resolved display name (e.g.
'BackUser'), and remove now-unused entity fixtures and catalog API
mocking.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 22:50:30 +02:00
Fredrik Adelöw 415e30b489 Add changeset
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 22:33:41 +02:00
Fredrik Adelöw 8341f98940 Simplify OwnerEntityColumn to use EntityRefLink directly
Remove the catalog API lookup and manual title resolution. The
EntityRefLink already uses the entity presentation API to resolve
display names, so the component only needs the entity ref string.

This removes unused imports of useApi, useAsync, catalogApiRef,
parseEntityRef, and UserEntity.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 22:32:54 +02:00
Fredrik Adelöw 89d324840c fix(scheduler): handle setTimeout overflow for long sleep durations
Node.js setTimeout uses a 32-bit signed integer for the delay, so
values larger than 2^31-1 ms (~24.8 days) cause the callback to fire
immediately. Fix by chunking the wait into segments of at most 2^30 ms.

Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-18 15:30:07 +02:00
MT Lewis 0912de3a25 ui: transform number to px in basis utility prop
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2026-04-17 17:52:23 +01:00
MT Lewis 68d1725113 ui: style overrides take higher precedence than utility styles in Box
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2026-04-17 17:47:46 +01:00
MT Lewis ea220e9a9d ui: document FlexItemProps
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2026-04-17 17:47:29 +01:00
MT Lewis 62cc936894 ui: fix organization of .changeset/funny-areas-rescue.md
Co-authored-by: Johan Persson <johanopersson@gmail.com>
Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
2026-04-17 17:46:04 +01:00
Johan Persson c3ca20c864 patches: add entry for #33984
Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-17 14:18:22 +02:00
Johan Persson c6fc76f532 fix(ui): prevent hidden Tabs tree from stomping active indicator opacity
React Aria's `CollectionBuilder` renders `TabList`'s children into both a
hidden collection-building tree and the real DOM. The hidden instance of
`TabsIndicators` sits outside the `TabListStateContext` provider, so its
`state` is `null` — causing its `updateCSSVariables` effect to hit the
`else` branch and write `--active-tab-opacity: 0` to the `tabsRef` DOM
element that the real instance also writes to. Under the right render
ordering, this hidden write lands after the real instance's `opacity: 1`
and makes the active indicator disappear on uncontrolled Tabs.

Guard `updateCSSVariables` with an early return when `state == null` so
the hidden instance never writes to the shared DOM element.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-04-17 14:18:22 +02:00
Patrik Oldsberg 64b186f465 Merge pull request #33962 from backstage/rugvip/remove-unused-getgithubintegrationconfig
catalog-import: 🧹
2026-04-17 13:07:27 +02:00
Patrik Oldsberg 4247ab84e1 Merge pull request #33961 from backstage/remove-unused-task-settings-v1
backend-defaults: 🧹
2026-04-17 13:07:16 +02:00