Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { EuiButtonIcon, EuiToolTip, useEuiTheme } from '@elastic/eui';
import type { MenuItem } from '../../../types';
import { useTooltip } from '../../hooks/use_tooltip';
import { BetaBadge } from '../beta_badge';
import { TOOLTIP_OFFSET } from '../../constants';

export interface SideNavFooterItemProps extends Omit<EuiButtonIconProps, 'iconType'>, MenuItem {
hasContent?: boolean;
Expand Down Expand Up @@ -81,6 +82,7 @@ export const SideNavFooterItem = forwardRef<HTMLDivElement, SideNavFooterItemPro
onMouseOut={handleMouseOut}
position="right"
repositionOnScroll
offset={TOOLTIP_OFFSET}
>
{menuItem}
</EuiToolTip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { MenuItem } from '../../../types';
import { MenuItem as MenuItemComponent } from '../menu_item';
import { useTooltip } from '../../hooks/use_tooltip';
import { BetaBadge } from '../beta_badge';
import { TOOLTIP_OFFSET } from '../../constants';

export interface SideNavPrimaryMenuItemProps extends MenuItem {
as?: 'a' | 'button';
Expand Down Expand Up @@ -116,6 +117,7 @@ export const SideNavPrimaryMenuItem = forwardRef<HTMLAnchorElement, SideNavPrima
onMouseOut={handleMouseOut}
position="right"
repositionOnScroll
offset={TOOLTIP_OFFSET}
>
{menuItem}
</EuiToolTip>
Expand Down
2 changes: 1 addition & 1 deletion src/core/packages/chrome/navigation/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export const POPOVER_HOVER_DELAY = 100;
export const TOP_BAR_HEIGHT = 48;
export const TOP_BAR_POPOVER_GAP = 8;
export const BOTTOM_POPOVER_GAP = 17;
export const POPOVER_OFFSET = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

@paulinashakirova Why is POPOVER_OFFSET changed here to TOOLTIP_OFFSET?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They got merged locally at some point, but I’ve split them out now.
Nice catch — appreciate you calling it out 👍

export const TOOLTIP_OFFSET = 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

@ek-so what do you think about this value? Should we have 2 different ones for collapsed and expanded mode?

Copy link
Contributor

Choose a reason for hiding this comment

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

@weronikaolejniczak thanks for tagging! I took a look already, I think it's fine