Skip to content

Conversation

@ika12345
Copy link

@ika12345 ika12345 commented Jan 1, 2026

🛠️ Fix Slack Invite Redirects

This PR ensures that all Slack invite buttons correctly open the external Slack invite page instead of redirecting to a 404 in local development.


✔ What’s Updated

  • Replaced /slack-invite paths with the correct external invite URL:
    https://www.asyncapi.com/slack-invite

  • Updated:

    • Homepage Slack CTA button

    • Community page Slack CTA button

    • SlackButton component behavior

  • All Slack links now open in a new browser tab (target="_blank")


🧪 Verification

Location | Expected Behavior | Status -- | -- | -- Homepage CTA button | Opens Slack invite in new tab | ✔️ Community page CTA button | Opens Slack invite in new tab | ✔️ SlackButton component | Opens Slack invite in new tab | ✔️

🔍 Notes

No related issue. Small, isolated fix.

Summary by CodeRabbit

  • Bug Fixes

    • Updated Slack invitation links across the site to the canonical external URL.
    • Slack CTAs now open in a new tab with secure linking (rel="noopener noreferrer").
    • Platform redirects updated to route to the new Slack invitation endpoint.
  • Style

    • Fixed minor button styling whitespace for consistent visual appearance.

✏️ Tip: You can customize this high-level summary in your review settings.

@netlify
Copy link

netlify bot commented Jan 1, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c32f4fb
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6956fe6055abca000873f97e
😎 Deploy Preview https://deploy-preview-4841--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.

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 1, 2026

📝 Walkthrough

Walkthrough

Standardized Slack invite URL to https://www.asyncapi.com/slack-invite across the SlackButton component, site pages, and redirects; SlackButton's default href and className were adjusted, Button now renders as an external anchor (target='_blank', rel='noopener noreferrer'); minor spacing and JSDoc cleanup.

Changes

Cohort / File(s) Summary
Slack Button Component
components/buttons/SlackButton.tsx
Reordered props and set className default; href default updated to https://www.asyncapi.com/slack-invite; Button rendered as an anchor with href, target='_blank', rel='noopener noreferrer'; removed JSDoc param lines; fixed bgClassName spacing.
Homepage & Community Pages
pages/[lang]/index.tsx, pages/community/index.tsx
Updated Slack invite links to https://www.asyncapi.com/slack-invite; homepage CTA uses external anchor semantics and security attributes.
Redirect Configuration
public/_redirects
Replaced direct Slack invite redirect target with www.asyncapi.com/slack-invite; added/normalized trailing newline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code with tiny paws,
Links aligned without a pause,
A button points where invites bloom,
Click, a tab will lift the room,
Come join the chat — hooray, applause!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main changes: updating Slack invite links to use an external URL and ensuring they open in new tabs.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent 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 13ab1d0 and c32f4fb.

📒 Files selected for processing (2)
  • components/buttons/SlackButton.tsx
  • pages/[lang]/index.tsx
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2024-10-11T07:38:35.745Z
Learnt from: akshatnema
Repo: asyncapi/website PR: 3262
File: components/newsroom/FeaturedBlogPost.tsx:90-92
Timestamp: 2024-10-11T07:38:35.745Z
Learning: In Next.js, nested `<a>` tags cause hydration issues due to invalid HTML. To fix this, avoid nesting `<a>` tags by replacing inner `<a>` tags with non-interactive elements like `<span>`, and use click handlers to maintain interactivity if needed.

Applied to files:

  • pages/[lang]/index.tsx
  • components/buttons/SlackButton.tsx
📚 Learning: 2024-10-11T10:46:58.882Z
Learnt from: akshatnema
Repo: asyncapi/website PR: 3262
File: components/Avatar.tsx:35-44
Timestamp: 2024-10-11T10:46:58.882Z
Learning: In Next.js, when avoiding nested `<a>` tags due to hydration issues, use accessible non-link elements like `<button>` or `<span>` with appropriate roles, `tabIndex`, and event handlers to maintain accessibility and SEO.

Applied to files:

  • pages/[lang]/index.tsx
  • components/buttons/SlackButton.tsx
