Skip to content

Conversation

@talkor
Copy link
Member

@talkor talkor commented Nov 4, 2025

User description

https://monday.monday.com/boards/3532714909/pulses/18335286394


PR Type

Enhancement, Tests


Description

  • Add next components to bundle size check pipeline

  • Fix JSON regex pattern for accurate content extraction

  • Improve bundle comparison display for next components

  • Clean up JSDoc comments in RadioButton component


Diagram Walkthrough

flowchart LR
  A["next.ts exports"] -- "reorganized" --> B["next/index.ts"]
  B -- "includes Modal" --> C["Bundle Check"]
  D["generate-size-limit-config.js"] -- "processes" --> E["@next components"]
  E -- "compared in" --> F["compare-bundles.js"]
  F -- "displays with label" --> G["Bundle Report"]
Loading

File Walkthrough

Relevant files
Refactoring
next.ts
Reorganize next components exports                                             

packages/core/src/components/next.ts

  • Removed direct Modal export
  • Delegates to next/index.ts for all exports
+0/-1     
Enhancement
index.ts
Add Modal to next exports                                                               

packages/core/src/components/next/index.ts

  • Added Modal export from parent components directory
  • Centralizes all next component exports
+1/-0     
generate-size-limit-config.js
Add next components to size limit config                                 

scripts/bundle-check/generate-size-limit-config.js

  • Added path for next components dist file
  • Implemented processing logic for @next components
  • Extracts exports using regex pattern matching
  • Logs count of discovered next components
+21/-0   
Bug fix
compare-bundles.js
Improve bundle comparison for next components                       

scripts/bundle-check/compare-bundles.js

  • Fixed JSON regex pattern with anchors and multiline flag
  • Added conditional logic to display next components with label
  • Extracts component name from path for next components
+4/-1     
Documentation
RadioButton.tsx
Remove JSDoc comments from RadioButton                                     

packages/core/src/components/RadioButton/RadioButton.tsx

  • Removed JSDoc comments for labelClassName property
  • Removed JSDoc comments for radioButtonClassName property
+0/-6     

@qodo-merge-for-open-source
Copy link
Contributor

qodo-merge-for-open-source bot commented Nov 4, 2025

PR Reviewer Guide 🔍

(Review updated until commit abada09)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
 Findings summary: ⚠️ Title violates Conventional Commits
⚡ Recommended focus areas for review

Possible Parsing Bug

The new JSON regex uses multiline anchors and might still match invalid content or miss valid arrays if there is BOM/whitespace before/after; confirm robustness across CI outputs and consider trimming or using JSON.parse on extracted slice with safer locating.

const jsonMatch = content.match(/^\[[\s\S]*\]$/m);

if (!jsonMatch) {
  throw new Error("No JSON array found in content");
}
Fragile Regex

The export extraction regex for @next components is tightly coupled to minified formatting; small build changes could break it. Consider a more resilient pattern or parsing via AST when feasible.

  const exportRegex = /export\{.*?\}from"(\.\/[^"]+\.js)";/g;

  let match;
  let nextComponentsCount = 0;
  while ((match = exportRegex.exec(nextContent)) !== null) {
    const relativePath = match[1];
    const fullPath = path.join("packages/core/dist/src/components/", relativePath).replace(/\\/g, "/");
    allComponents.push({
      path: fullPath
    });
    nextComponentsCount++;
  }
  console.log(`Found ${nextComponentsCount} @next components.`);
} else {
  console.log(`@next dist file not found at ${distNextPath}.`);
}

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

📦 Bundle Size Analysis

✅ No bundle size changes detected.

