Skip to content
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: navbar button size #3529

Closed
wants to merge 1 commit into from
Closed

Conversation

AayushhGoyal
Copy link

@AayushhGoyal AayushhGoyal commented Dec 30, 2024

Description

  • Increased the width of the button
  • Added flex properties to make the text aligned at center centered

Related issue(s)
Fixes: #3528

ScreenShot
image

Summary by CodeRabbit

  • Style
    • Updated GitHub button styling in navigation bar to improve responsiveness
    • Added responsive visibility and layout adjustments for different screen sizes

Copy link

@github-actions github-actions bot left a 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.

Copy link

coderabbitai bot commented Dec 30, 2024

Walkthrough

The pull request modifies the NavBar component's GithubButton className in components/navigation/NavBar.tsx. The change introduces a more sophisticated, responsive design for the GitHub button by adding responsive visibility, item centering, and screen-size-specific width and text sizing. The update aims to improve the button's layout and appearance across different screen sizes.

Changes

File Change Summary
components/navigation/NavBar.tsx Updated GithubButton className from 'ml-2 py-2' to 'ml-2 hidden items-center justify-center py-2 lg:flex lg:w-28 lg:text-xs xl:w-40 xl:text-sm'

Assessment against linked issues

Objective Addressed Explanation
Reduce button height and increase width [#3528]
Improve GitHub button appearance on navbar

Poem

🐰 A rabbit's tale of buttons bright,
Responsive design takes flight!
From hidden depths to screens so wide,
The GitHub star now takes its stride.
Code magic sprinkled with delight! 🌟


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Dec 30, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 04bff97
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/6775c09185440e0008953b01
😎 Deploy Preview https://deploy-preview-3529--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fb0a3bf) to head (04bff97).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3529   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          668       668           
=========================================
  Hits           668       668           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Dec 30, 2024

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 33
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-3529--asyncapi-website.netlify.app/

@AayushhGoyal AayushhGoyal changed the title fix:navbar button size fix: Navbar button size Dec 31, 2024
@AayushhGoyal AayushhGoyal changed the title fix: Navbar button size fix: navbar button size Dec 31, 2024
@AayushhGoyal
Copy link
Author

@sambhavgupta0705 can you please check it

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
components/CaseStudyCard.tsx (1)

26-26: Hover scaling effect could benefit from reduced transition duration to improve subtlety.
Hover scaling is a nice interactive touch, but consider a shorter transition duration (e.g., duration-150) to reduce any perceived jumpiness.

- className=" flex h-[315px] max-w-sm flex-col items-center justify-center overflow-hidden rounded-md border border-gray-400 bg-white p-4 shadow-xl duration-200 hover:scale-105"
+ className=" flex h-[315px] max-w-sm flex-col items-center justify-center overflow-hidden rounded-md border border-gray-400 bg-white p-4 shadow-xl duration-150 hover:scale-105"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2eb1229 and 68fde41.

📒 Files selected for processing (1)
  • components/CaseStudyCard.tsx (1 hunks)
🔇 Additional comments (2)
components/CaseStudyCard.tsx (2)

22-22: Great use of Tailwind utilities to handle layout and spacing.
This makes the container more responsive and easier to maintain.


32-32: Confirm browser support for the text-balance utility.
If text-balance relies on a newer Tailwind or a custom utility with limited browser support, ensure it degrades gracefully. Otherwise, it’s a neat addition for readability.

✅ Verification successful

The previous search showed that text-balance is only used once in the codebase. Let's check the Tailwind configuration and version to understand if this is a built-in utility or custom configuration, which will help determine browser support.


The text-balance utility is safe to use with good browser support

The codebase is using Tailwind CSS v3.4.3, which includes the text-balance utility as part of its core features. This utility is based on the CSS text-wrap: balance property, which has good browser support in modern browsers (Chrome 114+, Firefox 119+, Safari 16.5+). For older browsers, it gracefully degrades to normal text wrapping without any layout issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Searching if 'text-balance' is documented or used across the codebase.
rg --hidden --no-heading 'text-balance'

Length of output: 156


Script:

#!/bin/bash
# Check tailwind config for text-balance utility
fd -e js -e ts -e json "tailwind.config" -x cat {}

# Check package.json for tailwind version
cat package.json | jq '.dependencies["tailwindcss"], .devDependencies["tailwindcss"]'

Length of output: 5901

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
components/navigation/NavBar.tsx (1)

242-242: Ensure the button styling is consistent with brand-wide design guidelines.

The use of Tailwind classes for responsive sizing here is good. For a more scalable solution, consider centralizing commonly used widths and text sizes in a shared config or pattern. This can help keep styles consistent across the site if you create additional buttons or revise the design in the future.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83c06e6 and 04bff97.

📒 Files selected for processing (1)
  • components/navigation/NavBar.tsx (1 hunks)

@anshgoyalevil
Copy link
Member

@AayushhGoyal Kindly go through the contributing guidelines at https://github.com/asyncapi/website/blob/master/CONTRIBUTING.md

Ideally, we want contributors to create an issue and wait for a triage before creating PR. That would in fact save time for you as a contributor in case we don't want an issue to be fixed/prioritized as of now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Size of star on github button present on the navbar
3 participants