📚 Learning: 2025-12-29T14:21:28.216Z
Learnt from: sammy200-ui
Repo: asyncapi/website PR: 4804
File: components/navigation/Filter.tsx:32-41
Timestamp: 2025-12-29T14:21:28.216Z
Learning: In the asyncapi/website repository, when you intentionally omit dependencies in React hooks (e.g., useEffect, useMemo), add an eslint-disable comment with an explanatory note above the line to justify the design choice. For example: // eslint-disable-next-line react-hooks/exhaustive-deps: intentionally omitting dependencies to avoid unnecessary re-runs. This helps reviewers understand the rationale and keeps lint guidance informative.

Applied to files:

  • pages/[lang]/index.tsx
  • components/buttons/SlackButton.tsx
📚 Learning: 2024-10-11T11:32:30.226Z
Learnt from: akshatnema
Repo: asyncapi/website PR: 3262
File: components/navigation/BlogPostItem.tsx:95-119
Timestamp: 2024-10-11T11:32:30.226Z
Learning: In the `BlogPostItem` component (`components/navigation/BlogPostItem.tsx`), nesting `<a>` tags inside the parent `Link` component leads to hydration issues; therefore, we should avoid nesting `<a>` tags inside `Link` components in this component.

Applied to files:

  • components/buttons/SlackButton.tsx
📚 Learning: 2024-11-11T21:30:32.478Z
Learnt from: amanbhoria
Repo: asyncapi/website PR: 3373
File: components/AlgoliaSearch.tsx:313-313
Timestamp: 2024-11-11T21:30:32.478Z
Learning: In the `SearchButton` component within `components/AlgoliaSearch.tsx`, if the component re-renders on every button click and the `useEffect` runs accordingly, adding dependencies to the dependency array might not be necessary.

Applied to files:

  • components/buttons/SlackButton.tsx
📚 Learning: 2024-10-11T11:17:32.246Z
Learnt from: akshatnema
Repo: asyncapi/website PR: 3262
File: components/navigation/BlogPostItem.tsx:80-87
Timestamp: 2024-10-11T11:17:32.246Z
Learning: In the `BlogPostItem` component, the parent `Link` wraps the entire content, so inner `Link` components around the title and excerpt are unnecessary.

Applied to files:

  • components/buttons/SlackButton.tsx
📚 Learning: 2025-12-23T06:30:43.275Z
Learnt from: katara-Jayprakash
Repo: asyncapi/website PR: 4760
File: components/layout/GenericPostLayout.tsx:50-52
Timestamp: 2025-12-23T06:30:43.275Z
Learning: In the asyncapi/website repository, `GenericPostLayout` (components/layout/GenericPostLayout.tsx) is used for rendering about pages, not blog posts, even though it accepts a post typed as `IPosts['blog'][number]`. The type is reused for convenience. Blog posts use `BlogLayout.tsx` instead. When reviewing EditPageButton usage in GenericPostLayout, `contentType='about'` is the correct value.

Applied to files:

  • components/buttons/SlackButton.tsx
🧬 Code graph analysis (2)
pages/[lang]/index.tsx (1)
components/buttons/Button.tsx (1)
  • Button (53-106)
components/buttons/SlackButton.tsx (2)
components/buttons/Button.tsx (1)
  • Button (53-106)
components/icons/Slack.tsx (1)
  • IconSlack (7-20)
⏰ 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 (1)
components/buttons/SlackButton.tsx (1)

14-32: LGTM! SlackButton correctly updated to use external Slack invite URL.

The changes align well with the PR objectives:

  • Default href updated to the external Slack invite URL
  • href is now explicitly passed to the Button component for flexibility
  • bgClassName spacing issue corrected (removed double space)
  • Props properly ordered and defaulted

Previous issues with redundant attributes have been resolved.


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 Jan 1, 2026

⚡️ Lighthouse report for the changes in this PR:

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

Lighthouse ran on https://deploy-preview-4841--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: 1

Caution

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

⚠️ Outside diff range comments (1)
components/buttons/SlackButton.tsx (1)

1-1: Address pipeline failures before merge.

The CI pipeline has flagged two formatting issues:

  • Line 1: Import sorting violation - run autofix to sort imports
  • Line 33: Remove trailing newline
🔎 Run the following command to auto-fix formatting issues
npm run format

Or manually apply these fixes:

  1. Sort imports at the top of the file
  2. Remove the trailing newline at the end

Also applies to: 33-33

📜 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 8acd1ac and 3ffa24d.

📒 Files selected for processing (4)
  • components/buttons/SlackButton.tsx
  • pages/[lang]/index.tsx
  • pages/community/index.tsx
  • public/_redirects
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-29T14:21:28.216Z
Learnt from: sammy200-ui
Repo: asyncapi/website PR: 4804
File: components/navigation/Filter.tsx:32-41
Timestamp: 2025-12-29T14:21:28.216Z
Learning: In the asyncapi/website repository, when you intentionally omit dependencies in React hooks (e.g., useEffect, useMemo), add an eslint-disable comment with an explanatory note above the line to justify the design choice. For example: // eslint-disable-next-line react-hooks/exhaustive-deps: intentionally omitting dependencies to avoid unnecessary re-runs. This helps reviewers understand the rationale and keeps lint guidance informative.

Applied to files:

  • pages/community/index.tsx
  • components/buttons/SlackButton.tsx
  • pages/[lang]/index.tsx
🧬 Code graph analysis (1)
pages/[lang]/index.tsx (1)
components/buttons/Button.tsx (1)
  • Button (53-106)
🪛 GitHub Actions: PR testing - if Node project
components/buttons/SlackButton.tsx

[error] 1-1: simple-import-sort/imports: Run autofix to sort these imports


[error] 33-33: prettier/prettier: Delete trailing newline

pages/[lang]/index.tsx

[error] 104-104: prettier/prettier: Delete the space character


[error] 105-105: prettier/prettier: Delete unnecessary indentation


[error] 106-106: prettier/prettier: Delete unnecessary indentation


[error] 107-107: prettier/prettier: Replace href with single quotes and correct spacing


[error] 107-107: jsx-quotes: Unexpected usage of doublequote


[error] 108-108: prettier/prettier: Replace target attribute with single quotes


[error] 108-108: jsx-quotes: Unexpected usage of doublequote


[error] 109-109: prettier/prettier: Replace rel attribute with single quotes


[error] 109-109: jsx-quotes: Unexpected usage of doublequote


[error] 110-110: prettier/prettier: Delete unnecessary space


[error] 111-111: prettier/prettier: Delete trailing newline

🔇 Additional comments (4)
components/buttons/SlackButton.tsx (2)

15-15: LGTM! External Slack invite URL is now the default.

The updated default href correctly points to the external Slack invite URL, ensuring consistent behavior across all uses of the SlackButton component.


29-29: Good catch on the spacing fix!

The double space between bg-slack and hover:bg-slack-light has been corrected.

pages/community/index.tsx (1)

179-179: LGTM! Slack invite link updated to external URL.

The HomeCards component now correctly links to the external Slack invite URL, consistent with the changes across the codebase.

public/_redirects (1)

56-57: LGTM! Redirect consolidated to use the same external URL.

The /slack-invite redirect now points to www.asyncapi.com/slack-invite, which matches the URL used throughout the UI components. This provides a single point of control for managing the Slack invite link.

Using a 302 (temporary) redirect is appropriate for an external service URL that may change.

Comment on lines 104 to 112
<Button
className='w-full md:w-auto'
text={t('community.slackCTABtn')}
href="https://www.asyncapi.com/slack-invite"
target="_blank"
rel="noopener noreferrer"
/>
</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 | 🟡 Minor

Fix formatting issues and remove redundant attribute.

The logic is correct - the Slack CTA now opens the external invite URL in a new tab. However, there are multiple formatting violations:

Issues:

  1. Double quotes: JSX attributes should use single quotes per project conventions
  2. Indentation: Lines 105-110 have unnecessary indentation
  3. Spacing: Extra spaces around attributes
  4. Trailing newline: Line 112 has an unnecessary blank line
  5. Redundant attribute: The rel="noopener noreferrer" is already added by the Button component when target is set (see Button.tsx line 93)
🔎 Proposed fix with correct formatting
-                     <Button
-                          className='w-full md:w-auto'
-                           text={t('community.slackCTABtn')}
-                           href="https://www.asyncapi.com/slack-invite"
-                           target="_blank"
-                           rel="noopener noreferrer"
-                     />
-
+                    <Button
+                      className='w-full md:w-auto'
+                      text={t('community.slackCTABtn')}
+                      href='https://www.asyncapi.com/slack-invite'
+                      target='_blank'
+                    />

