Skip to content

feat(apollo-wind): add ResourcePicker - #1244

Open
andreea-ene wants to merge 1 commit into
mainfrom
feat/resource-picker
Open

andreea-ene wants to merge 1 commit into
mainfrom
feat/resource-picker

Conversation

@andreea-ene

Copy link
Copy Markdown
Collaborator

Replaces #1210, which was opened from a fork so the required checks couldn't run.

Adds ResourcePicker, a field and popover for choosing one record from a grouped list.

The picker is generic over what it lists. A group is a heading with rows under it, and a row is an id, a label and an optional icon, so the same control serves Data Fabric entities, queues, storage buckets or anything else with that shape. The domain lives in the data a consumer passes, not in the component. Picking a person is the deliberate exception: people carry avatars and a resolved reference of their own, so they belong to a dedicated people picker.

Design decisions

Rows commit on click. One resource is one decision, so there is no Cancel and Select pair, which would add a second click to a choice that is already unambiguous. The footer's two slots hold the ways out of the picker instead, such as a link to create a new record. Passing them as slots keeps product routes out of the design system.

Selection is cyan, hover is neutral. The chosen row takes a tick, the brand tint (brand-subtle) and an accent label, and keeps them under the cursor. The neutral surface-overlay fill means cursor position and nothing else. surface-selected is not used for selection because it resolves to the same value as surface-hover in every theme, so the two states would be indistinguishable.

Ids must be unique across groups, labels need not be. The same name can appear under two folders, so the id carries the path.

Structure

Built on Command and Popover, following VariablePicker, with the file layout FolderPicker uses: types.ts for the consumer-facing API and a components/ folder for the row, group header, footer and empty state. The empty state is its own component with its own test, since an empty picker and a search that matched nothing are different things and must not collapse into one message.

The search is Apollo's own CommandInput rather than a bespoke field.

Stories

Components/Core/Resource Picker: Default, WithDescriptions, CollapsedGroup, WithValue, NotClearable, Disabled, EmptyStates, ContentOnly.

Screenshots

Default, with footer links Rows with descriptions and a disabled row
Resource picker open on Data Fabric entities grouped by folder, with Add new entity and Open entities links in the footer Resource picker open on queues, each row showing a pending count, with Billing disputes disabled
Chosen row, with the hover clear control A group that opens collapsed, counts hidden
Resource picker with Aavi chosen on a cyan tint with a tick, and a clear control in the field Resource picker on storage buckets with the Archived group collapsed and no group counts

Selection in Future Light: the tint follows the theme's brand token.

Resource picker in the Future Light theme with Aavi chosen on a cyan tint and AviNew under the pointer on a neutral fill

Empty states: an empty picker and a search that matched nothing say different things.

Two panels: No entities yet for an empty list, and No results match zzz for a search with no match

Checks

Run locally:

Check Result
biome format pass, 382 files
biome check pass
tsc --noEmit pass
vitest run (resource-picker) 23 passed
npm run build pass

Note: src/components/forms/form-plugins.test.tsx fails 26 tests on main as well, unrelated to this branch.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:02
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Oct 08, 2026, 04:09:06 AM
apollo-docs Ready Preview · Logs Oct 08, 2026, 04:09:06 AM
apollo-landing Ready Preview · Logs Oct 08, 2026, 04:09:06 AM
apollo-vertex Ready Preview · Logs Oct 08, 2026, 04:09:06 AM

@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1937 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1708
ISC 88
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.3 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The implementation has unresolved accessibility structure, labeling, disabled-trigger, and adornment-layout issues.

Review effort: Balanced
Findings: 5 Medium severity

Open (5)
What changed in this PR

Adds a generic grouped resource picker to apollo-wind, including searchable content, collapsible groups, selection, clearing, and footer actions.

Changes:

  • Adds ResourcePicker and standalone ResourcePickerContent.
  • Adds supporting rows, headers, footer, and empty states.
  • Adds Storybook examples, tests, and public exports.
