Skip to content

Import RadioList and Dropdown by uicore subpath, not the barrel - #156

Open
gcutrini wants to merge 1 commit into
mainfrom
perf/uicore-subpath-imports
Open

Import RadioList and Dropdown by uicore subpath, not the barrel#156
gcutrini wants to merge 1 commit into
mainfrom
perf/uicore-subpath-imports

Conversation

@gcutrini

@gcutrini gcutrini commented Aug 24, 2026

Copy link
Copy Markdown
Member

ref: https://app.clickup.com/t/86bbk4x0m

personal-information and lawpay-form each imported a single component from the openstack-uicore-foundation/lib/components barrel. Requiring the barrel pulls the entire uicore component set (react-select, react-bootstrap, tables, editors) into any bundle that includes this widget.

Switch both to their own subpaths:

  • RadioList -> lib/components/inputs/radio-list
  • Dropdown -> lib/components/inputs/dropdown

Both are default exports that the barrel simply re-exports, so the imports are exact equivalents and behavior is unchanged. The win is bundle size: a bundler can now drop the rest of the barrel. This matters most when the widget is built as a self-contained web component, where the barrel was dragging the whole component tree into the output.

personal-information and lawpay-form each imported a single component from
the openstack-uicore-foundation/lib/components barrel, which pulls the whole
uicore component set (react-select, react-bootstrap, tables, editors) into the
bundle. Import each from its own subpath instead:

- RadioList -> lib/components/inputs/radio-list
- Dropdown  -> lib/components/inputs/dropdown

Both are default exports the barrel just re-exports, so behavior is identical.
This lets a bundler drop the rest of the barrel, which shrinks the
web-component build of this widget substantially.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: aa47b6ef-1b16-471f-a484-5776381e85cd


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@santipalenque santipalenque left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

2 participants