You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf1df63
Browse filesBrowse the repository at this point in the historyBrowse files
ref(navigation): Stop gating hover previews on universal-inbox (#132205)
#130946 turned off the nav hover behavior for orgs with
`organizations:universal-inbox`. After negative feedback on that change,
we're separating the nav changes from the Inbox flag. This PR removes
them from the flag, which is effectively reverts the hover change.
We also introduce a slightly different behavior from the inbox, in the
spirit of the previous interaction.
<details>
<summary>Full context (actually pretty helpful)</summary>
The new hover behavior is piloted separately behind
`organizations:nav-peek` (added in #132197, piloted in
#132206). Nothing here checks the new flag.
#131856 and #130219 are both still open,
so the only hover changes that shipped behind `universal-inbox` came
from #130946.
**What goes back to the old behavior for orgs with `universal-inbox`**
- Hovering a primary nav item previews its group in the secondary
sidebar again. That includes the mouse-intent delay
(`useMouseMovement`).
- The secondary sidebar's slide/fade animation runs again when the group
switches.
- `useNavigationGroupHoverEnabled` is removed. The nav now reads
`universal-inbox` only to decide whether to show the Inbox item.
**What stays behind `universal-inbox`**
- The Inbox primary nav item, its unread count, and the `/inbox/` page.
- Inbox has no secondary sidebar. While the sidebar is expanded,
hovering the Inbox item does nothing, so the sidebar isn't pulled out
from under the page. Clicking it navigates.
**Pages without a secondary sidebar use the collapsed behavior**
The Inbox page has no secondary sidebar, so an inline preview would push
the page aside. Instead, on any route group configured with
`secondaryNavigation: false`, the secondary nav is always collapsed. In
practice that's `/inbox/` today. Hovering a primary item there opens its
group in the existing collapsed-mode peek overlay, and moving away
closes it. `SecondaryNavigationContextProvider` takes a `forceCollapsed`
prop for this, set from the route group in
`PrimaryNavigationContextProvider`:
- The Expand/Collapse toggle is hidden there, since the page decides the
state.
- Peeks there are tracked apart from the user's saved collapsed
preference, so it is neither read nor overwritten. Leaving the Inbox
restores whatever the user had before.
- The overlay works as soon as `/inbox/` is active, including right
after opening the Inbox from the rail. `useCollapsedNavigation` used to
attach its hover listeners only once the sidebar collapsed, so a pointer
already inside the nav never sent a `mouseenter`. It now tracks the
pointer while expanded too, and starts the peek when a page forces the
collapse with the pointer already over the nav. It doesn't do this when
the user collapses the sidebar themselves, so the toggle still doesn't
reopen it under the pointer.
- Hovering an item without a secondary nav (Inbox) while the overlay is
open hides the overlay. Moving on to another item shows that item's
overlay again. This applies whenever the sidebar is collapsed, whether
the page forced it or the user collapsed it.
<!-- junior-request-attribution:start -->
via @natemoo-re.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A226fcac104760f6113ca947c -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3A226fcac104760f6113ca947c)
[[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A226fcac104760f6113ca947c/?project=4510944073809921)
<!-- junior-session-footer:end -->
</details>
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: nate <7118177+natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
0 commit comments