File Description
src/​index.ts Exports picker API.
resource-picker/​types.ts Defines public types and filtering.
resource-picker/​resource-picker.tsx Implements picker behavior and UI.
resource-picker/​resource-picker.test.tsx Tests interaction and filtering.
resource-picker/​resource-picker.stories.tsx Documents usage and variants.
resource-picker/​index.ts Provides module exports.
components/​resource-row.tsx Renders selectable rows.
components/​resource-picker-footer.tsx Renders footer slots.
components/​resource-picker-empty-state.tsx Renders empty messages.
components/​resource-picker-empty-state.test.tsx Tests empty-state wording.
components/​resource-group-header.tsx Renders collapsible headers.
components/​ui/​index.ts Re-exports the picker module.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Comment thread packages/apollo-wind/src/components/ui/resource-picker/types.ts
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 16 added (of 28 compared, 12 unchanged). View report

Baseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs

Updated (PT): Oct 08, 2026, 04:11:34 AM

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core — — 42.02 MB 50.17 MB ±0
@uipath/apollo-react 48.9% — 7.90 MB 30.84 MB +78 B
@uipath/apollo-ui-icons — — 2.86 MB 6.97 MB ±0
@uipath/apollo-wind 74.7% 100.0% (106/106) 690.0 KB 4.04 MB +11.3 KB
@uipath/ap-chat 85.8% — 43.92 MB 56.80 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

Copilot AI balanced review requested due to automatic review settings October 1, 2026 12:43
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from c0e0590 to 847ee0c Compare October 1, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The picker ships invalid listbox semantics, loses focus after clearing, and mishandles groups containing no rows.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
Resolved since last review (4)

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Comment thread packages/apollo-wind/src/components/ui/resource-picker/types.ts Outdated
@andreea-ene
andreea-ene marked this pull request as draft October 5, 2026 09:05
Copilot AI balanced review requested due to automatic review settings October 5, 2026 11:58
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from 4a1d8a3 to aa0695e Compare October 5, 2026 12:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Value updates can reset active picker content, and externally labelled triggers do not announce the current selection.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Resolved since last review (3)

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 5, 2026 12:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Keyboard handling can select unintended resources or dismiss the picker before clearing its search, and long descriptions can hide row labels.

Review effort: Balanced
Findings: 5 Medium severity

Open (5)

Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:59
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from aa0695e to 22d7212 Compare October 6, 2026 09:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 10:47
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from 22d7212 to a041670 Compare October 6, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Disabled custom-trigger activation and collapse defaults for newly supplied groups need correction.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
Resolved since last review (2)

Copilot AI balanced review requested due to automatic review settings October 6, 2026 17:25
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from 509ee2c to e6394fc Compare October 6, 2026 17:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Empty and no-match messages need to move outside the listbox to preserve valid accessibility structure.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 17:48
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from e6394fc to ebb848f Compare October 6, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Custom keyboard and screen-reader interactions need hands-on verification before approval.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 19:05
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch 2 times, most recently from 87d7b51 to 59d6cc2 Compare October 6, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The custom grouped-list keyboard and accessibility interactions warrant hands-on validation before merge.

Review effort: Balanced
Findings: None

Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 7, 2026 00:09
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from 59d6cc2 to d0ffe2b Compare October 7, 2026 00:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Interaction and accessibility defects remain in supported shadow-root and custom-trigger configurations.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
@andreea-ene
andreea-ene marked this pull request as draft October 7, 2026 09:35
auto-merge was automatically disabled October 7, 2026 09:35

Pull request was converted to draft

Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:39
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from d0ffe2b to c50fc4a Compare October 7, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A nonempty controlled query without a change handler prevents Escape from clearing the search or dismissing the picker.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread packages/apollo-wind/src/components/ui/resource-picker/resource-picker.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 7, 2026 10:08
@andreea-ene
andreea-ene force-pushed the feat/resource-picker branch from c50fc4a to 65a222a Compare October 7, 2026 10:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

A field and popover for choosing one record from a grouped list. The
component is generic over what it lists: a group is a heading with rows
under it, and a row is an id, a label and an optional icon, so the same
control serves Data Fabric entities, queues, storage buckets or anything
else with that shape. The domain lives in the data a consumer passes.

Rows commit on click, so there is no Cancel and Select pair: one
resource is one decision. The footer's two slots hold the ways out of
the picker instead, which keeps product routes out of the component.

Built on Command and Popover, following VariablePicker, with the file
layout FolderPicker uses. Ids must be unique across groups; labels need
not be, since the same name can appear under two folders.

Selection is carried by a tick and a brand tint, kept apart from the
neutral fill that marks the cursor: `surface-selected` and
`surface-hover` resolve to the same value in every theme, so a selected
fill built on them would be indistinguishable from the row under the
pointer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-wind size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants