Skip to content

feat(ui-ng): add access picker component - #671

Merged
BryanFRD merged 5 commits into
mainfrom
feat/ui-ng-access-picker
Oct 20, 2026
Merged

BryanFRD merged 5 commits into
mainfrom
feat/ui-ng-access-picker

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Adds flr-access-picker, ported from the consent screen in FerrLabs-Cloud (feat/token-org-allowlist) so site settings pages can reuse it.

Inputs: orgs, catalogue, presets, initialScopes, labels (EN/FR constants). Output: selectionChange emits { orgIds: string[] | null, scopes: string[] } or null when invalid. Styled with ui-foundation tokens.

Tests are Storybook play functions (Forms/Access picker). The test-runner could not run in my environment (no browser libs), so they are unverified in CI-less form; the pure selection logic was checked in node and the package and showcase build.

@ferrfleet-interne ferrfleet-interne Bot 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.

One blocking item: pickedScopes is synced from inputs by an effect when linkedSignal does that job. One nit on stale org ids. Everything else (labels pattern, a11y, stories) is consistent with the rest of ui-ng.

Comment thread packages/ui-ng/src/lib/access-picker/access-picker.component.ts Outdated
Comment thread packages/ui-ng/src/lib/access-picker/access-picker.model.ts

@ferrfleet-interne ferrfleet-interne Bot 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.

Both earlier findings are fixed in 5a729db: pickedScopes is now a linkedSignal, and stale org ids are filtered out. No new issues.

@ferrfleet-interne ferrfleet-interne Bot 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.

31893eb only changes the stories: output now goes through a report host callback bound to the fn() spy. Looks right, and I found no new issues.

@ferrfleet-interne ferrfleet-interne Bot 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.

124fe6e only touches the stories: expectLast and the aria-pressed checks now sit in waitFor, so they no longer race the effect that emits. The expected values match what the model functions produce. Nothing new found.

@ferrfleet-interne ferrfleet-interne Bot 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.

4f91e8e only touches the stories: the fn() spy is gone, report writes the last emission to a <pre data-testid="selection">, and expectLast checks that text inside waitFor. The expected values still match what the model produces. Nothing new found.

@BryanFRD
BryanFRD merged commit f34d256 into main Oct 20, 2026
16 checks passed
@BryanFRD
BryanFRD deleted the feat/ui-ng-access-picker branch October 20, 2026 09:55
ferrflow Bot added a commit that referenced this pull request Oct 20, 2026
## [1.45.0] - 2026-10-20

### Features

- feat(ui-ng): add access picker component (#671)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant