feat(ui): decouple interfaces from external interfaces#1445
Merged
Conversation
🦋 Changeset detectedLatest commit: d7b16a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
taymoor89
requested changes
Feb 10, 2026
Contributor
taymoor89
left a comment
There was a problem hiding this comment.
Thanks for taking care. Good work.
I'd suggest to change public interfaces of the components as less as possible and for standard html attributes extend with React.HTMLElement<HTMLElement> so we don't have to individually specify them.
packages/ui-components/src/components/PopupMenu/PopupMenu.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui-components/src/components/PopupMenu/PopupMenu.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui-components/src/components/PopupMenu/PopupMenu.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui-components/src/components/TabList/TabList.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui-components/src/components/TabPanel/TabPanel.component.tsx
Outdated
Show resolved
Hide resolved
packages/ui-components/src/components/TabPanel/TabPanel.component.tsx
Outdated
Show resolved
Hide resolved
…pupMenu components
…couple-interfaces-from-external-interfaces
taymoor89
reviewed
Feb 10, 2026
Contributor
taymoor89
left a comment
There was a problem hiding this comment.
I'd suggest releasing these types fixes as patch version update.
Co-authored-by: Kiryl Mishchuk <{kiryl.mishchuk@sap.com}>
taymoor89
approved these changes
Feb 11, 2026
franzheidl
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type leakage in the ui-components package caused by public component interfaces extending types from third-party libraries. These leaked types introduce unintended compile-time dependencies for consumers and break the abstraction boundary of the package.
Changes Made
• Refactored PopupMenu public interfaces:
(PopupMenuProps, PopupMenuToggleProps, PopupMenuItemProps, PopupMenuOptionsProps) to use only our own/React types instead of types from @headlessui/react, while keeping Headless UI as an internal implementation detail.
• Introduced dedicated DateTimePicker type module (types.ts) with DateOption, DateLimit, LocaleKey, CustomLocale, and DateChangeHandler (plus backward-compatible Juno* aliases), and wired DateTimePickerProps to use these types instead of flatpickr types.
• Added internal mappers.ts for DateTimePicker to convert our public types into flatpickr types, ensuring that flatpickr remains fully encapsulated and its types are not exposed from the package.
• Updated Tab, TabList, and TabPanel components to define their own TabProps, TabListProps, and TabPanelProps instead of extending react-tabs types, keeping react-tabs usage internal.
• Adjusted packages/ui-components/src/index.ts exports so consumers import only our public DateTimePicker and PopupMenu/Tab types, with no direct dependency on third-party type definitions.
Related Issues
Testing Instructions
pnpm ipnpm lintpnpm testChecklist
PR Manifesto
Review the PR Manifesto for best practises.