fix: removed hover from all over the div
Fixes #4702 Hover removed from all over the div and just remained over the "AsyncAPI Discussions" button only. Applied tailwind property "cursor-auto" to the div.
Summary by CodeRabbit
-
Style
- Improved cursor behavior on the community header for enhanced user interaction and visual feedback.
βοΈ Tip: You can customize this high-level summary in your review settings.
Deploy Preview for asyncapi-website ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | a75b0630ed45bd7b8e0b5d76c7954efff0bf36b0 |
| Latest deploy log | https://app.netlify.com/projects/asyncapi-website/deploys/695281fa3d3aac0008b89cd8 |
| Deploy Preview | https://deploy-preview-4703--asyncapi-website.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Walkthrough
The change adds cursor-auto to the Header component's container className, reverting cursor behavior from inherited cursor-pointer to default. This ensures the pointer cursor appears only on the button element, not the entire header container.
Changes
| Cohort / File(s) | Change Summary |
|---|---|
Header cursor fix components/community/Header.tsx |
Add cursor-auto class to Header container to reset inherited cursor-pointer styling |
Estimated code review effort
π― 1 (Trivial) | β±οΈ ~2 minutes
Suggested labels
ready-to-merge
Suggested reviewers
- derberg
- akshatnema
- sambhavgupta0705
- anshgoyalevil
- Mayaleeeee
Poem
π° A cursor that wandered too far and wide, Now settles just where the button should hide, With
cursor-auto, the pointer's set free, Only dancing on clicksβas it should be! β¨
Pre-merge checks and finishing touches
β Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The PR title references removing hover from the div, which directly relates to the main change of adding cursor-auto to restrict cursor-pointer behavior to only the button. |
| Linked Issues check | β Passed | The PR successfully addresses issue #4702 by applying cursor-auto to the Header container to restrict pointer cursor appearance to only the button, not the entire div. |
| Out of Scope Changes check | β Passed | The change is narrowly scoped to adding cursor-auto className to the Header container, directly addressing the linked issue with no extraneous modifications. |
| Docstring Coverage | β Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
β¨ Finishing touches
- [ ] π Generate docstrings
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
π Recent review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π₯ Commits
Reviewing files that changed from the base of the PR and between 1e630864bfbf10ded139d1d377b596b04c9243dc and 6c913e477dc205a22bac3ef25fbbf9e7bb898c1d.
β Files ignored due to path filters (1)
-
package-lock.jsonis excluded by!**/package-lock.json
π Files selected for processing (1)
-
components/community/Header.tsx(1 hunks)
β° Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Redirect rules - asyncapi-website
- GitHub Check: Header rules - asyncapi-website
- GitHub Check: Pages changed - asyncapi-website
- GitHub Check: Lighthouse CI
π Additional comments (1)
components/community/Header.tsx (1)
21-21: LGTM! The fix correctly addresses the hover behavior issue.Adding
cursor-autoto the container effectively overrides any inheritedcursor-pointerfrom parent components, ensuring the pointer cursor only appears on the Button element itself (which should have its own cursor styling).To confirm the Button component has proper cursor styling, run:
#!/bin/bash # Description: Verify that the Button component has cursor-pointer styling # Search for cursor styling in the Button component rg -n -A5 -B5 'cursor-pointer' components/buttons/Button
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 @coderabbitai help to get the list of available commands and usage tips.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 100.00%. Comparing base (a94be3a) to head (a75b063).
:warning: Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #4703 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 798 798
Branches 146 146
=========================================
Hits 798 798
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
β‘οΈ Lighthouse report for the changes in this PR:
| Category | Score |
|---|---|
| π΄ Performance | 39 |
| π’ Accessibility | 98 |
| π’ Best practices | 92 |
| π’ SEO | 100 |
| π΄ PWA | 33 |
Lighthouse ran on https://deploy-preview-4703--asyncapi-website.netlify.app/
how does adding cursor-auto to the header fix the cursor style on the main content?
how does adding
cursor-autoto the header fix the cursor style on the main content?
The main content is wrapped within, that's why it is resolved by cursor-auto and of-course applying any other cursor property specifically to the main-content's div would also have solved the issue.
have u tested it for yourself? i don't think the changes u made work. header doesn't wrap any of the divs in discussion, and the cursor-pointer class is applied somewhere else. Did u try finding the source of the bug first?
have u tested it for yourself? i don't think the changes u made work.
headerdoesn't wrap any of thedivs in discussion, and thecursor-pointerclass is applied somewhere else. Did u try finding the source of the bug first?
Yaa i tried finding the source and i've tested i changes locally as well, and the bug is getting resolved by the cursor-auto property.
Actually i would've shared the screenshot but the cursor is hidden while taking it, so i can't give a proof of that, but i have tested the changes locally.
/rtm