Skip to content

fix(usePopover): fix offset when false#3243

Merged
rivka-ungar merged 2 commits intomasterfrom
menu-fix-error-on-submenu-hover-11108189967
Jan 28, 2026
Merged

fix(usePopover): fix offset when false#3243
rivka-ungar merged 2 commits intomasterfrom
menu-fix-error-on-submenu-hover-11108189967

Conversation

@rivka-ungar
Copy link
Copy Markdown
Contributor

@rivka-ungar rivka-ungar commented Jan 27, 2026

User description

https://monday.monday.com/boards/3532714909/views/80492480/pulses/11108189967


PR Type

Bug fix


Description

  • Fix offset modifier array construction in usePopover hook

  • Replace conditional object with proper array spreading syntax

  • Ensure offset modifier correctly included or excluded from modifiers array


Diagram Walkthrough

flowchart LR
  A["offset !== undefined check"] -->|conditional object| B["Invalid modifier syntax"]
  A -->|array spreading| C["Valid modifiers array"]
  C --> D["Correct popover positioning"]
Loading

File Walkthrough

Relevant files
Bug fix
usePopover.ts
Fix offset modifier array spreading syntax                             

packages/components/dialog/src/Dialog/usePopover.ts

  • Changed offset modifier from conditional object to conditional array
    spreading
  • Wraps offset modifier in array when defined, returns empty array when
    undefined
  • Adds as const type assertion to offset modifier name
  • Ensures proper array concatenation with spread operator
+8/-4     

@rivka-ungar rivka-ungar marked this pull request as ready for review January 27, 2026 12:42
@rivka-ungar rivka-ungar requested a review from a team as a code owner January 27, 2026 12:42
@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Type Assertion Necessity

The as const type assertion on the name property may be unnecessary. Verify if this is required for type compatibility with the modifiers array or if it can be removed for cleaner code.

name: "offset" as const,
options: { offset }

@github-actions
Copy link
Copy Markdown
Contributor

A new prerelease version of this PR has been published! 🎉
To use this prerelease version, install the needed packages in your project:

@vibe/dialog@3.0.11-alpha-67aba.0
@vibe/icon-button@3.0.4-alpha-67aba.0
@vibe/tooltip@3.0.4-alpha-67aba.0
@vibe/typography@3.0.4-alpha-67aba.0
@vibe/core@3.83.4-alpha-67aba.0
@vibe/docs@3.5.9-alpha-67aba.0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 27, 2026

📦 Bundle Size Analysis

✅ No bundle size changes detected.

