-
-
Notifications
You must be signed in to change notification settings - Fork 770
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: make scroll to top button attractive with hover effects #3605
Conversation
WalkthroughThe pull request focuses on enhancing the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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
Documentation and Community
|
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.
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-3605--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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/buttons/ScrollButton.tsx
(1 hunks)
🧰 Additional context used
🪛 eslint
components/buttons/ScrollButton.tsx
[error] 31-31: Replace ·className='rounded-full·bg-white·shadow-md·hover:bg-[#8851FB]·hover:scale-110·transition-all·duration-300·ease-in-out'·onClick={scrollUp}
with ⏎··········className='rounded-full·bg-white·shadow-md·hover:bg-[#8851FB]·hover:scale-110·transition-all·duration-300·ease-in-out'⏎··········onClick={scrollUp}⏎········
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
components/buttons/ScrollButton.tsx
[error] 31-31: Formatting error: Incorrect formatting of className and onClick props. Props should be on separate lines
[warning] 31-31: Invalid Tailwind CSS classnames order
components/buttons/ScrollButton.tsx
Outdated
@@ -28,7 +28,7 @@ function ScrollButton() { | |||
return ( | |||
<div className='fixed bottom-14 right-4 z-40 h-16 w-12'> | |||
{backToTopButton && ( | |||
<button className='rounded-full bg-white shadow-md ' onClick={scrollUp}> | |||
<button className='rounded-full bg-white shadow-md hover:bg-[#8851FB] hover:scale-110 transition-all duration-300 ease-in-out' onClick={scrollUp}> |
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.
🛠️ Refactor suggestion
Resolve Pipeline Failures by Fixing Tailwind Class Order and Multi-line Formatting
Currently, the pipeline fails due to formatting errors and a Tailwind CSS class ordering warning. You can move the onClick
prop to a new line and reorder classes to address both issues.
Apply this diff to fix the pipeline failures:
- <button className='rounded-full bg-white shadow-md hover:bg-[#8851FB] hover:scale-110 transition-all duration-300 ease-in-out' onClick={scrollUp}>
+ <button
+ className="bg-white rounded-full shadow-md transition-all duration-300 ease-in-out hover:bg-[#8851FB] hover:scale-110"
+ onClick={scrollUp}
+ >
📝 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.
<button className='rounded-full bg-white shadow-md hover:bg-[#8851FB] hover:scale-110 transition-all duration-300 ease-in-out' onClick={scrollUp}> | |
<button | |
className="bg-white rounded-full shadow-md transition-all duration-300 ease-in-out hover:bg-[#8851FB] hover:scale-110" | |
onClick={scrollUp} | |
> |
🧰 Tools
🪛 eslint
[error] 31-31: Replace ·className='rounded-full·bg-white·shadow-md·hover:bg-[#8851FB]·hover:scale-110·transition-all·duration-300·ease-in-out'·onClick={scrollUp}
with ⏎··········className='rounded-full·bg-white·shadow-md·hover:bg-[#8851FB]·hover:scale-110·transition-all·duration-300·ease-in-out'⏎··········onClick={scrollUp}⏎········
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
[error] 31-31: Formatting error: Incorrect formatting of className and onClick props. Props should be on separate lines
[warning] 31-31: Invalid Tailwind CSS classnames order
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3605 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 20 20
Lines 732 732
=========================================
Hits 732 732 ☔ View full report in Codecov by Sentry. |
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.
Hi @zalabhavy , Thank you so much for the contribution! :)
CC @akshatnema Do we need this change ? I don't see any maintainers giving a go-ahead in the issue linked😅
@akshatnema @anshgoyalevil Please review this PR. Thank You ! |
@zalabhavy Do we really need this change? I don't think it would add any value in terms of UI/UX |
@anshgoyalevil Since the 'Scroll to Top' button is initially white and our website's buttons follow a purple theme, I think keeping it white at first is fine. However, when the user hovers over it, it should expand smoothly with a purple color transition to maintain consistency with the theme and enhance the user experience. |
If you don't prefer this change, you can close this PR. It's not an issue. I will find other issues and try to solve them 😊. |
Merging this PR, but please be mindful that all issues require a triage before proceeding with a PR. Read the contributing guidelines explaining the flow. |
/rtm |
@anshgoyalevil Okay , Thank You ! |
Fixed #3604
I have successfully solved this issue !
Here is image after my added tailwind css style
Summary by CodeRabbit
ScrollButton
hover effects with improved visual transitions and scalingCaseStudyCard
for better styling organization