Skip to content

Conversation

@mahesh-gsoc-dev
Copy link

@mahesh-gsoc-dev mahesh-gsoc-dev commented Sep 12, 2025

Description

This PR fixes the margin and alignment issue in the tools page where the navbar overlaps the hero/card section and buttons appear misaligned at bottom of the generator page.

Ensures proper spacing between the navbar and carousel/card.

Corrects button alignment for consistent rendering across devices (desktop + mobile).

Adds responsive adjustments so that layout behaves as expected on different screen sizes.

Related issue(s)

Closes #4381

Notes

There is another PRs (#4390) ,(#4391),( #4406 ) attempting to resolve the same issue. However, that implementation doesn’t fully solve the margin/overlap problem across devices.
This PR provides a complete solution by addressing:

Top margin for the hero/card under the navbar.

Alignment of buttons in the generator page.

Cross-device consistency (desktop + mobile).

Before

Screenshot from 2025-09-01 09-18-41 Screenshot from 2025-09-01 09-19-35

After

Screenshot from 2025-09-12 17-53-19 Screenshot from 2025-09-12 17-54-10

Summary by CodeRabbit

  • Style

    • Increased top spacing above the announcement banner for improved visual separation.
    • Adjusted button group alignment with added left margin on the generator page.
    • Minor spacing and alignment tweaks; text and images unchanged.
  • Refactor

    • Reorganized generator page markup to use dedicated Heading and Paragraph components for clearer structure.
    • Standardized JSX attribute formatting for consistency.
    • No changes to behavior, navigation targets, or content.

@netlify
Copy link

netlify bot commented Sep 12, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit de85bba
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/68c41231bc4143000839814b
😎 Deploy Preview https://deploy-preview-4412--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 12, 2025

Walkthrough

This PR adjusts layout spacing and markup. GenericLayout increases AnnouncementHero’s top margin while keeping banner visibility logic unchanged. The Generator page undergoes JSX formatting refactors and a minor layout tweak adding ml-8 to the renderButtons container. No exported/public APIs change.

Changes

Cohort / File(s) Summary
Layout banner spacing
components/layout/GenericLayout.tsx
Increased top margin on AnnouncementHero (m-4 mt-6 text-center); no change to hideBanner logic; quote/style formatting updates without runtime effect.
Generator page markup/layout
pages/tools/generator.tsx
Refactored JSX to multiline and double-quoted props; content rendered via Heading/Paragraph components; minor alignment tweak adding ml-8 to renderButtons; no functional logic changes.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

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

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The PR contains several non-functional, out-of-scope edits such as JSX reformatting, switching single quotes to double quotes, minor attribute/data-testid quoting changes, and splitting string literals across lines; these do not change behavior but increase the diff and are unrelated to issue #4381. While the functional changes are limited to layout/margin adjustments, the cosmetic modifications expand review surface and may obscure the substantive layout fixes. Please separate cosmetic/formatting changes into a dedicated commit or follow-up PR so reviewers can focus on the layout fixes, and run visual regression checks across desktop and mobile viewports (or include screenshots) to ensure no regressions before merging.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "fix: correct alignment and navbar overlap in generator page" is concise and directly reflects the primary intent of the changeset — fixing navbar overlap and alignment on the Generator page; it matches the changes described in GenericLayout.tsx (added top margin) and pages/tools/generator.tsx (button alignment/margin adjustments).
Linked Issues Check ✅ Passed Based on the provided summaries and PR objectives (linked issue [#4381]), the changes implement the stated coding goals: GenericLayout.tsx increases top margin to address navbar overlap and pages/tools/generator.tsx adjusts the button container (ml-8) and markup to correct alignment, with responsive adjustments indicated and no public API changes. The file-level summaries show the functional edits focus on spacing and alignment, which map to the issue's expected behavior for consistent button alignment and uniform margins across devices.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Poem

A nibble of margin, a hop to align,
Buttons in rows now look mighty fine.
Banners sit taller, with breezes of space—
A rabbit approves this tidier place.
Tap-tap the keys, CSS in bloom,
Springy UIs make carrots zoom! 🥕✨

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.

@mahesh-gsoc-dev mahesh-gsoc-dev changed the title Fix: Correct alignment and navbar overlap in generator page fix: Correct alignment and navbar overlap in generator page Sep 12, 2025
@mahesh-gsoc-dev mahesh-gsoc-dev changed the title fix: Correct alignment and navbar overlap in generator page fix: correct alignment and navbar overlap in generator page Sep 12, 2025
@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Sep 12, 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-4412--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: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pages/tools/generator.tsx (1)

21-39: Fix jsx-quotes and improve copy on GitHub label (CI blocker + nit).

Repo enforces single quotes in JSX. Also use the correct “GitHub” capitalization.

-    <div className="mt-8 flex flex-wrap gap-4">
+    <div className='mt-8 flex flex-wrap gap-4'>
...
-      <GithubButton
-        text="View on Github"
-        className="w-full text-center sm:w-fit sm:text-left"
-        href="https://www.github.com/asyncapi/generator"
-      />
+      <GithubButton
+        text='View on GitHub'
+        className='w-full text-center sm:w-fit sm:text-left'
+        href='https://www.github.com/asyncapi/generator'
+      />
-      <Button
-        text="View Docs"
-        href="/docs/tools/generator"
-        className="w-full text-center sm:w-fit sm:text-left"
-      />
+      <Button
+        text='View Docs'
+        href='/docs/tools/generator'
+        className='w-full text-center sm:w-fit sm:text-left'
+      />
🧹 Nitpick comments (3)
components/layout/GenericLayout.tsx (1)

46-46: Consider using clsx/twMerge for safer class composition.

This keeps class lists clean and avoids conflicts. Optional if you prefer the ternary.

+ import { twMerge } from 'tailwind-merge';
+ import clsx from 'clsx';
...
-            className={`m-4 text-center ${hideBanner ? 'hidden' : 'mt-6'}`}
+            className={twMerge('m-4 text-center', clsx({ hidden: hideBanner, 'mt-6': !hideBanner }))}
pages/tools/generator.tsx (2)

200-200: Avoid hard-coded left margin on mobile; make it responsive.

ml-8 on the base breakpoint can misalign buttons on small screens.

-        <div className="mt-16 ml-8 text-center">{renderButtons()}</div>
+        <div className='mt-16 text-center md:ml-0 lg:ml-8'>{renderButtons()}</div>

21-21: One-shot lint fix suggestion (optional).

If you prefer a single patch, apply all jsx-quotes and small text fixes across the changed ranges.

I can push a unified patch if you enable maintainers to edit.

Also applies to: 30-32, 34-34, 59-61, 65-66, 73-75, 81-82, 91-93, 99-101, 104-110, 114-116, 120-123, 131-134, 139-141, 146-148, 157-160, 165-167, 171-174, 186-189, 191-195, 200-200

📜 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 8c45676 and de85bba.

📒 Files selected for processing (2)
  • components/layout/GenericLayout.tsx (1 hunks)
  • pages/tools/generator.tsx (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/layout/GenericLayout.tsx (1)
components/campaigns/AnnouncementHero.tsx (1)
  • AnnouncementHero (21-112)
pages/tools/generator.tsx (8)
components/buttons/Button.tsx (1)
  • Button (53-106)
components/layout/GenericLayout.tsx (1)
  • GenericLayout (25-56)
components/typography/Heading.tsx (1)
  • Heading (30-85)
components/typography/Paragraph.tsx (1)
  • Paragraph (28-56)
components/GeneratorInstallation.tsx (1)
  • GeneratorInstallation (23-98)
components/icons/Documents.tsx (1)
  • IconDocuments (7-13)
components/icons/Code.tsx (1)
  • IconCode (7-13)
components/icons/PowerPlug.tsx (1)
  • IconPowerPlug (7-13)
🪛 GitHub Actions: PR testing - if Node project
components/layout/GenericLayout.tsx

[error] 32-32: Delete , (prettier/prettier)


[error] 32-32: Prettier: Unexpected trailing comma. (comma-dangle)


[error] 35-35: Prettier: Props 'title', 'description', and 'image' are required at GenericLayout component. (prettier/prettier)


[error] 50-50: Prettier: Use single quotes for string: 'GenericLayout'.

pages/tools/generator.tsx

[error] 21-21: Prettier: Replace 'mt-8 flex flex-wrap gap-4' with 'mt-8 flex flex-wrap gap-4'. (prettier/prettier)


[error] 21-21: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)


[error] 30-30: Prettier: Replace 'View on Github' with 'View on Github'. (prettier/prettier)


[error] 30-30: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)


[error] 31-31: Prettier: Replace 'w-full text-center sm:w-fit sm:text-left' with 'w-full text-center sm:w-fit sm:text-left'. (prettier/prettier)


[error] 31-31: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)


[error] 32-32: Prettier: Replace 'https://www.github.com/asyncapi/generator' with 'https://www.github.com/asyncapi/generator'. (prettier/prettier)


[error] 32-32: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)


