Repository navigation
perf(components): import Reka UI primitives by name instead of from reka-ui/namespaced - #7176
Conversation
β¦reka-ui/namespaced`
|
Client output of the apps in
Raw sizes
|
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configuration
π Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. π WalkthroughWalkthroughSeven runtime components now import Reka UI primitives directly instead of importing namespaced component groups. Each component assembles local objects that preserve the primitive members used by its existing templates or selection logic. Priority: β Normal Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: βͺ Minimal Β· up to The components retain their existing picker, menu, and popover component mappings while switching to direct imports. No actionable merge risk remains; proceed with normal checks. π₯ Pre-merge checks | β 5β Passed checks (5 passed)β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
π Linked issue
β Type of change
π Description
Noticed this while looking at the docs homepage, where the header's popover and dropdown menu load a 210 kB chunk holding the calendar, the date and time fields and the context menu.
Seven components import their primitives from
reka-ui/namespaced. That entry is a single module, so the bundler puts every namespace used anywhere in the app into one chunk, and a page that only renders aPopoverloads all of them. This PR imports the primitives by name fromreka-uiand rebuilds the small{ Root, Content, ... }maps locally, so the templates don't change.Measured on the
nuxtbundle fixture with two pages, one rendering aPopoverand aDropdownMenu, the other aCalendar,InputDate,InputTime,InputMenuandContextMenu. This is the JS the first page loads:The total output stays the same, so
pnpm run sizewon't show it.π Checklist