Note: Removed rel="noopener noreferrer" since the Button component already applies it automatically for links with target set.

You can also run npm run format to auto-fix these issues.

📝 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
<Button
className='w-full md:w-auto'
text={t('community.slackCTABtn')}
href="https://www.asyncapi.com/slack-invite"
target="_blank"
rel="noopener noreferrer"
/>
</div>
<Button
className='w-full md:w-auto'
text={t('community.slackCTABtn')}
href='https://www.asyncapi.com/slack-invite'
target='_blank'
/>
</div>
🧰 Tools
🪛 GitHub Actions: PR testing - if Node project

[error] 104-104: prettier/prettier: Delete the space character


[error] 105-105: prettier/prettier: Delete unnecessary indentation


[error] 106-106: prettier/prettier: Delete unnecessary indentation


[error] 107-107: prettier/prettier: Replace href with single quotes and correct spacing


[error] 107-107: jsx-quotes: Unexpected usage of doublequote


[error] 108-108: prettier/prettier: Replace target attribute with single quotes


[error] 108-108: jsx-quotes: Unexpected usage of doublequote


[error] 109-109: prettier/prettier: Replace rel attribute with single quotes


[error] 109-109: jsx-quotes: Unexpected usage of doublequote


[error] 110-110: prettier/prettier: Delete unnecessary space


[error] 111-111: prettier/prettier: Delete trailing newline

🤖 Prompt for AI Agents
In pages/[lang]/index.tsx around lines 104 to 112, fix JSX formatting and remove
the redundant rel attribute: change double quotes to single quotes for JSX
attributes, normalize indentation of the Button props to match project style,
remove extra spaces around attributes, delete the redundant rel="noopener
noreferrer" (Button.tsx already adds it when target is present), and remove the
trailing blank line at line 112; run the formatter (npm run format) after making
these edits.

@codecov
Copy link

codecov bot commented Jan 1, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #4841   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          798       798           
  Branches       146       146           
=========================================
  Hits           798       798           

☔ 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.

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

📜 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 d20e692 and 13ab1d0.

📒 Files selected for processing (2)
  • components/buttons/SlackButton.tsx
  • pages/[lang]/index.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • pages/[lang]/index.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-29T14:21:28.216Z
Learnt from: sammy200-ui
Repo: asyncapi/website PR: 4804
File: components/navigation/Filter.tsx:32-41
Timestamp: 2025-12-29T14:21:28.216Z
Learning: In the asyncapi/website repository, when you intentionally omit dependencies in React hooks (e.g., useEffect, useMemo), add an eslint-disable comment with an explanatory note above the line to justify the design choice. For example: // eslint-disable-next-line react-hooks/exhaustive-deps: intentionally omitting dependencies to avoid unnecessary re-runs. This helps reviewers understand the rationale and keeps lint guidance informative.

Applied to files:

  • components/buttons/SlackButton.tsx
🧬 Code graph analysis (1)
components/buttons/SlackButton.tsx (2)
components/buttons/Button.tsx (1)
  • Button (53-106)
components/icons/Slack.tsx (1)
  • IconSlack (7-20)
⏰ 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)
components/buttons/SlackButton.tsx (2)

11-13: LGTM: Clear documentation.

The JSDoc accurately describes the component's behavior, making it clear that the button always opens the Slack invite in a new tab.


14-15: LGTM: Good API simplification.

The simplified API (accepting only text and className) makes the component more focused and ensures consistent Slack invite behavior. Using a const for the href is clean and maintainable.

Note: This is a breaking change if the component was previously used with custom href, target, or iconPosition props, but this appears intentional based on the PR objectives.

build with AsyncAPI."
btnText='Join AsyncAPI slack'
link='https://asyncapi.com/slack-invite'
link='https://www.asyncapi.com/slack-invite'
Copy link
Member

Choose a reason for hiding this comment

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

Why we need to include a www cname?

/asyncapi-react https://asyncapi.github.io/asyncapi-react 301!

# Slack
/slack-invite https://join.slack.com/t/asyncapi/shared_invite/zt-3m4pmrguv-SUN9Js4BkQHocIH54F59sA 302!
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this would result in a redirect loop. why are we removing the slack invite link here?

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