[error] 34-34: Prettier: Format multi-line JSX snippet. (prettier/prettier)


[error] 34-34: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)


[error] 59-59: Prettier: Replace 'overflow-hidden py-12' with 'overflow-hidden py-12'. (prettier/prettier)


[error] 60-60: Prettier: Replace 'relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8' with 'relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8'. (prettier/prettier)


[error] 61-61: Prettier: Replace 'relative text-center' with 'relative text-center'. (prettier/prettier)


[error] 65-65: Prettier: Replace 'mt-4' with 'mt-4'. (prettier/prettier)


[error] 66-66: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)

🔇 Additional comments (2)
components/layout/GenericLayout.tsx (1)

46-49: Action: ensure pages that hide the AnnouncementHero also get top padding to avoid navbar overlap

AnnouncementHero's m-4 mt-6 is ineffective when hideBanner=true (element gets 'hidden'); add equivalent top padding to main-content on pages that hide the banner or preserve spacing while visually hiding it.
Found: pages/community/ambassadors/[id].tsx sets hideBanner={true} (line 67); pages/casestudies/[id].tsx sets hideBanner={false} (line 193); GenericLayout default hideBanner=false (components/layout/GenericLayout.tsx:32).

pages/tools/generator.tsx (1)

1-204: Quick CI verification — manual verification required (sandbox lint failed)

