Skip to content

fix(nav): remove hover popover open delay to prevent flickering - #2133

Merged
ernestt merged 1 commit into
mainfrom
navi/fix/remove-popover-open-delay
May 11, 2026
Merged

fix(nav): remove hover popover open delay to prevent flickering#2133
ernestt merged 1 commit into
mainfrom
navi/fix/remove-popover-open-delay

Conversation

@ernestt

@ernestt ernestt commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the 150ms show delay on nav heading hover menus (XDSSideNavHeading and XDSTopNavHeading) to prevent flickering.

Problem

The heading popover menus had a 150ms delay before opening on hover (inherited from the shared useXDSMenuHover hook default). Unlike nav items/menus which appear in groups where debouncing prevents accidental triggers, the heading is always a single target — the delay just caused visible flicker with no upside.

Changes

  • XDSSideNavHeading — passes showDelay: 0 to useXDSMenuHover
  • XDSTopNavHeading — passes showDelay: 0 to useXDSMenuHover
  • useXDSMenuHover — when showDelay is 0, calls show() synchronously instead of wrapping in an unnecessary setTimeout(..., 0)

Not changed

XDSTopNavMenu, XDSTopNavMegaMenu, and XDSSideNavItem keep their 150ms delay since they appear in groups where debouncing across multiple targets is useful.

@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

@ernestt must be a member of the Meta Open Source team on Vercel to deploy.
- Click here to add @ernestt to the team.
- If you initiated this build, request access.

Learn more about collaboration on Vercel and other options here.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 11, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems okay. It should only affects the hover open pathway but might be annoying if the user is scanning. I guess we can try it and see.

XDSSideNavHeading and XDSTopNavHeading are single-item triggers where
the 150ms show delay was causing visible flickering without serving its
debounce purpose (there's only one heading, not a row of items).

Pass showDelay: 0 to useXDSMenuHover in both heading components so the
popover opens immediately on hover. The hook is also updated to skip
the unnecessary setTimeout when showDelay is 0.

Other nav items (XDSTopNavMenu, XDSTopNavMegaMenu, XDSSideNavItem) keep
their 150ms delay since they appear in groups where debouncing is useful.
@ernestt
ernestt force-pushed the navi/fix/remove-popover-open-delay branch from 9981696 to bcc78a2 Compare May 11, 2026 21:59
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
xds-sandbox Error Error May 11, 2026 10:00pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 18.3KB 28.3KB 4.2KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@ernestt
ernestt merged commit 7716860 into main May 11, 2026
19 of 20 checks passed
@github-actions
github-actions Bot deleted the navi/fix/remove-popover-open-delay branch May 12, 2026 07:08
cixzhang pushed a commit that referenced this pull request Jun 21, 2026
XDSSideNavHeading and XDSTopNavHeading are single-item triggers where
the 150ms show delay was causing visible flickering without serving its
debounce purpose (there's only one heading, not a row of items).

Pass showDelay: 0 to useXDSMenuHover in both heading components so the
popover opens immediately on hover. The hook is also updated to skip
the unnecessary setTimeout when showDelay is 0.

Other nav items (XDSTopNavMenu, XDSTopNavMegaMenu, XDSSideNavItem) keep
their 150ms delay since they appear in groups where debouncing is useful.
cixzhang pushed a commit that referenced this pull request Jun 21, 2026
XDSSideNavHeading and XDSTopNavHeading are single-item triggers where
the 150ms show delay was causing visible flickering without serving its
debounce purpose (there's only one heading, not a row of items).

Pass showDelay: 0 to useXDSMenuHover in both heading components so the
popover opens immediately on hover. The hook is also updated to skip
the unnecessary setTimeout when showDelay is 0.

Other nav items (XDSTopNavMenu, XDSTopNavMegaMenu, XDSSideNavItem) keep
their 150ms delay since they appear in groups where debouncing is useful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants