Skip to content

feat(popover-container): align component with fusion designs - #8100

Open
edleeks87 wants to merge 1 commit into
masterfrom
FE-7211-popover-container-update
Open

feat(popover-container): align component with fusion designs#8100
edleeks87 wants to merge 1 commit into
masterfrom
FE-7211-popover-container-update

Conversation

@edleeks87

@edleeks87 edleeks87 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Proposed behaviour

Aligns with new PopoverContainer fusion designs
Uses next Button
Deprecates center alignment
Deprecates border radius prop
Adds translation key for default openButton.text()
Can be overridden by passing children directly as and when needed to open button render prop

Current behaviour

Not aligned with fusion
default open button is icon only and uses deprecated Button and IconButton

Checklist

  • Commits follow our style guide
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

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.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Pull request overview

Aligns PopoverContainer with Fusion designs.

Changes:

  • Migrates controls to the next-generation Button.
  • Updates Fusion styling and deprecates legacy alignment/radius options.
  • Adds localized default trigger text and updates tests/stories.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
skills/carbon-react/components/popover-container.md Excluded from review by policy.
src/locales/locale.ts Defines the new translation key.
src/locales/en-gb.ts Adds the English trigger label.
src/components/popover-container/popover-container.test.tsx Updates and extends tests.
src/components/popover-container/popover-container.style.ts Applies Fusion tokens and layout.
src/components/popover-container/popover-container.stories.tsx Migrates examples to next Button.
src/components/popover-container/popover-container.mdx Documents the translation key.
src/components/popover-container/popover-container.component.tsx Updates controls, types, and defaults.
src/components/popover-container/popover-container-test.stories.tsx Updates test stories.
src/components/popover-container/popover-container-interaction.stories.tsx Migrates interaction stories.
src/components/button/__next__/button.style.ts Adds legacy-menu styling overrides.
Files excluded by content exclusion policy (1)
  • skills/carbon-react/components/popover-container.md

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

Comment on lines 47 to 48
export interface RenderOpenProps {
tabIndex: number;
isOpen?: boolean;
Comment on lines +366 to +370
children: (
<>
{locale.popoverContainer.openButton.text()}
<Icon type="ellipsis_vertical" />
</>
Comment thread src/locales/en-gb.ts
Comment on lines +174 to +178
popoverContainer: {
openButton: {
text: () => "Actions",
},
},
@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch from 7788a03 to 19c4d1d Compare August 21, 2026 10:05
"data-popover-container-button": "true",
children: (
<>
{locale.popoverContainer.openButton.text()}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm on the fence a bit with whether context is the right approach here. In an ideal world I'd tear all of this out and just let them pass whatever button they need without the render prop but we need to avoid breaking changes right now. The alternative is to have Actions hardcoded and then consumers use the render prop to override the text etc

@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch from 19c4d1d to 9ee56d4 Compare August 21, 2026 10:32
@tomdavies73
tomdavies73 self-requested a review August 25, 2026 08:41
@DipperTheDan
DipperTheDan self-requested a review August 25, 2026 13:09
DipperTheDan
DipperTheDan previously approved these changes Aug 25, 2026
/**
* @deprecated
*/
tabIndex: number;

@tomdavies73 tomdavies73 Aug 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: currently we place the props from RenderOpenProps in an args table in the corresponding mdx file. However, this deprecation annotation doesn't show up as I believe there needs to be some sort of prop description to ensure the annotation shows up in storybook.

I think it would be worth adding a short prop description here to ensure the annotation is visible.

Screenshot 2026-08-25 at 15 51 32

@tomdavies73 tomdavies73 Aug 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, a bit of a related follow-up question here, I see tabIndex is not marked as deprecated for renderClose, is this intentional?

aria-haspopup={ariaHasPopup}
aria-expanded={ariaExpanded}
id={id}
variant="default"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: I don't think we need to set a variant of "default" as the component has an implicit default variant

type Position =
| "left"
| "right"
/** @deprecated "center" is deprecated and will be removed in a future release */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion (non-blocking): I don't believe adding a deprecated annotation like this results in any noticeable difference in an IDE and in storybook.

However, it does create some distinction from a code documentation standpoint if you wanted to leave it in.

Image Image

Comment thread src/locales/locale.ts
@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch 2 times, most recently from 64b34f4 to 22ebec7 Compare August 27, 2026 12:06
Comment thread src/components/popover-container/popover-container.test.tsx
DipperTheDan
DipperTheDan previously approved these changes Aug 27, 2026
tomdavies73
tomdavies73 previously approved these changes Aug 28, 2026
@ljemmo
ljemmo marked this pull request as ready for review September 3, 2026 11:00
@ljemmo
ljemmo requested review from a team as code owners September 3, 2026 11:00
@edleeks87
edleeks87 dismissed stale reviews from tomdavies73 and DipperTheDan via 565a825 September 3, 2026 13:51
@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch from 22ebec7 to 565a825 Compare September 3, 2026 13:51
DipperTheDan
DipperTheDan previously approved these changes Sep 3, 2026
tomdavies73
tomdavies73 previously approved these changes Sep 3, 2026
@edleeks87
edleeks87 dismissed stale reviews from tomdavies73 and DipperTheDan via a0cbb8e September 3, 2026 14:53
@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch from 565a825 to a0cbb8e Compare September 3, 2026 14:53
tomdavies73
tomdavies73 previously approved these changes Sep 3, 2026
DipperTheDan
DipperTheDan previously approved these changes Sep 3, 2026
@edleeks87
edleeks87 dismissed stale reviews from DipperTheDan and tomdavies73 via 6a1e2b0 September 8, 2026 15:59
@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch from a0cbb8e to 6a1e2b0 Compare September 8, 2026 15:59
@edleeks87
edleeks87 force-pushed the FE-7211-popover-container-update branch from 6a1e2b0 to e61eafb Compare September 8, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants