Skip to content

Conversation

@namanjain24-sudo
Copy link
Contributor

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

Description

  1. Responsive Layout Strategy:
  • Desktop: Traditional table view.
  • Mobile: Card-based layout.

2.Mobile Card Structure:

  • Each adopter entry becomes an individual card
  • Clear visual hierarchy with company name as heading
  • Properly labeled sections for Use Case and Resources
  • Touch-friendly link targets

Related issue(s)
#4065 : Case Studies page table is not mobile responsive

Summary by CodeRabbit

  • New Features

    • Introduced a responsive case studies layout: desktop table view and mobile-friendly card view.
    • Resources are displayed as linked lists for easier access.
  • Refactor

    • Replaced single table with separate desktop and mobile render paths for better responsiveness.
    • Reworked buttons layout to be responsive (vertical on small, row on md+); removed the previous "Learn more" button.
  • Style

    • Updated spacing, typography, and enhanced link hover states.

@netlify
Copy link

netlify bot commented Sep 9, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2e228ba
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/68c3f301e1f56600084ade8c
😎 Deploy Preview https://deploy-preview-4403--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 9, 2025

Walkthrough

Reworked two pages: pages/casestudies/index.tsx now renders separate desktop table and mobile card views driven by AdoptersList; pages/tools/generator.tsx adjusts the button layout to be responsive (vertical stack → row on md+), removing an old Learn more button and updating alignment classes.

Changes

Cohort / File(s) Summary
Case studies responsive refactor
pages/casestudies/index.tsx
Replaced single centered table with two responsive render paths: Desktop Table (thead/tbody, rows from AdoptersList, resources as UL with links, hover styles) and Mobile Card View (cards per adopter). Standardized data-testid attributes and updated container/table classes for responsiveness.
Generator buttons responsive layout
pages/tools/generator.tsx
Reworked renderButtons layout from horizontal wrap to a responsive stack that becomes a row on md+; removed commented/legacy "Learn more" button; updated width/text alignment classes and parent flex/justify breakpoints.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • derberg
  • akshatnema
  • sambhavgupta0705
  • anshgoyalevil
  • Mayaleeeee
  • devilkiller-ag

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—making the Case Studies page table section mobile responsive—and properly references the associated issue. It is a clear, single sentence without extraneous details and aligns with conventional commit style. A teammate scanning the history will immediately understand the focus of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Poem

I hopped through code, both wide and small,
Split rows and cards to answer the call.
Buttons that stack then stretch in a line,
Links that sparkle, layouts align.
A rabbit’s small thump: “Merge it—looks fine!” 🐇✨

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.

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.

@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

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

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

asyncapi-bot commented Sep 9, 2025

⚡️ Lighthouse report for the changes in this PR:

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

Lighthouse ran on https://deploy-preview-4403--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/casestudies/index.tsx (5)

87-95: Add caption + scope for table a11y.

Improve screen reader semantics with a caption and scope="col" on headers.

Apply:

-          <table className='my-8 w-full border-collapse border table-auto'>
+          <table className='my-8 w-full border-collapse border table-auto' aria-label='Adopters'>
+            <caption className='sr-only'>Adopters: company, use case, and resources</caption>
             <thead>
               <tr>
-                <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-110: Use stable keys, standardize link component, and handle empty resources.

Avoid index keys, reuse TextLink, and render a fallback when resources are empty.

Apply:

