Skip to content

Conversation

@atharva038
Copy link

@atharva038 atharva038 commented Oct 26, 2025

Description

  • Fixed layout and spacing issue for the blog section.
  • Ensured better readability and consistent alignment.
  • Updated responsive styles in AnnouncementHero.tsx.
Screenshot 2025-10-26 at 3 16 22 PM

Related issue(s)
Resolves #4495

Summary by CodeRabbit

  • Style
    • Adjusted announcement banner spacing across layouts: increased vertical (top/bottom) spacing for improved visual separation while preserving horizontal centering and side spacing.

@netlify
Copy link

netlify bot commented Oct 26, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e1197cb
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/68fe157f8c887c00081fa805
😎 Deploy Preview https://deploy-preview-4507--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 Oct 26, 2025

Walkthrough

Adjusted AnnouncementHero Tailwind margin classes in three layout components: changed m-4 to my-4 (vertical-only margin) to correct banner vertical alignment differences across pages. No behavioral or control-flow changes.

Changes

Cohort / File(s) Change Summary
Banner Styling Adjustment
components/layout/GenericLayout.tsx, components/layout/GenericPostLayout.tsx, components/layout/GenericWideLayout.tsx
Replaced m-4 with my-4 on AnnouncementHero usages to apply vertical-only margins (top/bottom) instead of all-side margin; no logic or prop changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single-line Tailwind class edits across three similar files; visual-only change.
  • Check render in multiple page templates to verify alignment.

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

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

Poem

🐰
I hopped through code with nimble feet,
Tweaked margins so the banner meets,
Top and bottom now align with glee—
A tidy page for all to see! ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "style: minor layout spacing tweak for announcement banner" directly and accurately describes the main change in the PR. The changes consist of styling adjustments to the AnnouncementHero component across three layout files, modifying the Tailwind margin classes from "m-4" to "my-4". The title is concise, specific, and clearly communicates the primary purpose of the changeset—adjusting spacing for the announcement banner. A developer scanning the git history would immediately understand that this addresses layout spacing concerns.
Linked Issues Check ✅ Passed The linked issue #4495 reports that the announcement banner alignment is inconsistent between the homepage and other site pages, with the banner appearing shifted upward on non-home pages. The PR addresses this by modifying the AnnouncementHero component styling in three layout files (GenericLayout, GenericPostLayout, and GenericWideLayout), changing the margin class from "m-4" (all sides) to "my-4" (vertical only). This adjustment removes horizontal margins while preserving vertical spacing, which should resolve the alignment inconsistency described in the issue. The changes directly target the core requirement of ensuring banner alignment consistency across pages.
Out of Scope Changes Check ✅ Passed All changes in this PR are directly related to the linked issue #4495 concerning announcement banner alignment. The modifications span three layout component files (GenericLayout, GenericPostLayout, and GenericWideLayout) and consistently apply the same styling change to the AnnouncementHero component. No unrelated changes, such as refactoring, feature additions, or updates to other components, are present. Every modification is narrowly focused on addressing the banner alignment issue reported in the linked issue.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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.

@codecov
Copy link

codecov bot commented Oct 26, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4507   +/-   ##
=========================================
  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 Oct 26, 2025

⚡️ 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-4507--asyncapi-website.netlify.app/

