Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/HoverPopup/HoverPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export const HoverPopup = ({
// bigger offset for easier switching to neighbour nodes
// matches the default offset for popup with arrow out of a sense of beauty
offset={offset || {mainAxis: 12, crossAxis: 0}}
className={YDB_POPOVER_CLASS_NAME}
>
<div
className={contentClassName}
Expand All @@ -117,7 +116,7 @@ export const HoverPopup = ({
onMouseLeave={onPopupMouseLeave}
onBlur={onPopupBlur}
>
{renderPopupContent()}
<div className={YDB_POPOVER_CLASS_NAME}>{renderPopupContent()}</div>
</div>
</Popup>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion src/components/VDisk/VDisk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const VDisk = ({
onShowPopup={onShowPopup}
onHidePopup={onHidePopup}
renderPopupContent={() => <VDiskPopup data={data} />}
offset={{mainAxis: 5, crossAxis: 0}}
offset={{mainAxis: 2, crossAxis: 0}}
Copy link
Member

Choose a reason for hiding this comment

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

Please, explain, how your changes make everything better? I see no difference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main difference is that YDB_POPOVER_CLASS_NAME is now applied not to the popup itself, but to its content. Previously, when paddings were set at the popup level, the popup would close when the mouse hovered over these paddings. Now, paddings are part of the content, so the popup no longer closes prematurely.
I also made some minor adjustments to the offsets, but that's not the main improvement.

delayClose={delayClose}
delayOpen={delayOpen}
>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Storage/PDisk/PDisk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const PDisk = ({
{renderVDisks()}
<HoverPopup
showPopup={showPopup}
offset={{mainAxis: 5, crossAxis: 0}}
offset={{mainAxis: 2, crossAxis: 0}}
anchorRef={anchorRef}
onShowPopup={onShowPopup}
onHidePopup={onHidePopup}
Expand Down
Loading