-
-
Notifications
You must be signed in to change notification settings - Fork 637
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: inconsistent padding in the accordion in responsive conditions #3280
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe changes in this pull request involve modifying the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-3280--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: 0
🧹 Outside diff range and nitpick comments (1)
components/navigation/MenuBlocks.tsx (1)
Line range hint
31-69
: Consider semantic HTML and accessibility improvements.While the current changes address the padding issue, consider the following suggestions to enhance the component's semantic structure and accessibility:
- Use a more semantic HTML element for the menu container, such as
<nav>
or<ul>
, instead of a generic<div>
.- If using
<ul>
, wrap each menu item in an<li>
element.- Add appropriate ARIA attributes to improve screen reader navigation, such as
role="menu"
for the container androle="menuitem"
for each item.Example refactoring:
<nav className="py-2" role="menu"> <ul className="list-none p-0"> {items.map((item, index) => ( <li key={index} role="none"> <LinkComponent href={item.comingSoon ? '' : item.href} role="menuitem" // ... other props > {/* ... existing content */} </LinkComponent> </li> ))} </ul> </nav>These changes would improve the semantic structure and accessibility of the component without affecting its visual appearance or functionality.
Would you like me to create a separate issue to track these accessibility improvements?
🧰 Tools
🪛 Biome
[error] 33-33: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- components/navigation/MenuBlocks.tsx (2 hunks)
🧰 Additional context used
🔇 Additional comments (3)
components/navigation/MenuBlocks.tsx (3)
31-31
: LGTM! Verify padding consistency across screen sizes.The addition of the
py-2
class to the wrapper<div>
should help address the inconsistent padding issue in the accordion. This change adds vertical padding to the menu blocks container, which aligns with the PR objective.To ensure this change resolves the issue across all screen sizes, please verify the padding consistency on various devices and screen resolutions. Consider adding responsive design tests if not already in place.
69-69
: LGTM! Proper closure of the wrapper div.The closing
</div>
tag is correctly placed, ensuring that all menu items are enclosed within the wrapper. This maintains the structural integrity of the component.
Line range hint
1-71
: Overall assessment: Changes look good with minor suggestions for improvement.The modifications made to the
MenuBlocks
component effectively address the inconsistent padding issue in the accordion for responsive conditions. The addition of thepy-2
class to a wrapper<div>
is a minimal change that should resolve the problem without affecting the core functionality of the component.Key points:
- The changes align with the PR objectives.
- The core logic and rendering of menu items remain intact.
- Suggestions for improving accessibility and semantic HTML structure have been provided.
Next steps:
- Verify the padding consistency across various screen sizes and devices.
- Consider implementing the suggested accessibility improvements in a future update.
Overall, these changes are approved and should be ready for merging once the padding consistency is verified across different screen sizes.
🧰 Tools
🪛 Biome
[error] 33-33: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
instead of adding padding to menu block added margin-top to every menu block item
/update |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3280 +/- ##
=======================================
Coverage 49.14% 49.14%
=======================================
Files 21 21
Lines 647 647
=======================================
Hits 318 318
Misses 329 329 ☔ View full report in Codecov by Sentry. |
it fixes #3250
before
after
Summary by CodeRabbit
Style
MenuBlocks
component to use a<div>
element for better structure and styling.Documentation