-
-
Notifications
You must be signed in to change notification settings - Fork 903
fix(style): scroll to top button design #3708
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
Conversation
Fixes #3614 Update the scroll to top button to use Next.js `<Image>` component and improve design. * Replace `<img>` tag with Next.js `<Image>` component in `components/buttons/ScrollButton.tsx` * Adjust the styling of the button to make it more elegant and clean * Fix the spacing and distance from the sides * Make the parent div flex to fix the layout spacing issue
WalkthroughThis pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant SB as ScrollButton
participant NI as Next/Image
U->>SB: Trigger scroll event (visibility check)
SB->>NI: Render scroll icon using optimized image
U->>SB: Click button to scroll top
SB->>U: Scroll page to top
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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
|
❌ Deploy Preview for asyncapi-website failed.Built without sensitive environment variables
|
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
(2 hunks)
🧰 Additional context used
🪛 ESLint
components/buttons/ScrollButton.tsx
[error] 1-2: Run autofix to sort these imports!
(simple-import-sort/imports)
🪛 GitHub Actions: PR testing - if Node project
components/buttons/ScrollButton.tsx
[error] 1-1: Run autofix to sort these imports! simple-import-sort/imports
⏰ Context from checks skipped due to timeout of 180000ms (1)
- GitHub Check: Lighthouse CI
🔇 Additional comments (2)
components/buttons/ScrollButton.tsx (2)
36-36
: Great use of Next.js Image component!The implementation follows Next.js best practices by:
- Using the optimized Image component
- Setting explicit width and height
- Providing descriptive alt text
30-30
: Excellent UI/UX improvements!The styling changes enhance the button's design through:
- Proper flexbox layout for centering
- Smooth transitions and hover effects
- Consistent spacing with
p-2
padding- Improved positioning with
bottom-4
Also applies to: 33-33
@Recxsmacx the build is failing |
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.
@Recxsmacx The website build seems to be failing so something needs to be addressed :)
closing this as we can take this up with website redesigning |
Fixes #3614
Update the scroll to top button to use Next.js
<Image>
component and improve design.<img>
tag with Next.js<Image>
component incomponents/buttons/ScrollButton.tsx