Sandbox lint failed with "next: not found" (no lint output). Run locally and fix regressions: pnpm -s lint || npm run -s lint || yarn -s lint

  • Visual QA (check locally / on preview): breakpoints 375px, 414px, 768px, 1024px, 1280px — navbar must not overlap hero/main content; top and bottom "View on GitHub" / "View Docs" align consistently.
  • Ensure no horizontal scrollbars.
  • Re-run Lighthouse: confirm Performance improvement (images lazy-loaded) and no Accessibility regressions.

Comment on lines 31 to 33
// eslint-disable-next-line unused-imports/no-unused-vars, no-unused-vars
hideBanner = false
hideBanner = false,
}: IGenericLayoutProps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove unnecessary ESLint disable and trailing comma in props destructuring (CI blocker).

hideBanner is used; the disable is redundant. Also, the trailing comma after the last prop violates the repo’s Prettier config.

Apply:

-  // eslint-disable-next-line unused-imports/no-unused-vars, no-unused-vars
-  hideBanner = false,
+  hideBanner = false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// eslint-disable-next-line unused-imports/no-unused-vars, no-unused-vars
hideBanner = false
hideBanner = false,
}: IGenericLayoutProps) {
hideBanner = false
}: IGenericLayoutProps) {
🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[error] 32-32: Delete , (prettier/prettier)


[error] 32-32: Prettier: Unexpected trailing comma. (comma-dangle)

🤖 Prompt for AI Agents
In components/layout/GenericLayout.tsx around lines 31 to 33, remove the
unnecessary ESLint disable comment and the trailing comma in the props
destructuring: delete the "// eslint-disable-next-line
unused-imports/no-unused-vars, no-unused-vars" line since hideBanner is actually
used, and remove the comma after "hideBanner = false" so the destructuring
conforms to Prettier and CI rules.

Comment on lines +35 to +37
throw new Error(
'Props `title`, `description`, and `image` are required at GenericLayout component.',
);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix trailing comma in new Error(...) call (CI blocker).

Prettier flags the dangling comma in a single-argument call.

-    throw new Error(
-      'Props `title`, `description`, and `image` are required at GenericLayout component.',
-    );
+    throw new Error(
+      'Props `title`, `description`, and `image` are required at GenericLayout component.'
+    );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
throw new Error(
'Props `title`, `description`, and `image` are required at GenericLayout component.',
);
throw new Error(
'Props `title`, `description`, and `image` are required at GenericLayout component.'
);
🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[error] 35-35: Prettier: Props 'title', 'description', and 'image' are required at GenericLayout component. (prettier/prettier)

🤖 Prompt for AI Agents
In components/layout/GenericLayout.tsx around lines 35 to 37, the throw new
Error(...) call contains a trailing comma after the single string argument which
Prettier rejects; remove the dangling comma so the Error constructor is called
with a single string literal (no trailing comma) or collapse the string to one
line, ensuring no extra punctuation remains.


return (
<div data-testid='GenericLayout'>
<div data-testid="GenericLayout">
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Use single quotes in JSX attributes per repo style (CI blocker) and fix className boolean interpolation.

Switch JSX attributes to single quotes. Also avoid injecting a literal "false" into className; use a ternary.

-    <div data-testid="GenericLayout">
+    <div data-testid='GenericLayout'>
...
-        <div data-testid="GenericLayout-banner">
+        <div data-testid='GenericLayout-banner'>
           <AnnouncementHero
-            className={`m-4 mt-6 text-center ${hideBanner && 'hidden'}`}
-            small={true}
+            className={`m-4 text-center ${hideBanner ? 'hidden' : 'mt-6'}`}
+            small
           />
         </div>
-        <div id="main-content" data-testid="Generic-main">
+        <div
+          id='main-content'
+          data-testid='Generic-main'
+          className={hideBanner ? 'pt-16 md:pt-20' : ''}
+        >
  • The added conditional top padding ensures content isn’t overlapped by a fixed navbar when the banner is hidden.

Also applies to: 44-49, 50-50

🤖 Prompt for AI Agents
In components/layout/GenericLayout.tsx around lines 41 (and also 44-49, 50), JSX
attributes must use single quotes and the current className is interpolating a
boolean which can inject the literal "false"; change attribute quotes to single
quotes and replace boolean interpolation with a ternary expression that returns
either the padding class string or an empty string so className never receives
"false". Ensure all JSX attributes on these lines use single quotes and update
the conditional className logic accordingly.

Comment on lines +53 to +59
<GenericLayout
title="Generator"
description={description}
image={image}
wide
>
<div className="overflow-hidden py-12">
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix jsx-quotes in GenericLayout usage (CI blocker).

-    <GenericLayout
-      title="Generator"
-      description={description}
-      image={image}
-      wide
-    >
+    <GenericLayout
+      title='Generator'
+      description={description}
+      image={image}
+      wide
+    >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<GenericLayout
title="Generator"
description={description}
image={image}
wide
>
<div className="overflow-hidden py-12">
<GenericLayout
title='Generator'
description={description}
image={image}
wide
>
<div className="overflow-hidden py-12">
🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[error] 59-59: Prettier: Replace 'overflow-hidden py-12' with 'overflow-hidden py-12'. (prettier/prettier)

🤖 Prompt for AI Agents
In pages/tools/generator.tsx around lines 53 to 59, the GenericLayout JSX usage
is triggering the jsx-quotes lint rule; update the JSX attribute quoting to use
double quotes for literal string props (e.g., title="Generator"), ensure
expression props remain in curly braces (description={description},
image={image}), and remove any single-quoted attribute values or replace boolean
attributes with either the bare attribute (wide) or wide={true} so all JSX
attributes conform to the project's jsx-quotes rule.

Comment on lines +59 to 71
<div className="overflow-hidden py-12">
<div className="relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8">
<div className="relative text-center">
<Heading level={HeadingLevel.h1} typeStyle={HeadingTypeStyle.lg}>
Docs, Code, Anything!
</Heading>
<Paragraph className='mt-4'>{description}</Paragraph>
<img src={generatorimage} alt='generator diagram' className=' mx-auto h-auto object-cover lg:w-1/2' />
<Paragraph className="mt-4">{description}</Paragraph>
<img
src={generatorimage}
alt="generator diagram"
className=" mx-auto h-auto object-cover lg:w-1/2"
/>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix jsx-quotes and a stray leading space; keep markup identical.

-      <div className="overflow-hidden py-12">
-        <div className="relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8">
-          <div className="relative text-center">
+      <div className='overflow-hidden py-12'>
+        <div className='relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8'>
+          <div className='relative text-center'>
...
-            <Paragraph className="mt-4">{description}</Paragraph>
-            <img
-              src={generatorimage}
-              alt="generator diagram"
-              className=" mx-auto h-auto object-cover lg:w-1/2"
-            />
+            <Paragraph className='mt-4'>{description}</Paragraph>
+            <img
+              src={generatorimage}
+              alt='generator diagram'
+              className='mx-auto h-auto object-cover lg:w-1/2'
+            />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="overflow-hidden py-12">
<div className="relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8">
<div className="relative text-center">
<Heading level={HeadingLevel.h1} typeStyle={HeadingTypeStyle.lg}>
Docs, Code, Anything!
</Heading>
<Paragraph className='mt-4'>{description}</Paragraph>
<img src={generatorimage} alt='generator diagram' className=' mx-auto h-auto object-cover lg:w-1/2' />
<Paragraph className="mt-4">{description}</Paragraph>
<img
src={generatorimage}
alt="generator diagram"
className=" mx-auto h-auto object-cover lg:w-1/2"
/>
</div>
<div className='overflow-hidden py-12'>
<div className='relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8'>
<div className='relative text-center'>
<Heading level={HeadingLevel.h1} typeStyle={HeadingTypeStyle.lg}>
Docs, Code, Anything!
</Heading>
<Paragraph className='mt-4'>{description}</Paragraph>
<img
src={generatorimage}
alt='generator diagram'
className='mx-auto h-auto object-cover lg:w-1/2'
/>
</div>
🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[error] 59-59: Prettier: Replace 'overflow-hidden py-12' with 'overflow-hidden py-12'. (prettier/prettier)


[error] 60-60: Prettier: Replace 'relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8' with 'relative mx-auto max-w-xl px-4 sm:px-6 lg:max-w-screen-xl lg:px-8'. (prettier/prettier)


[error] 61-61: Prettier: Replace 'relative text-center' with 'relative text-center'. (prettier/prettier)


[error] 65-65: Prettier: Replace 'mt-4' with 'mt-4'. (prettier/prettier)


[error] 66-66: JSX quotes: Unexpected usage of double quotes. (jsx-quotes)

🤖 Prompt for AI Agents
In pages/tools/generator.tsx around lines 59 to 71, the img element has a stray
leading space in its className value and violates jsx-quotes; remove the leading
space so the className reads "mx-auto h-auto object-cover lg:w-1/2" (ensuring
double quotes are used consistently for JSX attributes) and keep the markup
otherwise identical.

Comment on lines +73 to 86
<div className="relative mt-12 lg:mt-20 lg:grid lg:grid-cols-2 lg:items-center lg:gap-8">
<div className="relative lg:mt-8">
<Heading
level={HeadingLevel.h2}
typeStyle={HeadingTypeStyle.mdSemibold}
>
Installation & Usage
</Heading>
<Paragraph className='mt-3 lg:pr-4'>
Start using Generator really quickly. Select one of the multiple templates we offer and start generating
documentation and code in a few seconds.
<Paragraph className="mt-3 lg:pr-4">
Start using Generator really quickly. Select one of the multiple
templates we offer and start generating documentation and code
in a few seconds.
</Paragraph>
{renderButtons()}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix jsx-quotes across feature sections (CI blocker).

No functional change; just align with lint rules.

-          <div className="relative mt-12 lg:mt-20 lg:grid lg:grid-cols-2 lg:items-center lg:gap-8">
-            <div className="relative lg:mt-8">
+          <div className='relative mt-12 lg:mt-20 lg:grid lg:grid-cols-2 lg:items-center lg:gap-8'>
+            <div className='relative lg:mt-8'>
...
-              <Paragraph className="mt-3 lg:pr-4">
+              <Paragraph className='mt-3 lg:pr-4'>
...
-              <Paragraph className="mt-3 lg:pr-4">
+              <Paragraph className='mt-3 lg:pr-4'>
...
-              <ul className="mt-10 lg:pr-4">
+              <ul className='mt-10 lg:pr-4'>
...
-                    <div className="shrink-0">
-                      <div className="flex size-12 items-center justify-center rounded-md border border-gray-900 bg-secondary-100 text-gray-900">
-                        <IconDocuments className="size-6" />
+                    <div className='shrink-0'>
+                      <div className='flex size-12 items-center justify-center rounded-md border border-gray-900 bg-secondary-100 text-gray-900'>
+                        <IconDocuments className='size-6' />
...
-                    <div className="ml-4">
+                    <div className='ml-4'>
...
-                      <Paragraph
-                        typeStyle={ParagraphTypeStyle.md}
-                        className="mt-2"
-                      >
+                      <Paragraph
+                        typeStyle={ParagraphTypeStyle.md}
+                        className='mt-2'
+                      >
...
-                <li className="mt-10">
+                <li className='mt-10'>
...
-                      <div className="flex size-12 items-center justify-center rounded-md border border-gray-900 bg-secondary-100 text-gray-900">
-                        <IconCode className="size-6" />
+                      <div className='flex size-12 items-center justify-center rounded-md border border-gray-900 bg-secondary-100 text-gray-900'>
+                        <IconCode className='size-6' />
...
-                    <div className="ml-4">
+                    <div className='ml-4'>
...
-                      <Paragraph
-                        typeStyle={ParagraphTypeStyle.md}
-                        className="mt-2"
-                      >
+                      <Paragraph
+                        typeStyle={ParagraphTypeStyle.md}
+                        className='mt-2'
+                      >
...
-                <li className="mt-10">
+                <li className='mt-10'>
...
-                      <div className="flex size-12 items-center justify-center rounded-md border border-gray-900 bg-secondary-100 text-gray-900">
-                        <IconPowerPlug className="size-6" />
+                      <div className='flex size-12 items-center justify-center rounded-md border border-gray-900 bg-secondary-100 text-gray-900'>
+                        <IconPowerPlug className='size-6' />
...
-                    <div className="ml-4">
+                    <div className='ml-4'>
...
-                      <Paragraph
-                        typeStyle={ParagraphTypeStyle.md}
-                        className="mt-2"
-                      >
+                      <Paragraph
+                        typeStyle={ParagraphTypeStyle.md}
+                        className='mt-2'
+                      >

Also applies to: 91-103, 104-129, 131-156, 157-181

🤖 Prompt for AI Agents
In pages/tools/generator.tsx around lines 73-86 (also apply to 91-103, 104-129,
131-156, 157-181): fix lint failures for the jsx-quotes rule by normalizing all
JSX attribute string quotes to the project's expected style (use double quotes
for literal JSX attributes), leaving JS expressions and template literals
unchanged; update any JSX prop values and className strings that use single
quotes to use double quotes, and run the linter to confirm no remaining
jsx-quotes violations.

Comment on lines +185 to 196
<div className="relative -mx-4 mt-10 lg:mt-0">
<img
className="relative mx-auto rounded shadow-lg"
src="/img/tools/generator-1.png"
alt=""
/>
<img
className="relative mx-auto mt-8 rounded shadow-lg"
src="/img/tools/generator-2.png"
alt=""
/>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Lazy-load below-the-fold images and fix jsx-quotes (perf + CI).

Improves Lighthouse Performance without changing layout.

-            <div className="relative -mx-4 mt-10 lg:mt-0">
-              <img
-                className="relative mx-auto rounded shadow-lg"
-                src="/img/tools/generator-1.png"
-                alt=""
-              />
-              <img
-                className="relative mx-auto mt-8 rounded shadow-lg"
-                src="/img/tools/generator-2.png"
-                alt=""
-              />
+            <div className='relative -mx-4 mt-10 lg:mt-0'>
+              <img
+                className='relative mx-auto rounded shadow-lg'
+                src='/img/tools/generator-1.png'
+                alt='AsyncAPI Generator screenshot 1'
+                loading='lazy'
+                decoding='async'
+              />
+              <img
+                className='relative mx-auto mt-8 rounded shadow-lg'
+                src='/img/tools/generator-2.png'
+                alt='AsyncAPI Generator screenshot 2'
+                loading='lazy'
+                decoding='async'
+              />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="relative -mx-4 mt-10 lg:mt-0">
<img
className="relative mx-auto rounded shadow-lg"
src="/img/tools/generator-1.png"
alt=""
/>
<img
className="relative mx-auto mt-8 rounded shadow-lg"
src="/img/tools/generator-2.png"
alt=""
/>
</div>
<div className='relative -mx-4 mt-10 lg:mt-0'>
<img
className='relative mx-auto rounded shadow-lg'
src='/img/tools/generator-1.png'
alt='AsyncAPI Generator screenshot 1'
loading='lazy'
decoding='async'
/>
<img
className='relative mx-auto mt-8 rounded shadow-lg'
src='/img/tools/generator-2.png'
alt='AsyncAPI Generator screenshot 2'
loading='lazy'
decoding='async'
/>
</div>
🤖 Prompt for AI Agents
In pages/tools/generator.tsx around lines 185 to 196, add lazy-loading to the
below-the-fold images and ensure JSX attribute quotes match the project's
jsx-quotes rule; specifically, add loading="lazy" to each <img> element to defer
offscreen image loading and update any JSX attribute quoting to the configured
style (e.g., double quotes) so the linter passes, then run the linter/formatter
to confirm no remaining jsx-quotes errors.

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