Skip to content

Conversation

@Priyank0703
Copy link

@Priyank0703 Priyank0703 commented Sep 5, 2025

fix: #4381
Description

  • made the buttons responsive
  • here is the screenshot for that
image

fix: #4381

Related issue(s)

Summary by CodeRabbit

  • Style
    • Improved button layout responsiveness on the generator page. Buttons now align left on small screens and larger, use a flexible row layout, and are centered within their container for more consistent presentation across viewports. No functional changes to button behavior.

@netlify
Copy link

netlify bot commented Sep 5, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5624550
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/68bafcd5b1b07d0008239671
😎 Deploy Preview https://deploy-preview-4391--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 project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 5, 2025

Walkthrough

Adjusted the button container in pages/tools/generator.tsx by adding responsive Tailwind classes to change alignment and layout on small screens and up. No logic or exports changed.

Changes

Cohort / File(s) Change Summary
Generator page layout tweaks
pages/tools/generator.tsx
Updated renderButtons wrapper classes from mt-16 text-center to mt-16 text-center sm:text-left sm:flex sm:justify-center to provide responsive alignment and layout. No functional or export changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Consistent alignment of buttons across devices [#4381]
Uniform margins across screen sizes [#4381] No explicit margin changes; only alignment/flex classes added.
Add responsive spacing (margins/paddings) [#4381] No margin/padding utilities introduced beyond existing mt-16.

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • derberg
  • akshatnema
  • sambhavgupta0705
  • anshgoyalevil
  • Mayaleeeee
  • asyncapi-bot-eve

Poem

I nudged the buttons, left then right,
A flexy hop in morning light.
On smallish screens I center, glide—
On larger plains I shift with pride.
Align, my friends, in tidy rows—
A rabbit tweaks, and balance grows. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e32d416) to head (5624550).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4391   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          778       778           
  Branches       144       144           
=========================================
  Hits           778       778           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asyncapi-bot
Copy link
Contributor

⚡️ Lighthouse report for the changes in this PR:

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

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

Copy link
Contributor

@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)
pages/tools/generator.tsx (1)

148-148: Simplify wrapper; move alignment into renderButtons; avoid redundant utilities.

sm:flex with a single child plus sm:text-left (no-op for a flex child) is unnecessary. Center/left behavior is clearer if handled by the inner container; also prevents compounded margins.

Suggested refactor (keeps behavior while reducing complexity and avoiding double top margins at the bottom):

-    <div className='mt-16 text-center sm:text-left sm:flex sm:justify-center'>{renderButtons()}</div>
+    <div className='mt-16'>{renderButtons()}</div>

And adjust renderButtons and its first call site:

-    <div className='mt-8 flex flex-wrap gap-4'>
+    <div className='flex flex-wrap gap-4 justify-center sm:justify-start'>
-              {renderButtons()}
+              <div className='mt-8'>{renderButtons()}</div>
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e32d416 and 5624550.

📒 Files selected for processing (1)
  • pages/tools/generator.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). (2)
  • GitHub Check: Lighthouse CI
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (2)
pages/tools/generator.tsx (2)

148-148: LGTM — bottom CTA wrapper is now responsive.

The added responsive classes improve layout on small screens and up without affecting logic.


148-148: Confirm intended alignment ≥640px; tweak if needed.

With sm:flex sm:justify-center, the button group is centered as a block on ≥640px. If you instead want it left-aligned (to match nearby text), switch to start-justification:

-    <div className='mt-16 text-center sm:text-left sm:flex sm:justify-center'>{renderButtons()}</div>
+    <div className='mt-16 sm:flex sm:justify-start'>{renderButtons()}</div>

@Priyank0703 Priyank0703 closed this by deleting the head repository Sep 6, 2025
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.

Fix: View on Github and View Docs buttons inconsistency in Generator page

2 participants