Skip to content

Conversation

zalabhavy
Copy link
Contributor

@zalabhavy zalabhavy commented May 4, 2025

Description

Added Updated Card Look.

image

Related issue(s)

Fixes #4086

Summary by CodeRabbit

  • Style

    • Improved visual appearance of blog post items with enhanced borders, shadows, and hover effects.
    • Redesigned author section with avatars and names in a highlighted container above the post title.
    • Updated blog post cover image alt text for better accessibility.
  • New Features

    • Author names are now interactive buttons that open author links in new tabs.
    • Added a prominent "Read More" button below the post excerpt for easier navigation.
  • Accessibility

    • Improved alt text for images to enhance screen reader support.

Copy link
Contributor

coderabbitai bot commented May 4, 2025

Walkthrough

The BlogPostItem component was visually and structurally revamped. The article container now features enhanced borders and hover effects. The author section is repositioned to the top, styled with a gray background, and displays avatars and names as clickable buttons opening author links in new tabs. The cover image's alt text now uses the post title for accessibility. The post type, title, and excerpt are reorganized for improved hierarchy. The redundant author block at the bottom was removed, and a prominent "Read More" button was added beneath the excerpt, streamlining the call-to-action.

Changes

File(s) Change Summary
components/navigation/BlogPostItem.tsx Refactored layout: moved author info to top, restyled author section, added "Read More" button, improved accessibility, removed redundant blocks, and adjusted styling throughout.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BlogPostItem
    participant AuthorProfile
    participant BlogPostPage

    User->>BlogPostItem: Views blog post card
    BlogPostItem->>AuthorProfile: Renders author avatars/buttons
    User->>AuthorProfile: Clicks author name
    AuthorProfile->>AuthorProfile: Opens author link in new tab
    User->>BlogPostItem: Clicks "Read More" button
    BlogPostItem->>BlogPostPage: Navigates to full post
Loading

Assessment against linked issues

Objective Addressed Explanation
Add 'Read More' button at the end of the blog card (#4086)
Restructure card: thumbnail, author info at top, then tag/content, then CTA at end (#4086)
Improve visual hierarchy and section separation as per Figma (#4086)
Remove redundant/duplicate author block at the bottom (#4086)

Suggested labels

ready-to-merge

Suggested reviewers

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

Poem

A blog card hops with new delight,
Authors up top, their names in sight.
A button to read, so bold and clear,
Invites you in—come closer, dear!
With borders neat and shadows cast,
This rabbit hopes the style will last.
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@zalabhavy zalabhavy changed the title Updated Blog Card feat: Updated Blog Card May 4, 2025
Copy link

netlify bot commented May 4, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a283dd6
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/681a0bf2fb6ab50008da8b5a
😎 Deploy Preview https://deploy-preview-4087--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 site configuration.

@zalabhavy zalabhavy changed the title feat: Updated Blog Card feat: updated blog card May 4, 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: 2

🔭 Outside diff range comments (1)
components/navigation/BlogPostItem.tsx (1)

56-132: ⚠️ Potential issue

Fix quote style across the component

The code has consistent ESLint/Prettier errors throughout regarding quote usage. Replace all double quotes with single quotes to meet the project's style requirements.

These quote style issues are causing CI pipeline failures. Here's a sample of the changes needed:

- <article className="h-full rounded-lg border border-gray-200 shadow-md transition-all duration-300 ease-in-out hover:shadow-lg">
+ <article className='h-full rounded-lg border border-gray-200 shadow-md transition-all duration-300 ease-in-out hover:shadow-lg'>

Apply this pattern to all className attributes, string literals, and prop values throughout the component.

🧰 Tools
🪛 ESLint

[error] 56-56: Replace "h-full·rounded-lg·border·border-gray-200·shadow-md·transition-all·duration-300·ease-in-out·hover:shadow-lg" with 'h-full·rounded-lg·border·border-gray-200·shadow-md·transition-all·duration-300·ease-in-out·hover:shadow-lg'

(prettier/prettier)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 58-58: Replace "flex·h-full·cursor-pointer·flex-col·overflow-hidden·rounded-lg" with 'flex·h-full·cursor-pointer·flex-col·overflow-hidden·rounded-lg'

(prettier/prettier)


[error] 58-58: Unexpected usage of doublequote.

(jsx-quotes)


[error] 59-64: Replace ⏎··············className="h-48·w-full·object-cover"⏎··············src={post.cover}⏎··············alt={post.title}⏎··············loading="lazy"⏎··········· with ·className='h-48·w-full·object-cover'·src={post.cover}·alt={post.title}·loading='lazy'

(prettier/prettier)


[error] 60-60: Unexpected usage of doublequote.

(jsx-quotes)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)


[error] 65-65: Replace "flex·items-center·px-6·py-4·bg-gray-50" with 'flex·items-center·px-6·py-4·bg-gray-50'

(prettier/prettier)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "relative·shrink-0" with 'relative·shrink-0'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 69-69: Replace "ml-3" with 'ml-3'

(prettier/prettier)


[error] 69-69: Unexpected usage of doublequote.

(jsx-quotes)


[error] 70-74: Replace ⏎··················level={HeadingLevel.h3}⏎··················typeStyle={HeadingTypeStyle.xsSemibold}⏎··················textColor="text-gray-900"⏎················ with ·level={HeadingLevel.h3}·typeStyle={HeadingTypeStyle.xsSemibold}·textColor='text-gray-900'

(prettier/prettier)


[error] 73-73: Unexpected usage of doublequote.

(jsx-quotes)


[error] 82-82: Replace "cursor-pointer·border-none·bg-inherit·p-0·hover:underline" with 'cursor-pointer·border-none·bg-inherit·p-0·hover:underline'

(prettier/prettier)


[error] 82-82: Unexpected usage of doublequote.

(jsx-quotes)


[error] 85-85: Replace "_blank" with '_blank'

(prettier/prettier)


[error] 85-85: Strings must use singlequote.

(quotes)


[error] 101-101: Replace "text-gray-600" with 'text-gray-600'

(prettier/prettier)


[error] 101-101: Unexpected usage of doublequote.

(jsx-quotes)


[error] 102-102: Replace "MMMM·D,·YYYY" with 'MMMM·D,·YYYY'

(prettier/prettier)


[error] 102-102: Strings must use singlequote.

(quotes)


[error] 103-103: Replace "mx-1" with 'mx-1'

(prettier/prettier)


[error] 103-103: Unexpected usage of doublequote.

(jsx-quotes)


[error] 108-108: Replace "flex·flex-1·flex-col·justify-between·bg-white·p-6" with 'flex·flex-1·flex-col·justify-between·bg-white·p-6'

(prettier/prettier)


[error] 108-108: Unexpected usage of doublequote.

(jsx-quotes)


[error] 109-109: Replace "flex-1" with 'flex-1'

(prettier/prettier)


[error] 109-109: Unexpected usage of doublequote.

(jsx-quotes)


[error] 110-110: Replace "text-indigo-500" with 'text-indigo-500'

(prettier/prettier)


[error] 110-110: Unexpected usage of doublequote.

(jsx-quotes)


[error] 111-111: Replace ·className={inline-flex·items-center·rounded-full·px-3·py-0.5·${typeColors[0]}·${typeColors[1]}} with ⏎····················className={inline-flex·items-center·rounded-full·px-3·py-0.5·${typeColors[0]}·${typeColors[1]}}⏎··················

(prettier/prettier)


[error] 115-115: Replace "mt-2" with 'mt-2'

(prettier/prettier)


[error] 115-115: Unexpected usage of doublequote.

(jsx-quotes)


[error] 118-118: Replace "mt-3·text-gray-700" with 'mt-3·text-gray-700'

(prettier/prettier)


[error] 118-118: Unexpected usage of doublequote.

(jsx-quotes)


[error] 119-119: Replace "span" with 'span'

(prettier/prettier)


[error] 119-119: Unexpected usage of doublequote.

(jsx-quotes)


[error] 122-122: Replace "mt-4" with 'mt-4'

(prettier/prettier)


[error] 122-122: Unexpected usage of doublequote.

(jsx-quotes)


[error] 124-124: Replace "w-full·rounded-md·bg-indigo-600·px-4·py-2·text-white·transition-all·duration-300·hover:bg-indigo-700" with 'w-full·rounded-md·bg-indigo-600·px-4·py-2·text-white·transition-all·duration-300·hover:bg-indigo-700'

(prettier/prettier)


[error] 124-124: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 56-56: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 58-58: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 59-60: Prettier: Replace multi-line JSX attribute quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 63-63: Unexpected usage of doublequote (jsx-quotes)


[warning] 65-65: Invalid Tailwind CSS classnames order (tailwindcss/classnames-order)


[error] 65-66: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 69-69: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 70-73: Prettier: Replace multi-line JSX attribute quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 82-82: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 85-85: Prettier: Replace double quotes with single quotes (prettier/prettier) and Strings must use singlequote (quotes)


[error] 101-102: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes) and Strings must use singlequote (quotes)


[error] 103-103: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 108-109: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 110-110: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 111-111: Prettier: Replace template literal JSX attribute quotes with multi-line format (prettier/prettier)


[error] 115-115: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 118-119: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 122-124: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)

🧹 Nitpick comments (2)
components/navigation/BlogPostItem.tsx (2)

75-98: Simplify author name rendering logic

The logic to join author names with " & " could be simplified using Array.join() instead of reduce.

Consider using the following approach:

- {post.authors
-   .map((author, index) =>
-     author.link ? (
-       <button
-         key={index}
-         data-alt={author.name}
-         className="cursor-pointer border-none bg-inherit p-0 hover:underline"
-         onClick={(e) => {
-           e.preventDefault();
-           window.open(author.link, "_blank");
-         }}
-       >
-         {author.name}
-       </button>
-     ) : (
-       author.name
-     )
-   )
-   .reduce((prev, curr, index) => (
-     <React.Fragment key={`author-${index}`}>
-       {prev} & {curr}
-     </React.Fragment>
-   ))}
+ {post.authors.map((author, index) => (
+   <React.Fragment key={`author-${index}`}>
+     {index > 0 && ' & '}
+     {author.link ? (
+       <button
+         data-alt={author.name}
+         className='cursor-pointer border-none bg-inherit p-0 hover:underline'
+         onClick={(e) => {
+           e.preventDefault();
+           window.open(author.link, '_blank');
+         }}
+       >
+         {author.name}
+       </button>
+     ) : (
+       author.name
+     )}
+   </React.Fragment>
+ ))}
🧰 Tools
🪛 ESLint

[error] 82-82: Replace "cursor-pointer·border-none·bg-inherit·p-0·hover:underline" with 'cursor-pointer·border-none·bg-inherit·p-0·hover:underline'

(prettier/prettier)


[error] 82-82: Unexpected usage of doublequote.

(jsx-quotes)


[error] 85-85: Replace "_blank" with '_blank'

(prettier/prettier)


[error] 85-85: Strings must use singlequote.

(quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 82-82: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 85-85: Prettier: Replace double quotes with single quotes (prettier/prettier) and Strings must use singlequote (quotes)


65-65: Fix Tailwind class order

The pipeline reports a warning about invalid Tailwind CSS class order.

Reorder the Tailwind classes to follow the project's conventions:

- <div className="flex items-center px-6 py-4 bg-gray-50">
+ <div className="flex items-center bg-gray-50 px-6 py-4">
🧰 Tools
🪛 ESLint

[error] 65-65: Replace "flex·items-center·px-6·py-4·bg-gray-50" with 'flex·items-center·px-6·py-4·bg-gray-50'

(prettier/prettier)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[warning] 65-65: Invalid Tailwind CSS classnames order (tailwindcss/classnames-order)


[error] 65-66: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f9f7ed and 2a2c06f.

📒 Files selected for processing (1)
  • components/navigation/BlogPostItem.tsx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: akshatnema
PR: asyncapi/website#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.
components/navigation/BlogPostItem.tsx (2)
Learnt from: akshatnema
PR: asyncapi/website#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.
Learnt from: akshatnema
PR: asyncapi/website#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.
🪛 ESLint
components/navigation/BlogPostItem.tsx

[error] 56-56: Replace "h-full·rounded-lg·border·border-gray-200·shadow-md·transition-all·duration-300·ease-in-out·hover:shadow-lg" with 'h-full·rounded-lg·border·border-gray-200·shadow-md·transition-all·duration-300·ease-in-out·hover:shadow-lg'

(prettier/prettier)


[error] 56-56: Unexpected usage of doublequote.

(jsx-quotes)


[error] 58-58: Replace "flex·h-full·cursor-pointer·flex-col·overflow-hidden·rounded-lg" with 'flex·h-full·cursor-pointer·flex-col·overflow-hidden·rounded-lg'

(prettier/prettier)


[error] 58-58: Unexpected usage of doublequote.

(jsx-quotes)


[error] 59-64: Replace ⏎··············className="h-48·w-full·object-cover"⏎··············src={post.cover}⏎··············alt={post.title}⏎··············loading="lazy"⏎··········· with ·className='h-48·w-full·object-cover'·src={post.cover}·alt={post.title}·loading='lazy'

(prettier/prettier)


[error] 60-60: Unexpected usage of doublequote.

(jsx-quotes)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)


[error] 65-65: Replace "flex·items-center·px-6·py-4·bg-gray-50" with 'flex·items-center·px-6·py-4·bg-gray-50'

(prettier/prettier)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "relative·shrink-0" with 'relative·shrink-0'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 69-69: Replace "ml-3" with 'ml-3'

(prettier/prettier)


[error] 69-69: Unexpected usage of doublequote.

(jsx-quotes)


[error] 70-74: Replace ⏎··················level={HeadingLevel.h3}⏎··················typeStyle={HeadingTypeStyle.xsSemibold}⏎··················textColor="text-gray-900"⏎················ with ·level={HeadingLevel.h3}·typeStyle={HeadingTypeStyle.xsSemibold}·textColor='text-gray-900'

(prettier/prettier)


[error] 73-73: Unexpected usage of doublequote.

(jsx-quotes)


[error] 82-82: Replace "cursor-pointer·border-none·bg-inherit·p-0·hover:underline" with 'cursor-pointer·border-none·bg-inherit·p-0·hover:underline'

(prettier/prettier)


[error] 82-82: Unexpected usage of doublequote.

(jsx-quotes)


[error] 85-85: Replace "_blank" with '_blank'

(prettier/prettier)


[error] 85-85: Strings must use singlequote.

(quotes)


[error] 101-101: Replace "text-gray-600" with 'text-gray-600'

(prettier/prettier)


[error] 101-101: Unexpected usage of doublequote.

(jsx-quotes)


[error] 102-102: Replace "MMMM·D,·YYYY" with 'MMMM·D,·YYYY'

(prettier/prettier)


[error] 102-102: Strings must use singlequote.

(quotes)


[error] 103-103: Replace "mx-1" with 'mx-1'

(prettier/prettier)


[error] 103-103: Unexpected usage of doublequote.

(jsx-quotes)


[error] 108-108: Replace "flex·flex-1·flex-col·justify-between·bg-white·p-6" with 'flex·flex-1·flex-col·justify-between·bg-white·p-6'

(prettier/prettier)


[error] 108-108: Unexpected usage of doublequote.

(jsx-quotes)


[error] 109-109: Replace "flex-1" with 'flex-1'

(prettier/prettier)


[error] 109-109: Unexpected usage of doublequote.

(jsx-quotes)


[error] 110-110: Replace "text-indigo-500" with 'text-indigo-500'

(prettier/prettier)


[error] 110-110: Unexpected usage of doublequote.

(jsx-quotes)


[error] 111-111: Replace ·className={inline-flex·items-center·rounded-full·px-3·py-0.5·${typeColors[0]}·${typeColors[1]}} with ⏎····················className={inline-flex·items-center·rounded-full·px-3·py-0.5·${typeColors[0]}·${typeColors[1]}}⏎··················

(prettier/prettier)


[error] 115-115: Replace "mt-2" with 'mt-2'

(prettier/prettier)


[error] 115-115: Unexpected usage of doublequote.

(jsx-quotes)


[error] 118-118: Replace "mt-3·text-gray-700" with 'mt-3·text-gray-700'

(prettier/prettier)


[error] 118-118: Unexpected usage of doublequote.

(jsx-quotes)


[error] 119-119: Replace "span" with 'span'

(prettier/prettier)


[error] 119-119: Unexpected usage of doublequote.

(jsx-quotes)


[error] 122-122: Replace "mt-4" with 'mt-4'

(prettier/prettier)


[error] 122-122: Unexpected usage of doublequote.

(jsx-quotes)


[error] 124-124: Replace "w-full·rounded-md·bg-indigo-600·px-4·py-2·text-white·transition-all·duration-300·hover:bg-indigo-700" with 'w-full·rounded-md·bg-indigo-600·px-4·py-2·text-white·transition-all·duration-300·hover:bg-indigo-700'

(prettier/prettier)


[error] 124-124: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project
components/navigation/BlogPostItem.tsx

[error] 56-56: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 58-58: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 59-60: Prettier: Replace multi-line JSX attribute quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 63-63: Unexpected usage of doublequote (jsx-quotes)


[warning] 65-65: Invalid Tailwind CSS classnames order (tailwindcss/classnames-order)


[error] 65-66: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 69-69: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 70-73: Prettier: Replace multi-line JSX attribute quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 82-82: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 85-85: Prettier: Replace double quotes with single quotes (prettier/prettier) and Strings must use singlequote (quotes)


[error] 101-102: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes) and Strings must use singlequote (quotes)


[error] 103-103: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 108-109: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 110-110: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 111-111: Prettier: Replace template literal JSX attribute quotes with multi-line format (prettier/prettier)


[error] 115-115: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 118-119: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 122-124: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)

⏰ Context from checks skipped due to timeout of 180000ms (4)
  • GitHub Check: Redirect rules - asyncapi-website
  • GitHub Check: Header rules - asyncapi-website
  • GitHub Check: Pages changed - asyncapi-website
  • GitHub Check: Lighthouse CI
🔇 Additional comments (2)
components/navigation/BlogPostItem.tsx (2)

62-64: Great accessibility improvement with proper image alt text

Using the post title as the alt text for blog images is an excellent accessibility improvement.

🧰 Tools
🪛 ESLint

[error] 59-64: Replace ⏎··············className="h-48·w-full·object-cover"⏎··············src={post.cover}⏎··············alt={post.title}⏎··············loading="lazy"⏎··········· with ·className='h-48·w-full·object-cover'·src={post.cover}·alt={post.title}·loading='lazy'

(prettier/prettier)


[error] 63-63: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 63-63: Unexpected usage of doublequote (jsx-quotes)


65-107: Author section redesign looks good

Moving the author section to the top with the gray background creates a better visual hierarchy. Using buttons for author links instead of nested anchor tags is a good approach to avoid hydration issues.

🧰 Tools
🪛 ESLint

[error] 65-65: Replace "flex·items-center·px-6·py-4·bg-gray-50" with 'flex·items-center·px-6·py-4·bg-gray-50'

(prettier/prettier)


[error] 65-65: Unexpected usage of doublequote.

(jsx-quotes)


[error] 66-66: Replace "relative·shrink-0" with 'relative·shrink-0'

(prettier/prettier)


[error] 66-66: Unexpected usage of doublequote.

(jsx-quotes)


[error] 69-69: Replace "ml-3" with 'ml-3'

(prettier/prettier)


[error] 69-69: Unexpected usage of doublequote.

(jsx-quotes)


[error] 70-74: Replace ⏎··················level={HeadingLevel.h3}⏎··················typeStyle={HeadingTypeStyle.xsSemibold}⏎··················textColor="text-gray-900"⏎················ with ·level={HeadingLevel.h3}·typeStyle={HeadingTypeStyle.xsSemibold}·textColor='text-gray-900'

(prettier/prettier)


[error] 73-73: Unexpected usage of doublequote.

(jsx-quotes)


[error] 82-82: Replace "cursor-pointer·border-none·bg-inherit·p-0·hover:underline" with 'cursor-pointer·border-none·bg-inherit·p-0·hover:underline'

