Skip to content

feat(ai-chat): redesign Person entity-ref hover card with Manager row#3967

Draft
ReddyWish wants to merge 1 commit intomainfrom
feat/person-entity-ref-card-redesign
Draft

feat(ai-chat): redesign Person entity-ref hover card with Manager row#3967
ReddyWish wants to merge 1 commit intomainfrom
feat/person-entity-ref-card-redesign

Conversation

@ReddyWish
Copy link
Copy Markdown
Contributor

  • Add showChevron prop to DataList NavigateAction
  • Redesign PersonEntityRef hover card to show Manager row via DataList
  • Remove teams from PersonEntityRef (no longer displayed)
  • Add PersonEntityRef stories
  • Update i18n defaults for entityRef.person

- Add showChevron prop to DataList NavigateAction
- Redesign PersonEntityRef hover card to show Manager row via DataList
- Remove teams from PersonEntityRef (no longer displayed)
- Add PersonEntityRef stories
- Update i18n defaults for entityRef.person
Copilot AI review requested due to automatic review settings April 20, 2026 09:03
@github-actions github-actions Bot added feat react Changes affect packages/react labels Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions
Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-3967 to install the package

Use pnpm i github:factorialco/f0#a8f48ac1b52447a73aba3f804884893edc4dd154 to install this specific commit

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Visual review for your branch is published 🔍

Here are the links to:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Redesigns the AI chat PersonEntityRef hover card to include a “Manager” row (rendered via the Lists primitives), while also extending DataList’s navigate action to optionally hide the trailing chevron and adding supporting i18n, tests, and Storybook coverage.

Changes:

  • Add manager fields to PersonProfile and render a Manager row in PersonEntityRef (linkable when entityRefs.urls.person is available).
  • Extend NavigateAction / navigate action types with showChevron?: boolean and default it to true.
  • Add PersonEntityRef stories and expand unit tests for manager rendering/linking and optional-field behavior; add i18n default for the Manager label.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/types.ts Extends the resolved person profile shape with manager-related fields.
packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/PersonEntityRef.tsx Updates hover card mapping to include a Manager details row (optionally navigable).
packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/tests/PersonEntityRef.test.tsx Adds tests validating manager rendering, link behavior, and omission when optional fields are missing.
packages/react/src/sds/ai/F0AiChat/components/markdownRenderers/entityRef/entities/person/stories/PersonEntityRef.stories.tsx Introduces Storybook scenarios for full/minimal profile, loading, error, and no-resolver cases.
packages/react/src/lib/providers/i18n/i18n-provider-defaults.ts Adds default translation for ai.entityRef.person.manager.
packages/react/src/experimental/Lists/DataList/types/actions.ts Extends navigate action type with showChevron?: boolean.
packages/react/src/experimental/Lists/DataList/actions/NavigateAction.tsx Implements showChevron rendering toggle with a default of true.
packages/react/src/experimental/Lists/DataList/ItemContainer.tsx Propagates showChevron through internal navigate action typing.

Comment on lines +39 to +40
* provided. Trailing chevrons are suppressed via DataList's `showChevron`
* prop to keep the card dense.
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The doc comment mentions suppressing chevrons via “DataList’s showChevron prop”, but showChevron is actually part of the navigate action props (used by NavigateAction), not a prop on DataList itself. Updating the wording will avoid confusion for future readers.

Suggested change
* provided. Trailing chevrons are suppressed via DataList's `showChevron`
* prop to keep the card dense.
* provided. Trailing chevrons are suppressed via the navigate action's
* `showChevron` prop to keep the card dense.

Copilot uses AI. Check for mistakes.
lastName: string
avatarUrl?: string
jobTitle?: string
managerId?: string
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

PersonProfile.id is string | number, but the newly introduced managerId is only string. This makes the profile shape inconsistent and can force callers to cast when manager IDs are numeric; consider aligning managerId (and potentially other manager identifier fields) with the same string | number type as id.

Suggested change
managerId?: string
managerId?: string | number

Copilot uses AI. Check for mistakes.
Comment on lines 28 to 32
export type InternalNavigateActionType = {
type: "navigate"
href: string
showChevron?: boolean
}
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

InternalNavigateActionType now has an optional showChevron, so it’s no longer true that all internal action fields are mandatory. Either make showChevron mandatory internally (and default it when converting from the public action) or update the internal typing/comment to reflect that this field is optional.

Copilot uses AI. Check for mistakes.
export type NavigateActionProps = {
children: ReactNode
className?: string
showChevron?: boolean
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

NavigateActionProps declares showChevron twice (once in the local props and again via InternalNavigateActionType). This redundancy can be removed by relying on the action type’s field and applying the default during destructuring, which keeps the public prop surface clearer and avoids potential type conflicts.

Suggested change
showChevron?: boolean

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants