-
Notifications
You must be signed in to change notification settings - Fork 176
feat(ui): Add disableHover prop to BaseGlobalNav for PublicGlobalNav #3707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): Add disableHover prop to BaseGlobalNav for PublicGlobalNav #3707
Conversation
…mation on PublicGlobalNav Co-Authored-By: hirotaka.miyagi@route06.co.jp <h.miyagi.cnw@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Note Free review on us!CodeRabbit is offering free reviews until Wed Oct 08 2025 to showcase some of the refinements we've made. Comment |
Updates to Preview Branch (devin/1759816514-disable-public-nav-hover-animation) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
Co-Authored-By: hirotaka.miyagi@route06.co.jp <h.miyagi.cnw@gmail.com>
…ector Co-Authored-By: hirotaka.miyagi@route06.co.jp <h.miyagi.cnw@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a disableHover
prop to BaseGlobalNav
to prevent hover animations on public pages where the navigation contains only a logo with no additional content to display.
- Added
enableHover
prop toBaseGlobalNav
with backward-compatible default oftrue
- Updated CSS hover selector to conditionally apply based on
data-disable-hover
attribute - Applied
enableHover={false}
toPublicGlobalNav
to disable hover animation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
BaseGlobalNav.tsx | Added enableHover prop and data attribute to control hover behavior |
BaseGlobalNav.module.css | Updated CSS selector to conditionally apply hover styles |
PublicGlobalNav.tsx | Disabled hover animation by setting enableHover={false} |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
} | ||
|
||
.globalNav:hover { | ||
:not([data-disable-hover]) > .globalNav:hover { |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS selector uses child combinator >
but should use descendant combinator (space) since .globalNav
is not a direct child of the element with data-disable-hover
. The correct selector should be :not([data-disable-hover]) .globalNav:hover
.
:not([data-disable-hover]) > .globalNav:hover { | |
:not([data-disable-hover]) .globalNav:hover { |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvement!
Issue
Why is this change needed?
The
PublicGlobalNav
currently expands on hover even though it only contains a logo with no additional content to show. This creates an awkward user experience where the sidebar expands to reveal empty space. The hover animation should be disabled for public pages while preserving it for internal pages where the navigation actually has content.Changes Made
disableHover
prop toBaseGlobalNav
- Optional boolean prop that defaults tofalse
for backward compatibility.globalNav:hover
to:not([data-disable-hover]) .globalNav:hover
to conditionally apply hover stylesdisableHover
toPublicGlobalNav
- PassesdisableHover={true}
to prevent hover animation on public pagesTesting
Screen.Recording.2025-10-07.at.15.44.21.mov
Review Focus Areas
:not([data-disable-hover]) .globalNav:hover
targets the right elementsGlobalNav
hover behavior is unchangeddata-disable-hover={disableHover || undefined}
works correctlyRequested by: @MH4GF
Link to Devin run: https://app.devin.ai/sessions/14347d39aa9741aca909efaed7d91694