(prettier/prettier)


[error] 82-82: Unexpected usage of doublequote.

(jsx-quotes)


[error] 85-85: Replace "_blank" with '_blank'

(prettier/prettier)


[error] 85-85: Strings must use singlequote.

(quotes)


[error] 101-101: Replace "text-gray-600" with 'text-gray-600'

(prettier/prettier)


[error] 101-101: Unexpected usage of doublequote.

(jsx-quotes)


[error] 102-102: Replace "MMMM·D,·YYYY" with 'MMMM·D,·YYYY'

(prettier/prettier)


[error] 102-102: Strings must use singlequote.

(quotes)


[error] 103-103: Replace "mx-1" with 'mx-1'

(prettier/prettier)


[error] 103-103: Unexpected usage of doublequote.

(jsx-quotes)

🪛 GitHub Actions: PR testing - if Node project

[warning] 65-65: Invalid Tailwind CSS classnames order (tailwindcss/classnames-order)


[error] 65-66: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 69-69: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 70-73: Prettier: Replace multi-line JSX attribute quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 82-82: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)


[error] 85-85: Prettier: Replace double quotes with single quotes (prettier/prettier) and Strings must use singlequote (quotes)


[error] 101-102: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes) and Strings must use singlequote (quotes)


[error] 103-103: Prettier: Replace double quotes with single quotes (prettier/prettier) and Unexpected usage of doublequote (jsx-quotes)

