Skip to content

Remove barrel wrapper files#8089

Merged
deleonio merged 3 commits intodevelopfrom
0rn7b1-feature/uberprufe-anwendung-von-barrel-ansatz
Jul 21, 2025
Merged

Remove barrel wrapper files#8089
deleonio merged 3 commits intodevelopfrom
0rn7b1-feature/uberprufe-anwendung-von-barrel-ansatz

Conversation

@deleonio
Copy link
Copy Markdown
Contributor

@deleonio deleonio commented Jul 21, 2025

This pull request introduces several changes to improve module imports and enforce coding conventions. The most significant updates involve replacing barrel files with direct imports and modifying import paths across multiple components. Additionally, coding guidelines were updated to discourage the creation of barrel files.

Coding Conventions:

  • Updated AGENTS.md to include a guideline discouraging the creation of barrel files (e.g., index.ts) and recommending direct module imports instead.

Import Path Updates:

  • Replaced barrel file imports with direct imports in packages/components/src/components/combobox/shadow.tsx, input-checkbox/shadow.tsx, input-color/shadow.tsx, input-date/shadow.tsx, input-email/shadow.tsx, input-file/shadow.tsx, input-number/shadow.tsx, input-password/shadow.tsx, input-radio/shadow.tsx, input-range/shadow.tsx, input-text/shadow.tsx, select/shadow.tsx, single-select/shadow.tsx, and textarea/shadow.tsx. For example, KolFormFieldStateWrapperFc now imports directly from FormFieldStateWrapper/FormFieldStateWrapper. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Barrel File Removal:

  • Removed barrel files (index.ts) from the following directories: CheckboxStateWrapper, FieldControlStateWrapper, FormFieldStateWrapper, InputContainerStateWrapper, and InputStateWrapper. This aligns with the updated coding conventions. [1] [2] [3] [4] [5]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 21, 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 21, 2025

Hydration Benchmark Report (vs Baseline)

✅ Top 5 Improvements (Best Speedups)

Component Current Baseline Δ% Result
kol-form 28.9ms 35.6ms -18.8%
kol-skip-nav 19.8ms 23.6ms -16.1%
kol-avatar 22.8ms 26.9ms -15.2%
kol-table-stateless 373.7ms 437ms -14.5%
kol-heading 18.5ms 21.5ms -14%

🔻 Flop 5 Regressions (Worst Slowdowns)

Component Current Baseline Δ% Result
kol-drawer 40.2ms 25.6ms +57% 🔻
kol-card 29.3ms 22.6ms +29.6% 🔻
kol-input-number 62.7ms 56.1ms +11.8% 🔻
kol-link-button 61.6ms 56.5ms +9%
kol-link 52.3ms 49.8ms +5%
📋 Show all results
Component Current Baseline Δ% Result
kol-abbr 17.1ms 19.8ms -13.6%
kol-accordion 129.2ms 131ms -1.4%
kol-alert 110.8ms 105.9ms +4.6%
kol-avatar 22.8ms 26.9ms -15.2%
kol-badge 63.2ms 70.1ms -9.8%
kol-breadcrumb 93.7ms 97.6ms -4%
kol-button 59.5ms 63ms -5.6%
kol-button-link 49.8ms 50.7ms -1.8%
kol-card 29.3ms 22.6ms +29.6% 🔻
kol-details 128ms 134.9ms -5.1%
kol-drawer 40.2ms 25.6ms +57% 🔻
kol-form 28.9ms 35.6ms -18.8%
kol-heading 18.5ms 21.5ms -14%
kol-icon 66.1ms 65.1ms +1.5%
kol-image 18.4ms 19.3ms -4.7%
kol-input-checkbox 136.7ms 141.3ms -3.3%
kol-input-color 82.3ms 81.9ms +0.5%
kol-input-date 68.3ms 70.3ms -2.8%
kol-input-email 58.8ms 62.5ms -5.9%
kol-input-file 92.9ms 93.7ms -0.9%
kol-input-number 62.7ms 56.1ms +11.8% 🔻
kol-input-password 54ms 51.6ms +4.7%
kol-input-radio 53.1ms 56.5ms -6%
kol-input-text 59.8ms 59.3ms +0.8%
kol-link 52.3ms 49.8ms +5%
kol-link-button 61.6ms 56.5ms +9%
kol-modal 20.3ms 20.5ms -1%
kol-nav 30.2ms 33.9ms -10.9%
kol-pagination 429.9ms 423.8ms +1.4%
kol-popover-button 71.4ms 71.3ms +0.1%
kol-progress 30.7ms 32.8ms -6.4%
kol-quote 18.6ms 19ms -2.1%
kol-select 114.9ms 117.1ms -1.9%
kol-skip-nav 19.8ms 23.6ms -16.1%
kol-spin 24.7ms 24.2ms +2.1%
kol-split-button 174.8ms 174.7ms +0.1%
kol-table-stateful 368.9ms 374.7ms -1.5%
kol-table-stateless 373.7ms 437ms -14.5%
kol-tabs 29.5ms 32.3ms -8.7%
kol-textarea 53.4ms 54.1ms -1.3%
kol-toolbar 34.4ms 36ms -4.4%
kol-tree 26.4ms 26.5ms -0.4%
kol-tree-item 66.9ms 64ms +4.5%
kol-version 146.5ms 154.8ms -5.4%

deleonio added 2 commits July 21, 2025 11:05
…rrel-ansatz

Signed-off-by: Martin <6279703+deleonio@users.noreply.github.com>
@deleonio deleonio requested a review from Copilot July 21, 2025 13:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes barrel wrapper files from the component architecture to align with updated coding conventions that discourage barrel files in favor of direct imports. The changes systematically replace barrel file imports with direct module imports across all form components and input components.

Key Changes:

  • Added coding guideline discouraging barrel files (index.ts re-export modules)
  • Removed barrel files from all functional component wrapper directories
  • Updated import paths in 14 component shadow files to use direct imports instead of barrel imports

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

File Description
AGENTS.md Added guideline discouraging barrel files and recommending direct imports
packages/components/src/functional-component-wrappers/*/index.ts Removed barrel files from 8 wrapper directories
packages/components/src/components/*/shadow.tsx Updated 14 component files to use direct imports instead of barrel imports

@deleonio deleonio merged commit 3118881 into develop Jul 21, 2025
10 checks passed
@deleonio deleonio deleted the 0rn7b1-feature/uberprufe-anwendung-von-barrel-ansatz branch July 21, 2025 14:13
@publicuibot publicuibot bot locked and limited conversation to collaborators Jul 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants