Skip to content

Conversation

@KirylSAP
Copy link
Contributor

@KirylSAP KirylSAP commented Feb 9, 2026

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

  1. pnpm i
  2. pnpm lint
  3. pnpm test

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

@KirylSAP KirylSAP requested review from a team and franzheidl as code owners February 9, 2026 14:42
@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

⚠️ No Changeset found

Latest commit: 23d1d7d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

PR Preview Action v1.6.3

🚀 View preview at
https://cloudoperators.github.io/juno/pr-preview/pr-1445/

Built to branch gh-pages at 2026-02-10 11:11 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@KirylSAP KirylSAP changed the title feat: decouple interfaces from external interfaces feat(ui-components): decouple interfaces from external interfaces Feb 9, 2026
@KirylSAP KirylSAP changed the title feat(ui-components): decouple interfaces from external interfaces feat(ui): decouple interfaces from external interfaces Feb 9, 2026
TilmanHaupt
TilmanHaupt previously approved these changes Feb 9, 2026
Copy link
Contributor

@TilmanHaupt TilmanHaupt left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@taymoor89 taymoor89 left a comment

Choose a reason for hiding this comment

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

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.

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