className="cursor-pointer border-none bg-inherit p-0 hover:underline"
onClick={(e) => {
e.preventDefault();
window.open(author.link, "_blank");
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

Add rel="noopener noreferrer" for security

When using window.open() with _blank, it's recommended to include security attributes.

Add security attributes to prevent potential security vulnerabilities:

- window.open(author.link, "_blank");
+ window.open(author.link, "_blank", "noopener,noreferrer");
📝 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
window.open(author.link, "_blank");
- window.open(author.link, "_blank");
+ window.open(author.link, "_blank", "noopener,noreferrer");
🧰 Tools
🪛 ESLint

[error] 85-85: Replace "_blank" with '_blank'

(prettier/prettier)


[error] 85-85: Strings must use singlequote.

(quotes)

🪛 GitHub Actions: PR testing - if Node project

[error] 85-85: Prettier: Replace double quotes with single quotes (prettier/prettier) and Strings must use singlequote (quotes)

Comment on lines +123 to +127
<Link href={post.slug}>
<button className="w-full rounded-md bg-indigo-600 px-4 py-2 text-white transition-all duration-300 hover:bg-indigo-700">
Read More
</button>
</Link>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Remove nested Link components

There's a nested Link component inside the parent Link which can cause hydration issues according to the retrieved learnings.

According to the earlier learnings, nesting <a> tags inside the parent Link component leads to hydration issues. Since the entire card is already wrapped in a Link, the inner Link should be replaced:

- <div className="mt-4">
-   <Link href={post.slug}>
-     <button className="w-full rounded-md bg-indigo-600 px-4 py-2 text-white transition-all duration-300 hover:bg-indigo-700">
-       Read More
-     </button>
-   </Link>
- </div>
+ <div className="mt-4">
+   <button 
+     className="w-full rounded-md bg-indigo-600 px-4 py-2 text-white transition-all duration-300 hover:bg-indigo-700"
+     onClick={(e) => e.preventDefault()}
+   >
+     Read More
+   </button>
+ </div>

Let's verify if this is a common pattern in the codebase:


🏁 Script executed:

#!/bin/bash
# Check for nested Link components
echo "Checking for nested Link components in the codebase..."
rg -A 2 -B 2 "<Link[^>]*>.*?<Link" --type tsx --type jsx

Length of output: 205


Remove nested <Link> wrapper in BlogPostItem.tsx

The “Read More” <Link> is currently nested inside the parent <Link> that wraps the entire card, which leads to hydration/invalid HTML issues in Next.js. Replace the inner <Link>-wrapped button with a plain <button> that uses the Next.js router to navigate:

  • Location: components/navigation/BlogPostItem.tsx (lines 123–127)
  • Diff:
- <div className="mt-4">
-   <Link href={post.slug}>
-     <button className="w-full rounded-md bg-indigo-600 px-4 py-2 text-white transition-all duration-300 hover:bg-indigo-700">
-       Read More
-     </button>
-   </Link>
- </div>
+ import { useRouter } from 'next/router';
+ 
+ const router = useRouter();
+
+ <div className="mt-4">
+   <button
+     className="w-full rounded-md bg-indigo-600 px-4 py-2 text-white transition-all duration-300 hover:bg-indigo-700"
+     onClick={() => router.push(post.slug)}
+     type="button"
+   >
+     Read More
+   </button>
+ </div>

This removes the nested <Link> tag while preserving expected navigation and accessibility.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 ESLint

[error] 124-124: Replace "w-full·rounded-md·bg-indigo-600·px-4·py-2·text-white·transition-all·duration-300·hover:bg-indigo-700" with 'w-full·rounded-md·bg-indigo-600·px-4·py-2·text-white·transition-all·duration-300·hover:bg-indigo-700'

(prettier/prettier)


[error] 124-124: Unexpected usage of doublequote.

(jsx-quotes)

@akshatnema
Copy link
Member

@Mayaleeeee Please review this design. WDYT? Should we make this design change?

@zalabhavy
Copy link
Contributor Author

@Mayaleeeee ??

@Mayaleeeee
Copy link
Member

Hello @zalabhavy
Thanks for working on this issue.

Could you share the Figma file you worked on with me, please?

I want to be sure you followed our guides in the design system to avoid any issues.

Thanks for the pinging @sambhavgupta0705 @akshatnema

@zalabhavy
Copy link
Contributor Author

@sambhavgupta0705
Copy link
Member

@Mayaleeeee any update?

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.

[FEATURE] Blog Card Improvement
4 participants