-              {AdoptersList.map((entry: Adopter, index: number) => (
-                <tr key={index} data-testid='Adopters'>
+              {AdoptersList.map((entry: Adopter) => (
+                <tr key={entry.companyName} data-testid='Adopters'>
                   <td className='border-2 p-2'>{entry.companyName}</td>
                   <td className='border-2 p-2'>{entry.useCase}</td>
                   <td className='border-2 p-2'>
-                    <ul className='space-y-1'>
-                      {entry.resources.map((resource: Resource, resourceIndex: number) => (
-                        <li key={resourceIndex}>
-                          <a className='text-cyan-500 underline hover:text-cyan-600' href={resource.link}>
-                            {resource.title}
-                          </a>
-                        </li>
-                      ))}
-                    </ul>
+                    {entry.resources?.length ? (
+                      <ul className='space-y-1'>
+                        {entry.resources.map((resource: Resource) => (
+                          <li key={resource.link}>
+                            <TextLink
+                              href={resource.link}
+                              target='_blank'
+                              rel='noopener noreferrer'
+                              className='text-cyan-500 underline hover:text-cyan-600'
+                            >
+                              {resource.title}
+                            </TextLink>
+                          </li>
+                        ))}
+                      </ul>
+                    ) : (
+                      <span className='text-gray-500'>—</span>
+                    )}
                   </td>
                 </tr>
               ))}

90-92: Minor consistency nits: border thickness and capitalization.

  • Use the same border class across all headers/cells.
  • Capitalize “Company Name” to match other headers.

Example:

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

Also applies to: 98-100


121-140: Stable keys, dark mode, and touch-friendly links on mobile.

  • Prefer stable keys.
  • Add dark-mode styles to avoid bright cards in dark theme.
  • Make links block-level with padding for better tap targets; reuse TextLink with target+rel.

Apply:

-            <div
-              key={index}
-              className='border border-gray-300 rounded-lg p-4 bg-white shadow-sm'
+            <div
+              key={entry.companyName}
+              className='border border-gray-300 dark:border-gray-700 rounded-lg p-4 bg-white dark:bg-slate-900 shadow-sm'
               data-testid='Adopters'
             >
@@
-                <h3 className='font-bold text-lg text-gray-900'>{entry.companyName}</h3>
+                <h3 className='font-bold text-lg text-gray-900 dark:text-gray-100'>{entry.companyName}</h3>
@@
-                <h4 className='font-semibold text-sm text-gray-700 mb-1'>Use Case:</h4>
-                <p className='text-gray-600 text-sm'>{entry.useCase}</p>
+                <h4 className='font-semibold text-sm text-gray-700 dark:text-gray-300 mb-1'>Use Case:</h4>
+                <p className='text-gray-600 dark:text-gray-300 text-sm'>{entry.useCase}</p>
@@
-                <h4 className='font-semibold text-sm text-gray-700 mb-2'>Resources:</h4>
+                <h4 className='font-semibold text-sm text-gray-700 dark:text-gray-300 mb-2'>Resources:</h4>
                 <ul className='space-y-1'>
-                  {entry.resources.map((resource: Resource, resourceIndex: number) => (
-                    <li key={resourceIndex}>
-                      <a className='text-cyan-500 underline hover:text-cyan-600 text-sm' href={resource.link}>
-                        {resource.title}
-                      </a>
-                    </li>
-                  ))}
+                  {entry.resources?.length ? (
+                    entry.resources.map((resource: Resource) => (
+                      <li key={resource.link}>
+                        <TextLink
+                          href={resource.link}
+                          target='_blank'
+                          rel='noopener noreferrer'
+                          className='text-cyan-500 underline hover:text-cyan-600 text-sm block py-1.5'
+                        >
+                          {resource.title}
+                        </TextLink>
+                      </li>
+                    ))
+                  ) : (
+                    <li className='text-gray-500 text-sm'>—</li>
+                  )}

96-110: DRY: consider extracting AdopterTableRow and AdopterCard components.

Reduces duplication between desktop and mobile render paths and keeps keys/link handling in one place.

Also applies to: 119-146

📜 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 314fcb6.

📒 Files selected for processing (1)
  • pages/casestudies/index.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). (3)
  • GitHub Check: Test NodeJS PR - macos-13
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Lighthouse CI
🔇 Additional comments (4)
pages/casestudies/index.tsx (4)

85-116: Clean responsive split (desktop table + mobile cards).

Layout gating with md:hidden/md:block is clear and keeps markup simple. Nice work.


117-146: Mobile cards: good structure and spacing.

Card breakdown reads well and aligns with the PR goal.


97-97: Duplicate data-testid across views may confuse tests.

Both views use data-testid="Adopters". Ensure tests query by visible container or refine testids per view (e.g., AdoptersRow vs AdoptersCard).

Also applies to: 124-124


74-76: Verify contributors link matches source format.

The page links to config/adopters.yml while this file imports config/adopters.json. Confirm the canonical contribution path.

@namanjain24-sudo namanjain24-sudo changed the title fixes #4065: Made Case Studies page table section mobile responsive fix: #4065 Made Case Studies page table section mobile responsive Sep 9, 2025
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 (2)
pages/tools/generator.tsx (2)

21-28: Use i18n key and correct GitHub casing; prefer canonical URL

GithubButton expects a translation key (it calls t(text)). Passing a literal “View on Github” risks missing translations and uses incorrect casing. Also switch to the canonical github.com URL.

Apply:

-      <GithubButton
-        text='View on Github'
-        className='w-full text-center md:w-auto md:text-left'
-        href='https://www.github.com/asyncapi/generator'
-      />
+      <GithubButton
+        /* use i18n key; or omit `text` to fall back to the default 'githubButton' */
+        text='githubButton'
+        className='w-full text-center md:w-auto md:text-left'
+        href='https://github.com/asyncapi/generator'
+      />

If you prefer explicit keys, confirm the presence of something like common.viewOnGitHub and use that instead.


27-27: Add a test id (and consider i18n) for the Docs button

Helps E2E tests target this CTA; optionally localize its label for consistency.

-      <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-auto md:text-left'
+        data-testid='Docs-button'
+      />

If you want i18n: move this into a small component that uses useTranslation('common') and pass text={t('viewDocs')} (keeping GithubButton on a key, not a translated string).

📜 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 314fcb6 and 6da310a.

📒 Files selected for processing (1)
  • 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)
🔇 Additional comments (1)
pages/tools/generator.tsx (1)

21-21: Responsive container LGTM

Column on mobile → row on md+ with sensible wrap/justification. Meets the PR’s responsiveness goal.

@sambhavgupta0705
Copy link
Member

I seriously love the design

<h4 className='font-semibold text-sm text-gray-700 mb-2'>Resources:</h4>
<ul className='space-y-1'>
{entry.resources.map((resource: Resource, resourceIndex: number) => (
<li key={resourceIndex}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the things we are mapping in resources

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Each adopter has a list of “resources” in config/adopters.json.

  • Every resource has two fields:

  1. title: what we show as the link text (e.g., “Blog post”, “GitHub repo”)
  2. link: the URL the user goes to when they click
  • On the Case Studies page, we loop through "entry.resources" and render each one as a link.

</tr>
</thead>
<tbody>
{AdoptersList.map((entry: Adopter, index: number) => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does number signify here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index: number explicitly documents that the map callback’s second argument is a 0-based numeric index, improving readability and type safety (even though TypeScript could infer it).

Copy link
Member

@sambhavgupta0705 sambhavgupta0705 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sambhavgupta0705 sambhavgupta0705 merged commit ea0a681 into asyncapi:master Sep 12, 2025
17 checks passed
sambhavgupta0705 added a commit that referenced this pull request Sep 18, 2025
* docs(community): update latest community documentation (#4407)

* chore: update meetings.json and newsrooom_videos.json (#4410)

* chore: update meetings.json and newsrooom_videos.json (#4405)

* chore: update meetings.json, newsrooom_videos.json and dashboard.json

* Update meetings.json

---------

Co-authored-by: asyncapi-bot <[email protected]>
Co-authored-by: Eve <[email protected]>
Co-authored-by: Sambhav Gupta <[email protected]>

* chore: update meetings.json and newsrooom_videos.json (#4411)

* fix: #4065 Made Case Studies page table section mobile responsive (#4403)

* fixes #4065. Made Case Studie page mobile responsive

* fixes #4065. Made Case Studie page mobile responsive

* fix: #4381

---------

Co-authored-by: Sambhav Gupta <[email protected]>

* chore(deps): bump axios from 1.8.2 to 1.12.1 (#4413)

* chore(deps): bump @babel/runtime and next-language-detector (#4414)

* chore: update tools.json (#4417)

* chore: update meetings.json and newsrooom_videos.json (#4419)

* ci: update of files from global .github repo (#4418)

* fix: broken AsyncAPI contributing guidelines link (#4395) (#4398)


Co-authored-by: SanidhyaMadheshia <[email protected]>
Co-authored-by: Sambhav Gupta <[email protected]>
Co-authored-by: V Thulisile Sibanda <[email protected]>

---------

Co-authored-by: Chan <[email protected]>
Co-authored-by: asyncapi-bot <[email protected]>
Co-authored-by: Eve <[email protected]>
Co-authored-by: namanjain24-sudo <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SanidhyaMadheshia <[email protected]>
Co-authored-by: SanidhyaMadheshia <[email protected]>
Co-authored-by: V Thulisile Sibanda <[email protected]>
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