Skip to content

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Oct 3, 2025

Fixes #2881
Fixes #2629

@Janpot, I created a few test files in test/public-types to ensure the types are portable. Maybe it should run in CI?

With this change, types are visible in Intellisense:

Screenshot 2025-10-07 at 11 12 32 pm

The main import always comes first so pressing Enter will still be correct, at which point you can ignore the top-level types and just use namespaces

Screenshot 2025-10-07 at 11 13 29 pm

@atomiks atomiks added type: bug It doesn't behave as expected. typescript scope: all components Widespread work has an impact on almost all components. labels Oct 3, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 3, 2025

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2912
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2912

commit: 383cad3

@netlify
Copy link

netlify bot commented Oct 3, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 383cad3
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/68e64e13f368660008fcf203
😎 Deploy Preview https://deploy-preview-2912--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mui-bot
Copy link

mui-bot commented Oct 3, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+4B(0.00%) ▼-1B(0.00%)

Details of bundle changes

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 6, 2025
Signed-off-by: atomiks <cc.glows@gmail.com>
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 7, 2025
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 7, 2025
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 7, 2025
Comment on lines +24 to +26
export const MyCheckbox = React.forwardRef<HTMLDivElement, CheckboxProps>(() => {
return <div />;
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main public test for type portability

Comment on lines +2 to +10

export type * from './root/DialogRoot';
export type * from './trigger/DialogTrigger';
export type * from './portal/DialogPortal';
export type * from './popup/DialogPopup';
export type * from './backdrop/DialogBackdrop';
export type * from './title/DialogTitle';
export type * from './description/DialogDescription';
export type * from './close/DialogClose';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes types portable (re-exports top-level types). Namespaces themselves re-export those top-level types so there are no breaking changes

@atomiks atomiks marked this pull request as ready for review October 7, 2025 12:15
@atomiks atomiks requested a review from Janpot October 7, 2025 12:24
@Janpot
Copy link
Member

Janpot commented Oct 7, 2025

Maybe it should run in CI?

Yes absolutely. That's the reason I named the script release:test (as opposed to test) so it could be set up as a command that runs on all workspaces that runs after release:build has run. the test command doesn't necessarily depend on production build.

- run: pnpm install
- run: pnpm release:build
- run: pnpm validate-declarations
- run: pnpm -F ./test/public-types release:test
Copy link
Member

@Janpot Janpot Oct 7, 2025

Choose a reason for hiding this comment

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

🤔 This and validate-declarations kind of feels more at place in circleci.

Not that it matters that much

@atomiks atomiks force-pushed the fix/type-portability-2 branch 3 times, most recently from 97f4dda to eed9d75 Compare October 8, 2025 04:56
@atomiks atomiks force-pushed the fix/type-portability-2 branch from eed9d75 to 21d20de Compare October 8, 2025 05:14
@atomiks atomiks requested a review from Janpot October 8, 2025 05:14
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

Only sampled a few of the library files for review, but seems solid from code infra POV. Leaving final review to Base UI team.

Co-authored-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
Signed-off-by: atomiks <cc.glows@gmail.com>
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 8, 2025
Signed-off-by: atomiks <cc.glows@gmail.com>
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 8, 2025
@atomiks atomiks force-pushed the fix/type-portability-2 branch from 6d09caa to f2d6a12 Compare October 8, 2025 11:20
Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Half way there, will continue but you can keep checking the comments so far.

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Nice!

@atomiks atomiks merged commit aef03db into mui:master Oct 8, 2025
20 checks passed
@atomiks atomiks deleted the fix/type-portability-2 branch October 8, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: all components Widespread work has an impact on almost all components. type: bug It doesn't behave as expected. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Types are not portable Autocomplete.useFilter bundle dts generation error

4 participants