Skip to content

Conversation

@namanjain24-sudo
Copy link
Contributor

@namanjain24-sudo namanjain24-sudo commented Sep 10, 2025

Description

  • Added the responsiveness to the navigation Button present on Generator Page , by fixing the margins/padding to ensure alignment on desktop and mobile.

Related issue(s)
#4381 : View on Github and View Docs buttons correctly aligned on Generator page .

Summary by CodeRabbit

  • New Features
    • Added a mobile-friendly Adopters Card View on small screens.
  • Refactor
    • Split Adopters into responsive desktop table and mobile cards with correct table semantics.
    • Removed the “Learn more” button from the Generator page.
  • Style
    • Improved resource link hover styling and adjusted table header borders.
    • Made Generator page buttons responsive: stack vertically on small screens; row layout on larger screens.
    • Standardized button widths/alignment for GitHub and View Docs buttons.

@netlify
Copy link

netlify bot commented Sep 10, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7652b65
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/68c444ffb4db0e00081a8cad
😎 Deploy Preview https://deploy-preview-4406--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 10, 2025

Walkthrough

Refactors the Adopters page into separate desktop table and mobile card views with responsive rendering and styling updates. Updates the Generator page’s button layout for responsive stacking/row behavior, removes the “Learn more” button, and adjusts button classNames. No public APIs changed.

Changes

Cohort / File(s) Summary
Adopters responsive refactor
pages/casestudies/index.tsx
Replaces single centered table with dual render paths: desktop table (thead/tbody, resource links as list, hover styles) and mobile cards (use case and resources). Applies responsive classes (md:block/md:hidden), styling tweaks, and data-testid attributes.
Generator buttons layout update
pages/tools/generator.tsx
Changes buttons wrapper to flex-col on small screens and row on md+; removes “Learn more” button; updates GitHub and View Docs button classNames from sm-based to md-based width/text alignment.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User/Viewport
  participant A as AdoptersPage
  participant T as Tailwind CSS

  U->>A: Load /casestudies
  A->>T: Apply responsive classes (md:block/md:hidden)
  alt Viewport ≥ md
    A->>U: Render Desktop Table (thead/tbody, list of resource links)
  else Viewport < md
    A->>U: Render Mobile Cards (company, use case, resources)
  end
Loading
sequenceDiagram
  autonumber
  participant U as User/Viewport
  participant G as GeneratorPage
  participant T as Tailwind CSS

  U->>G: Load /tools/generator
  G->>T: flex-col (small), md:flex-row, md:wrap
  G-->>U: Render GitHub + View Docs buttons (no "Learn more")
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

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

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the primary change—aligning the View on Github and View Docs buttons on the Generator page—and directly ties back to the referenced issue, making its intent clear to reviewers. It avoids extraneous details like file lists and instead focuses on the UI fix that matters most for this pull request. While it includes the issue number and a conventional “fix:” prefix, it remains specific and informative without being misleading or off-topic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Poem

I hop through breakpoints, light on my feet,
Tables for desktops, on mobile—so neat!
Buttons now stack, then row as they grow,
“Learn more” hops out—fewer clicks in the flow.
With whiskers twitching, I ship and I cheer—
Responsive carrots for every viewport, dear! 🥕✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ 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

Comment @coderabbitai help to get the list of available commands and usage tips.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Sep 10, 2025

⚡️ Lighthouse report for the changes in this PR:

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

Lighthouse ran on https://deploy-preview-4406--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 (5)
pages/tools/generator.tsx (1)

24-27: Minor width tweak (optional).

To guarantee content-tight widths once buttons go side‑by‑side, consider md:w-fit instead of md:w-auto.

Apply if desired:

-        className='w-full text-center md:w-auto md:text-left'
+        className='w-full text-center md:w-fit md:text-left'
...
-      <Button text='View Docs' href='/docs/tools/generator' className='w-full text-center md:w-auto md:text-left' />
+      <Button text='View Docs' href='/docs/tools/generator' className='w-full text-center md:w-fit md:text-left' />
pages/casestudies/index.tsx (4)

85-116: Desktop table view: solid improvement; add column scopes and unify borders.

For accessibility, add scope="col" on headers. Also align border thickness for consistency.

-                <th className='border p-2 font-bold'>Company name</th>
-                <th className='border-2 p-2 font-bold'>Use Case</th>
-                <th className='border-2 p-2 font-bold'>Resources</th>
+                <th scope='col' className='border-2 p-2 font-bold'>Company name</th>
+                <th scope='col' className='border-2 p-2 font-bold'>Use Case</th>
+                <th scope='col' className='border-2 p-2 font-bold'>Resources</th>

96-113: Prefer stable keys over array indexes (desktop rows).

Improves reconciliation and future reordering.

-                <tr key={index} data-testid='Adopters'>
+                <tr key={entry.companyName} data-testid='Adopters'>

101-109: Use stable keys for resource items.

Avoid resourceIndex; use a unique field.

-                      {entry.resources.map((resource: Resource, resourceIndex: number) => (
-                        <li key={resourceIndex}>
+                      {entry.resources.map((resource: Resource) => (
+                        <li key={resource.link || resource.title}>
-                  {entry.resources.map((resource: Resource, resourceIndex: number) => (
-                    <li key={resourceIndex}>
+                  {entry.resources.map((resource: Resource) => (
+                    <li key={resource.link || resource.title}>

Also applies to: 135-142


119-146: Stable keys for mobile cards.

Same reasoning as desktop list.

-              key={index}
+              key={entry.companyName}
📜 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 1991a70 and 6da310a.

📒 Files selected for processing (2)
  • pages/casestudies/index.tsx (1 hunks)
  • pages/tools/generator.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
pages/tools/generator.tsx (2)
components/buttons/GithubButton.tsx (1)
  • GithubButton (22-45)
components/buttons/Button.tsx (1)
  • Button (53-106)
⏰ 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). (1)
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (2)
pages/tools/generator.tsx (1)

21-28: Responsive button group: LGTM.

The new flex container and md+/lg+ justify rules achieve the intended stacking/row alignment across breakpoints. Button classNames are consistent.

pages/casestudies/index.tsx (1)

117-146: Mobile card view: LGTM.

Clear labels and spacing; responsive split is straightforward and readable.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ea0a681) to head (7652b65).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4406   +/-   ##
=========================================
  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.

@sambhavgupta0705
Copy link
Member

@namanjain24-sudo can you please share the difference between them

@namanjain24-sudo
Copy link
Contributor Author

@namanjain24-sudo can you please share the difference between them

Thank You @sambhavgupta0705 for your review but this issue is already closed and have been fixed . Sorry for the inconvenience caused .

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.

3 participants