Unchanged Components
Component Base PR Diff
@vibe/button 17.73KB 17.73KB 0B ➖
@vibe/icon 13.02KB 13.02KB 0B ➖
@vibe/loader 5.81KB 5.81KB 0B ➖
Accordion 6.35KB 6.35KB 0B ➖
AccordionItem 68.15KB 68.15KB 0B ➖
AlertBanner 72.79KB 72.79KB 0B ➖
AlertBannerButton 19.17KB 19.17KB 0B ➖
AlertBannerLink 15.51KB 15.51KB 0B ➖
AlertBannerText 65.44KB 65.44KB 0B ➖
AttentionBox 74.26KB 74.26KB 0B ➖
AttentionBoxLink 15.35KB 15.35KB 0B ➖
Avatar 68.37KB 68.37KB 0B ➖
AvatarGroup 95.71KB 95.71KB 0B ➖
Badge 43.5KB 43.5KB 0B ➖
Box 9.34KB 9.34KB 0B ➖
BreadcrumbItem 66.15KB 66.15KB 0B ➖
BreadcrumbMenu 70.14KB 70.14KB 0B ➖
BreadcrumbMenuItem 79.09KB 79.09KB 0B ➖
BreadcrumbsBar 5.76KB 5.76KB 0B ➖
ButtonGroup 70.17KB 70.17KB 0B ➖
Checkbox 68.43KB 68.43KB 0B ➖
Chips 77.07KB 77.07KB 0B ➖
Clickable 6.27KB 6.27KB 0B ➖
ColorPicker 76.11KB 76.11KB 0B ➖
ColorPickerContent 75.49KB 75.49KB 0B ➖
Combobox 85.91KB 85.91KB 0B ➖
Counter 42.41KB 42.41KB 0B ➖
DatePicker 134.34KB 134.34KB 0B ➖
Dialog 54.05KB 54.05KB 0B ➖
DialogContentContainer 6.3KB 6.3KB 0B ➖
Divider 5.55KB 5.55KB 0B ➖
Dropdown 125.48KB 125.48KB 0B ➖
menu 59.89KB 59.89KB 0B ➖
option 93.09KB 93.09KB 0B ➖
singleValue 93.07KB 93.07KB 0B ➖
EditableHeading 68.07KB 68.07KB 0B ➖
EditableText 68.08KB 68.08KB 0B ➖
EmptyState 72.68KB 72.68KB 0B ➖
ExpandCollapse 67.98KB 67.98KB 0B ➖
Flex 7.47KB 7.47KB 0B ➖
FormattedNumber 5.87KB 5.87KB 0B ➖
GridKeyboardNavigationContext 4.65KB 4.65KB 0B ➖
Heading 66.81KB 66.81KB 0B ➖
HiddenText 5.4KB 5.4KB 0B ➖
IconButton 70KB 70KB 0B ➖
Info 74.19KB 74.19KB 0B ➖
Label 70.32KB 70.32KB 0B ➖
LayerProvider 2.95KB 2.95KB 0B ➖
LegacyModal 76.68KB 76.68KB 0B ➖
LegacyModalContent 66.77KB 66.77KB 0B ➖
LegacyModalFooter 3.45KB 3.45KB 0B ➖
LegacyModalFooterButtons 20.68KB 20.68KB 0B ➖
LegacyModalHeader 72.8KB 72.8KB 0B ➖
Link 15.17KB 15.17KB 0B ➖
List 74.67KB 74.67KB 0B ➖
ListItem 67.37KB 67.37KB 0B ➖
ListItemAvatar 68.54KB 68.54KB 0B ➖
ListItemIcon 14.17KB 14.17KB 0B ➖
ListTitle 66.93KB 66.93KB 0B ➖
Menu 8.68KB 8.68KB 0B ➖
MenuDivider 5.63KB 5.63KB 0B ➖
MenuGridItem 7.22KB 7.22KB 0B ➖
MenuItem 79KB 79KB 0B ➖
MenuItemButton 71.98KB 71.98KB 0B ➖
MenuTitle 67.16KB 67.16KB 0B ➖
MenuButton 67.67KB 67.67KB 0B ➖
Modal 111.89KB 111.89KB 0B ➖
ModalContent 4.76KB 4.76KB 0B ➖
ModalHeader 67.58KB 67.58KB 0B ➖
ModalMedia 7.63KB 7.63KB 0B ➖
ModalFooter 69.56KB 69.56KB 0B ➖
ModalFooterWizard 70.53KB 70.53KB 0B ➖
ModalBasicLayout 9.1KB 9.1KB 0B ➖
ModalMediaLayout 8.21KB 8.21KB 0B ➖
ModalSideBySideLayout 6.35KB 6.35KB 0B ➖
MultiStepIndicator 53.32KB 53.32KB 0B ➖
NumberField 74.78KB 74.78KB 0B ➖
LinearProgressBar 7.47KB 7.47KB 0B ➖
RadioButton 67.66KB 67.66KB 0B ➖
Search 72.37KB 72.37KB 0B ➖
Skeleton 6.2KB 6.2KB 0B ➖
Slider 75.9KB 75.9KB 0B ➖
SplitButton 68.59KB 68.59KB 0B ➖
SplitButtonMenu 8.77KB 8.77KB 0B ➖
Steps 73.39KB 73.39KB 0B ➖
Table 7.29KB 7.29KB 0B ➖
TableBody 68.66KB 68.66KB 0B ➖
TableCell 66.97KB 66.97KB 0B ➖
TableContainer 5.37KB 5.37KB 0B ➖
TableHeader 5.71KB 5.71KB 0B ➖
TableHeaderCell 74.06KB 74.06KB 0B ➖
TableRow 5.59KB 5.59KB 0B ➖
TableRowMenu 70.43KB 70.43KB 0B ➖
TableVirtualizedBody 73.33KB 73.33KB 0B ➖
Tab 65.49KB 65.49KB 0B ➖
TabList 8.92KB 8.92KB 0B ➖
TabPanel 5.35KB 5.35KB 0B ➖
TabPanels 5.91KB 5.91KB 0B ➖
TabsContext 5.54KB 5.54KB 0B ➖
Text 66.64KB 66.64KB 0B ➖
TextArea 68.08KB 68.08KB 0B ➖
TextField 71.23KB 71.23KB 0B ➖
TextWithHighlight 65.87KB 65.87KB 0B ➖
ThemeProvider 4.69KB 4.69KB 0B ➖
Tipseen 73.25KB 73.25KB 0B ➖
TipseenContent 73.64KB 73.64KB 0B ➖
TipseenImage 73.38KB 73.38KB 0B ➖
TipseenMedia 73.31KB 73.31KB 0B ➖
TipseenWizard 75.9KB 75.9KB 0B ➖
Toast 76.11KB 76.11KB 0B ➖
ToastButton 19KB 19KB 0B ➖
ToastLink 15.32KB 15.32KB 0B ➖
Toggle 68.36KB 68.36KB 0B ➖
Tooltip 64.63KB 64.63KB 0B ➖
TransitionView 37.69KB 37.69KB 0B ➖
VirtualizedGrid 12.59KB 12.59KB 0B ➖
VirtualizedList 12.37KB 12.37KB 0B ➖
AttentionBox (Next) 76.3KB 76.3KB 0B ➖
Dropdown (Next) 96.14KB 96.14KB 0B ➖

📊 Summary:

  • Total Base Size: 5.65MB
  • Total PR Size: 5.65MB
  • Total Difference: +0B

text = "",
value = "",
name = "",
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?

Copy link
Member Author

Choose a reason for hiding this comment

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

I needed a change in the core/src folder to trigger the action, and this comment is already described in the props descriptions (JSDoc) above

@@ -1,2 +1,3 @@
export * from "./AttentionBox";
export * from "./Dropdown";
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not in the same folder? How did it work?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is actually 😛

@talkor talkor merged commit b9895e5 into master Nov 4, 2025
17 checks passed
@talkor talkor deleted the ci/bundle-check/next-components branch November 4, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants