-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
style: header dropdowns consistent shadow and border radius #4915
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe FlyoutMenu component was simplified and restyled: redundant nested wrappers were removed and the main container now includes Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4915--asyncapi-website.netlify.app/ |
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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @components/navigation/FlyoutMenu.tsx:
- Line 20: The JSX in FlyoutMenu.tsx uses double quotes for the className
attribute on the div (the element with "relative z-20 grid gap-6 px-5 py-6
sm:gap-8 sm:p-8 lg:grid-cols-2"); update the attribute to use single quotes to
match project linting rules (e.g., change className="..." to className='...')
and ensure any other JSX attributes in the FlyoutMenu component follow the same
single-quote style.
- Around line 17-18: The className attribute on the FlyoutMenu JSX element is
too long and uses double quotes; split the className string across multiple
concatenated/interpolated segments or use template literals to keep each line
under 120 chars and change all JSX attribute quotes to single quotes to match
project style; update the JSX element that contains className='absolute z-50
...' (data-testid='Flyout-main') so the className value is wrapped in single
quotes and reformatted across lines (or refactored into a const/classNames
helper) to satisfy the 120-char lint rule and maintain the same classes and
order.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/navigation/FlyoutMenu.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-29T14:21:28.216Z
Learnt from: sammy200-ui
Repo: asyncapi/website PR: 4804
File: components/navigation/Filter.tsx:32-41
Timestamp: 2025-12-29T14:21:28.216Z
Learning: In the asyncapi/website repository, when you intentionally omit dependencies in React hooks (e.g., useEffect, useMemo), add an eslint-disable comment with an explanatory note above the line to justify the design choice. For example: // eslint-disable-next-line react-hooks/exhaustive-deps: intentionally omitting dependencies to avoid unnecessary re-runs. This helps reviewers understand the rationale and keeps lint guidance informative.
Applied to files:
components/navigation/FlyoutMenu.tsx
🧬 Code graph analysis (1)
components/navigation/FlyoutMenu.tsx (1)
components/navigation/MenuBlocks.tsx (1)
MenuBlocks(28-72)
🪛 GitHub Actions: PR testing - if Node project
components/navigation/FlyoutMenu.tsx
[error] 17-17: max-len: This line has a length of 196. Maximum allowed is 120.
[error] 17-17: prettier/prettier: Replace line with a shorter version. Unexpected usage of doublequote.
[error] 17-17: jsx-quotes: Unexpected usage of doublequote.
[error] 18-18: prettier/prettier: Replace '"Flyout-main"' with 'Flyout-main'.
[error] 18-18: jsx-quotes: Unexpected usage of doublequote.
[error] 20-20: prettier/prettier: Replace line with shorter version. Replace '"relative·z-20·grid·gap-6·px-5·py-6·sm:gap-8·sm:p-8·lg:grid-cols-2"' with 'relative·z-20·grid·gap-6·px-5·py-6·sm:gap-8·sm:p-8·lg:grid-cols-2'.
[error] 20-20: prettier/prettier: Unexpected usage of doublequote.
components/navigation/FlyoutMenu.tsx
Outdated
| className="absolute z-50 bg-white rounded-lg -ml-4 md:max-h-[80vh] shadow-lg overflow-x-auto w-screen max-w-md pt-3 md:ml-12 md:-translate-x-1/2 lg:left-1/2 lg:max-w-3xl lg:-translate-x-1/2" | ||
| data-testid="Flyout-main" |
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.
Fix linting errors: line length and JSX quote style.
The pipeline is failing due to linting violations:
- Line 17 exceeds the 120-character limit (196 chars)
- JSX attributes use double quotes instead of single quotes (project standard)
The styling changes correctly implement the PR objectives (consistent shadow and border radius), but the code must comply with linting rules.
🔧 Proposed fix
- className="absolute z-50 bg-white rounded-lg -ml-4 md:max-h-[80vh] shadow-lg overflow-x-auto w-screen max-w-md pt-3 md:ml-12 md:-translate-x-1/2 lg:left-1/2 lg:max-w-3xl lg:-translate-x-1/2"
- data-testid="Flyout-main"
+ className='absolute z-50 -ml-4 w-screen max-w-md overflow-x-auto rounded-lg bg-white pt-3 shadow-lg md:ml-12 md:max-h-[80vh] md:-translate-x-1/2 lg:left-1/2 lg:max-w-3xl lg:-translate-x-1/2'
+ data-testid='Flyout-main'Note: The className has been reorganized for readability while staying under the line length limit, and all quotes have been changed to single quotes per project standards.
📝 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.
| className="absolute z-50 bg-white rounded-lg -ml-4 md:max-h-[80vh] shadow-lg overflow-x-auto w-screen max-w-md pt-3 md:ml-12 md:-translate-x-1/2 lg:left-1/2 lg:max-w-3xl lg:-translate-x-1/2" | |
| data-testid="Flyout-main" | |
| className='absolute z-50 -ml-4 w-screen max-w-md overflow-x-auto rounded-lg bg-white pt-3 shadow-lg md:ml-12 md:max-h-[80vh] md:-translate-x-1/2 lg:left-1/2 lg:max-w-3xl lg:-translate-x-1/2' | |
| data-testid='Flyout-main' |
🧰 Tools
🪛 GitHub Actions: PR testing - if Node project
[error] 17-17: max-len: This line has a length of 196. Maximum allowed is 120.
[error] 17-17: prettier/prettier: Replace line with a shorter version. Unexpected usage of doublequote.
[error] 17-17: jsx-quotes: Unexpected usage of doublequote.
[error] 18-18: prettier/prettier: Replace '"Flyout-main"' with 'Flyout-main'.
[error] 18-18: jsx-quotes: Unexpected usage of doublequote.
🤖 Prompt for AI Agents
In @components/navigation/FlyoutMenu.tsx around lines 17 - 18, The className
attribute on the FlyoutMenu JSX element is too long and uses double quotes;
split the className string across multiple concatenated/interpolated segments or
use template literals to keep each line under 120 chars and change all JSX
attribute quotes to single quotes to match project style; update the JSX element
that contains className='absolute z-50 ...' (data-testid='Flyout-main') so the
className value is wrapped in single quotes and reformatted across lines (or
refactored into a const/classNames helper) to satisfy the 120-char lint rule and
maintain the same classes and order.
e78ac2c to
4c4d107
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4915 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 796 796
Branches 146 146
=========================================
Hits 796 796 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Fixes visual issues in header dropdown menus (Docs, Tools, Community) where shadows and border radius were inconsistent or missing.
Related issue(s)
Fixes #4911
Changes
shadow-lgon all sidesrounded-lgborder radius on all cornersScreenshots after fix:

Result
Summary by CodeRabbit
Style
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.