Skip to content

feat(DropdownPanel): export component#5085

Merged
zettca merged 1 commit intomasterfrom
feat/base-dropdown
Apr 9, 2026
Merged

feat(DropdownPanel): export component#5085
zettca merged 1 commit intomasterfrom
feat/base-dropdown

Conversation

@zettca
Copy link
Copy Markdown
Member

@zettca zettca commented Feb 11, 2026

  • refactor BaseDropdownPanel to HvDropdownPanel
    • now includes Popper and ClickAwayListener features
    • removed DS3-related input extensions
  • exports the new HvDropdownPanel
  • refactors usage in examples & HvSelect

@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 February 11, 2026 18:03 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from 0d8402d to c9618cd Compare February 20, 2026 03:18
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 February 20, 2026 03:22 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from c9618cd to d4cbe9a Compare April 6, 2026 16:51
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 6, 2026 16:55 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from d4cbe9a to 1b32ad7 Compare April 8, 2026 13:43
@zettca zettca changed the title chore(BaseDropdown): expose & use HvBaseDropdownPopper feat(DropdownPanel): export component Apr 8, 2026
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 13:48 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from 1b32ad7 to 67d7fa7 Compare April 8, 2026 14:09
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 14:14 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from 67d7fa7 to 856a1f4 Compare April 8, 2026 14:39
@zettca zettca marked this pull request as ready for review April 8, 2026 14:39
@zettca zettca requested a review from a team as a code owner April 8, 2026 14:39
Copilot AI review requested due to automatic review settings April 8, 2026 14:39
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 14:43 Destroyed
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

This PR introduces a new exported HvDropdownPanel component (refactoring the prior internal BaseDropdownPanel) and migrates dropdown-like components and docs examples to use it, centralizing Popper + ClickAwayListener behavior and aligning placement-driven styling.

Changes:

  • Refactor BaseDropdownPanel into the exported HvDropdownPanel using MUI Popper + ClickAwayListener and shared Popper modifiers.
  • Update HvBaseDropdown, HvSelect, HvDropdown, and HvDropDownMenu to use the new panel and placement propagation approach.
  • Refresh styles/examples and adjust CI Storybook sharding.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
packages/core/src/themes/pentaho.ts Adds theme slot overrides for HvDropdownPanel and keeps legacy popper styling for existing dropdowns.
packages/core/src/Select/Select.tsx Replaces direct Popper usage with HvDropdownPanel for the Select panel.
packages/core/src/Select/Select.styles.ts Removes panel/popup styling now expected to be provided by HvDropdownPanel/HvPanel.
packages/core/src/ListContainer/ListContainer.styles.tsx Adds padding/margin workaround around overflowClipMargin to improve Safari behavior.
packages/core/src/FilterGroup/FilterGroup.test.tsx Adjusts a test interaction/assertion to match updated focus behavior.
packages/core/src/DropDownMenu/DropDownMenu.tsx Tracks computed Popper placement and forwards it for placement-based styling.
packages/core/src/DropdownButton/DropdownButton.tsx Removes the placement prop and relies on callers to provide data-popper-placement when needed.
packages/core/src/Dropdown/List/List.tsx Removes BaseDropdown context dependency and derives max size from passed popper styles.
packages/core/src/Dropdown/List/List.styles.tsx Removes padding/margin now handled elsewhere (ListContainer styles).
packages/core/src/Dropdown/Dropdown.tsx Captures popper element styles during container creation and passes them to the list.
packages/core/src/BaseDropdown/utils.ts Introduces a shared usePopperModifiers hook for width/size modifiers and placement tracking.
packages/core/src/BaseDropdown/index.ts Re-exports the new panel from the BaseDropdown barrel.
packages/core/src/BaseDropdown/context.ts Removes the old Popper context (no longer needed with HvDropdownPanel).
packages/core/src/BaseDropdown/BaseDropdownPanel.tsx Implements the new exported HvDropdownPanel component.
packages/core/src/BaseDropdown/BaseDropdown.tsx Refactors HvBaseDropdown to use HvDropdownPanel and updated container creation signature.
packages/core/src/BaseDropdown/BaseDropdown.styles.tsx Removes panel/container styling now owned by HvDropdownPanel.
packages/core/src/AppSwitcher/AppSwitcher.styles.tsx Removes padding/margin now handled by updated ListContainer behavior.
apps/docs/src/app/examples/login/LoginShort.tsx Migrates example popper usage to HvDropdownPanel.
apps/docs/src/app/examples/login/LoginFull.tsx Migrates example popper usage to HvDropdownPanel (but includes a leftover debug log).
apps/docs/src/app/examples/inputs/TagsInputDropdown.tsx Migrates example popper usage to HvDropdownPanel.
apps/docs/src/app/examples/inputs/DropdownPrefix.tsx Updates Select usage/styling and enables variableWidth.
.github/workflows/tests.yml Increases Storybook test sharding from 2 to 3.

Comment on lines +34 to 43
export interface HvDropdownPanelProps
extends Omit<PopperProps, "children">,
Pick<HvBaseDropdownProps, "disablePortal" | "onClickOutside" | "children"> {
variableWidth?: boolean;
classes?: ExtractNames<typeof useClasses>;
containerId?: string;
onContainerKeyDown: (event: any) => void;
onToggle?: (event: any) => void;
onFirstUpdate?: OptionsGeneric<any>["onFirstUpdate"];
onClickAway: ClickAwayListenerProps["onClickAway"];
}
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

HvDropdownPanelProps extends HvBaseDropdownProps with onClickOutside, but the implementation doesn't use it, and instead requires a separate onClickAway prop. This forces consumers (e.g. HvSelect) to pass no-op handlers and adds unnecessary global listeners. Consider either: (1) make onClickAway optional and only wrap with ClickAwayListener when provided, or (2) accept onClickOutside and wire it internally to ClickAwayListener so callers don't need both concepts.

Copilot uses AI. Check for mistakes.
@zettca zettca force-pushed the feat/base-dropdown branch from 856a1f4 to 77ceed5 Compare April 8, 2026 14:56
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 15:01 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from 77ceed5 to 03eaa4d Compare April 8, 2026 15:15
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 15:20 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from 03eaa4d to 540bdda Compare April 8, 2026 15:24
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 15:30 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch 3 times, most recently from 8c1884c to c39d1e6 Compare April 8, 2026 16:19
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 16:23 Destroyed
@zettca zettca force-pushed the feat/base-dropdown branch from c39d1e6 to 5ee6a1f Compare April 8, 2026 17:20
@github-actions github-actions bot temporarily deployed to uikit-docs/pr-5085 April 8, 2026 17:24 Destroyed
chore: refactor code
chore: rename & misc
@zettca zettca merged commit c9935ab into master Apr 9, 2026
25 of 26 checks passed
@zettca zettca deleted the feat/base-dropdown branch April 9, 2026 17:01
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.

3 participants