Skip to content
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

fix: background color visibility on dropdown hover #3330 #3340

Closed
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
2 changes: 1 addition & 1 deletion components/navigation/MenuBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function MenuBlocks({ items = [] }: MenuBlocksProps) {
<span
data-testid='MenuBlocks-Link'
className={`-m-3 flex items-start space-x-4 rounded-lg p-3 transition duration-150 ease-in-out ${
router.asPath === item.href ? 'bg-secondary-100 shadow-sm' : 'hover:bg-gray-50'
router.asPath === item.href ? 'bg-secondary-100 shadow-sm' : 'hover:bg-gray-300'
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider active/hover state distinction.

The current implementation uses bg-secondary-100 for active (selected) items and hover:bg-gray-300 for hover. These states should be visually distinct but related.

Consider using a consistent color family:

-                router.asPath === item.href ? 'bg-secondary-100 shadow-sm' : 'hover:bg-gray-300'
+                router.asPath === item.href ? 'bg-secondary-100 shadow-sm' : 'hover:bg-secondary-50'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
router.asPath === item.href ? 'bg-secondary-100 shadow-sm' : 'hover:bg-gray-300'
router.asPath === item.href ? 'bg-secondary-100 shadow-sm' : 'hover:bg-secondary-50'

}`}
>
<div
Expand Down
Loading