Unchanged Components
Component Base PR Diff
@vibe/button 17.74KB 17.79KB +57B 🔺
@vibe/clickable 6.07KB 6.05KB -21B 🟢
@vibe/dialog 53.82KB 53.82KB +3B 🔺
@vibe/icon-button 68.06KB 68.12KB +61B 🔺
@vibe/icon 13.01KB 13.01KB +3B 🔺
@vibe/layer 2.96KB 2.96KB 0B ➖
@vibe/layout 10.56KB 10.54KB -24B 🟢
@vibe/loader 5.8KB 5.82KB +16B 🔺
@vibe/tooltip 63KB 63.01KB +3B 🔺
@vibe/typography 65.45KB 65.38KB -72B 🟢
Accordion 6.35KB 6.33KB -21B 🟢
AccordionItem 68.12KB 68.15KB +36B 🔺
AlertBanner 72.86KB 72.81KB -53B 🟢
AlertBannerButton 19.21KB 19.22KB +4B 🔺
AlertBannerLink 15.52KB 15.5KB -22B 🟢
AlertBannerText 65.43KB 65.41KB -17B 🟢
AttentionBox 74.47KB 74.51KB +33B 🔺
AttentionBoxLink 15.38KB 15.36KB -20B 🟢
Avatar 68.29KB 68.37KB +79B 🔺
AvatarGroup 96.08KB 95.94KB -136B 🟢
Badge 43.46KB 43.45KB -11B 🟢
BreadcrumbItem 66.16KB 66.11KB -44B 🟢
BreadcrumbMenu 70.27KB 70.4KB +140B 🔺
BreadcrumbMenuItem 79.35KB 79.38KB +27B 🔺
BreadcrumbsBar 5.75KB 5.75KB +7B 🔺
ButtonGroup 70.31KB 70.25KB -55B 🟢
Checkbox 68.51KB 68.43KB -88B 🟢
Chips 77.17KB 77.13KB -32B 🟢
ColorPicker 76.29KB 76.25KB -35B 🟢
ColorPickerContent 75.41KB 75.44KB +28B 🔺
Combobox 86.3KB 86.33KB +32B 🔺
Counter 42.37KB 42.35KB -15B 🟢
DatePicker 134.44KB 134.39KB -51B 🟢
Divider 5.53KB 5.53KB +2B 🔺
Dropdown 126.06KB 125.87KB -197B 🟢
menu 59.91KB 59.96KB +54B 🔺
option 93.05KB 93.16KB +110B 🔺
singleValue 93.13KB 93.02KB -113B 🟢
EditableHeading 68.26KB 68.28KB +19B 🔺
EditableText 68.2KB 68.16KB -40B 🟢
EmptyState 72.63KB 72.69KB +57B 🔺
ExpandCollapse 67.98KB 67.91KB -65B 🟢
FormattedNumber 5.89KB 5.89KB -6B 🟢
GridKeyboardNavigationContext 4.66KB 4.65KB -5B 🟢
HiddenText 5.45KB 5.45KB +3B 🔺
Info 74.37KB 74.31KB -62B 🟢
Label 70.39KB 70.41KB +17B 🔺
LegacyModal 76.81KB 76.76KB -52B 🟢
LegacyModalContent 66.75KB 66.86KB +110B 🔺
LegacyModalFooter 3.45KB 3.45KB 0B ➖
LegacyModalFooterButtons 20.62KB 20.62KB 0B ➖
LegacyModalHeader 72.89KB 72.89KB 0B ➖
Link 15.2KB 15.16KB -36B 🟢
List 74.81KB 74.87KB +58B 🔺
ListItem 67.34KB 67.24KB -110B 🟢
ListItemAvatar 68.55KB 68.5KB -52B 🟢
ListItemIcon 14.18KB 14.24KB +54B 🔺
ListTitle 66.72KB 66.72KB +2B 🔺
Menu 8.73KB 8.72KB -13B 🟢
MenuDivider 5.64KB 5.65KB +16B 🔺
MenuGridItem 7.22KB 7.22KB -1B 🟢
MenuItem 79.28KB 79.3KB +26B 🔺
MenuItemButton 72.2KB 72.23KB +32B 🔺
MenuTitle 67.16KB 67.1KB -63B 🟢
MenuButton 67.76KB 67.77KB +2B 🔺
Modal 111.84KB 111.88KB +34B 🔺
ModalContent 4.76KB 4.76KB -1B 🟢
ModalHeader 67.54KB 67.54KB -2B 🟢
ModalMedia 7.74KB 7.73KB -18B 🟢
ModalFooter 69.46KB 69.48KB +22B 🔺
ModalFooterWizard 70.49KB 70.38KB -114B 🟢
ModalBasicLayout 9.21KB 9.2KB -2B 🟢
ModalMediaLayout 8.33KB 8.32KB -3B 🟢
ModalSideBySideLayout 6.35KB 6.37KB +22B 🔺
MultiStepIndicator 53.26KB 53.25KB -12B 🟢
NumberField 74.88KB 74.87KB -12B 🟢
LinearProgressBar 7.47KB 7.46KB -6B 🟢
RadioButton 67.55KB 67.54KB -10B 🟢
Search 72.49KB 72.45KB -34B 🟢
Skeleton 6.2KB 6.19KB -1B 🟢
Slider 75.92KB 75.82KB -110B 🟢
SplitButton 68.84KB 68.81KB -36B 🟢
SplitButtonMenu 8.79KB 8.83KB +33B 🔺
Steps 73.5KB 73.51KB +12B 🔺
Table 7.31KB 7.32KB +3B 🔺
TableBody 68.7KB 68.62KB -79B 🟢
TableCell 66.93KB 66.9KB -36B 🟢
TableContainer 5.35KB 5.36KB +13B 🔺
TableHeader 5.68KB 5.68KB -1B 🟢
TableHeaderCell 74.09KB 74.17KB +81B 🔺
TableRow 5.59KB 5.63KB +36B 🔺
TableRowMenu 70.6KB 70.58KB -20B 🟢
TableVirtualizedBody 73.27KB 73.27KB 0B ➖
Tab 65.54KB 65.46KB -89B 🟢
TabList 8.9KB 8.9KB -1B 🟢
TabPanel 5.36KB 5.33KB -29B 🟢
TabPanels 5.95KB 5.94KB -11B 🟢
TabsContext 5.55KB 5.54KB -14B 🟢
TextArea 68.02KB 68.04KB +21B 🔺
TextField 71.43KB 71.37KB -65B 🟢
TextWithHighlight 65.88KB 65.89KB +10B 🔺
ThemeProvider 4.68KB 4.69KB +7B 🔺
Tipseen 73.19KB 73.17KB -16B 🟢
TipseenContent 73.72KB 73.59KB -124B 🟢
TipseenImage 73.53KB 73.48KB -47B 🟢
TipseenMedia 73.38KB 73.42KB +39B 🔺
TipseenWizard 76.07KB 75.94KB -134B 🟢
Toast 76.25KB 76.22KB -28B 🟢
ToastButton 19.06KB 19.04KB -22B 🟢
ToastLink 15.35KB 15.33KB -24B 🟢
Toggle 68.37KB 68.28KB -94B 🟢
TransitionView 37.67KB 37.66KB -14B 🟢
VirtualizedGrid 12.63KB 12.59KB -41B 🟢
VirtualizedList 12.37KB 12.39KB +18B 🔺
AttentionBox (Next) 76.49KB 76.42KB -71B 🟢
DatePicker (Next) 114.07KB 114.1KB +26B 🔺
Dropdown (Next) 97.07KB 97.07KB 0B ➖

📊 Summary:

  • Total Base Size: 5.68MB
  • Total PR Size: 5.68MB
  • Total Difference: 1.35KB

@rivka-ungar rivka-ungar merged commit f879780 into master Jan 28, 2026
18 of 19 checks passed
@rivka-ungar rivka-ungar deleted the menu-fix-error-on-submenu-hover-11108189967 branch January 28, 2026 06:59
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.

2 participants