@atharva038 atharva038 changed the title fix:(#4495)Minor layout spacing tweak for announcement banner style: minor layout spacing tweak for announcement banner Oct 26, 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: 1

🧹 Nitpick comments (1)
components/layout/GenericLayout.tsx (1)

43-43: Optional: Remove redundant text-center class.

The text-center class in this className prop appears redundant since AnnouncementHero already applies className='text-center' to its Container element (based on the relevant code snippets).

-          <AnnouncementHero className={` m-6 text-center ${hideBanner && 'hidden'}`} small={true} />
+          <AnnouncementHero className={` m-6 ${hideBanner && 'hidden'}`} small={true} />
📜 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 2d5c8be and 0679d56.

📒 Files selected for processing (1)
  • components/layout/GenericLayout.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/layout/GenericLayout.tsx (1)
components/campaigns/AnnouncementHero.tsx (1)
  • AnnouncementHero (21-112)
⏰ 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: Test NodeJS PR - windows-latest
  • GitHub Check: Test NodeJS PR - macos-13

<Container wide={wide}>
<div data-testid='GenericLayout-banner'>
<AnnouncementHero className={`m-4 text-center ${hideBanner && 'hidden'}`} small={true} />
<AnnouncementHero className={` m-6 text-center ${hideBanner && 'hidden'}`} small={true} />
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 | 🔴 Critical

🧩 Analysis chain

Spacing adjustment looks reasonable. Please verify across pages and screen sizes.

The margin increase from m-4 to m-6 should address the alignment inconsistency. However, since the reported issue (#4495) specifically concerns vertical banner positioning, consider using my-6 (vertical margin only) instead of m-6 (all sides) for a more targeted fix.

Please confirm:

  1. The banner now aligns consistently between the homepage and other pages
  2. The spacing appears correct on mobile, tablet, and desktop viewports
  3. No unintended horizontal spacing issues were introduced

🏁 Script executed:

#!/bin/bash
# Description: Check if homepage uses different margin values for AnnouncementHero
# to understand why alignment differs between pages.

# Search for other usages of AnnouncementHero to compare margin settings
rg -n -C3 'AnnouncementHero' --type=tsx --type=ts -g '!node_modules' -g '!.next'

Length of output: 27


🏁 Script executed:

#!/bin/bash
# Search for AnnouncementHero usages across the codebase
# Using fd to find tsx/ts files and grep to search for the component

echo "=== Searching for AnnouncementHero usages ==="
rg -n -C3 'AnnouncementHero' -g '!node_modules' -g '!.next'

echo ""
echo "=== Viewing GenericLayout.tsx around line 43 ==="
fd 'GenericLayout.tsx' --exec cat {}

Length of output: 10978


Incomplete fix: GenericLayout changed to m-6, but GenericPostLayout and GenericWideLayout still use m-4—inconsistency persists.

The margin change in GenericLayout.tsx is inconsistent with similar layout components that still use m-4 (GenericPostLayout.tsx line 35, GenericWideLayout.tsx line 38). If the alignment issue from #4495 affects multiple pages, this change alone may not fully resolve it.

Additionally, consider my-6 (vertical margin) instead of m-6 (all sides). Hero.tsx (line 32) and pages/404.tsx (line 17) use my-4, suggesting a pattern of vertical-only margins that may be more appropriate if the issue is strictly vertical alignment.

🤖 Prompt for AI Agents
In components/layout/GenericLayout.tsx around line 43, the AnnouncementHero
margin was changed to m-6 but related layouts still use m-4 causing
inconsistency; update GenericLayout to use the same margin pattern as
GenericPostLayout.tsx (line 35) and GenericWideLayout.tsx (line 38) — either
standardize all three to m-6 or m-4 as appropriate, and if the alignment issue
is vertical-only, change m-6 to my-6 and update the other two layout files to
the matching my- value so all three components use the same vertical margin
convention.

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)
components/layout/GenericLayout.tsx (1)

43-43: Consistent fix for vertical banner alignment.

The change from m-4 to my-4 correctly targets vertical margins only, which is appropriate for fixing the vertical alignment issue described in #4495. This now matches the changes in GenericWideLayout and GenericPostLayout, addressing the inconsistency noted in previous reviews.

Please verify that the banner now aligns consistently between the homepage and other pages across different screen sizes.

Minor: Leading space in className string.

There's an extra space at the beginning of the className string ( my-4 text-center). While this doesn't affect functionality, consider removing it for cleaner code.

-          <AnnouncementHero className={` my-4 text-center ${hideBanner && 'hidden'}`} small={true} />
+          <AnnouncementHero className={`my-4 text-center ${hideBanner && 'hidden'}`} small={true} />
📜 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 0679d56 and e1197cb.

📒 Files selected for processing (3)
  • components/layout/GenericLayout.tsx (1 hunks)
  • components/layout/GenericPostLayout.tsx (1 hunks)
  • components/layout/GenericWideLayout.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
components/layout/GenericWideLayout.tsx (1)
components/campaigns/AnnouncementHero.tsx (1)
  • AnnouncementHero (21-112)
components/layout/GenericLayout.tsx (1)
components/campaigns/AnnouncementHero.tsx (1)
  • AnnouncementHero (21-112)
components/layout/GenericPostLayout.tsx (1)
components/campaigns/AnnouncementHero.tsx (1)
  • AnnouncementHero (21-112)
⏰ 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: Test NodeJS PR - macos-13
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (2)
components/layout/GenericWideLayout.tsx (1)

38-38: LGTM! Consistent vertical margin adjustment.

The change from m-4 to my-4 is appropriate and aligns with the fixes in the other layout components.

components/layout/GenericPostLayout.tsx (1)

35-35: LGTM! Consistent vertical margin adjustment.

The change from m-4 to my-4 is appropriate and aligns with the fixes in the other layout components.

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] Alignment of Banner in other pages

2 participants