Skip to content

fix: redesign 'Latest News' section in Community Newsroom #3982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
May 24, 2025

Conversation

PankajKumardev
Copy link
Contributor

@PankajKumardev PankajKumardev commented Mar 27, 2025

Description

  • Redesigned the "Latest News" section in the Community Newsroom for improved UI/UX on desktop screens.
  • Left-aligned the section title and Twitter follow button for better readability.
  • Implemented a card-based layout for articles, including publication date and headline.
  • Improved responsiveness across all screen sizes.
  • Minor refactor of internal content style management.

Before
image

After
image

Related issue(s)
Fixes #3587

Notes

  • Short descriptions for articles are not included as they aren't in the articles.json.

Summary by CodeRabbit

  • Style
    • Enhanced the visual layout of the Newsroom section for a cleaner, more organized presentation.
    • Improved spacing and alignment of the Twitter link and icon for better readability and user experience.
    • Adjusted the height constraints of the article container for a more streamlined appearance.
    • Modified the width of the AnnouncementHero component for better responsiveness on smaller screens.

Copy link
Contributor

coderabbitai bot commented Mar 27, 2025

Walkthrough

The changes involve modifications to the JSX structure and class attributes in the Newsroom.tsx and AnnouncementHero.tsx files. In Newsroom.tsx, the TextLink and ArrowRight icon classes were adjusted for layout purposes, and the height constraint of the NewsroomArticle component was altered. In AnnouncementHero.tsx, the width of a specific div was modified to improve responsiveness across different screen sizes. Overall, these changes focus on styling without affecting core functionality.

Changes

File(s) Change Summary
components/.../Newsroom.tsx Updated JSX structure and class attributes for layout adjustments; modified TextLink and ArrowRight icon classes, and changed height class for NewsroomArticle.
components/.../AnnouncementHero.tsx Modified width of a div for improved responsiveness on smaller screens while maintaining layout on medium and larger screens.

Assessment against linked issues

Objective Addressed Explanation
Improve UI layout of "Latest News" section (#3587) Only minor formatting and class adjustments were made; major layout redesign isn’t implemented.

Suggested labels

ready-to-merge

Suggested reviewers

  • derberg
  • akshatnema
  • Mayaleeeee
  • sambhavgupta0705
  • vishvamsinh28

Poem

I hopped through lines of code with glee,
Formatting changes as neat as can be,
Tags now dance on separate lines,
CSS tweaks add delightful designs,
A rabbit’s cheer for code so free! 🐇

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm warn config production Use --omit=dev instead.
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '@tisoap/[email protected]',
npm warn EBADENGINE required: { node: '>=16', npm: '^8.0.0' },
npm warn EBADENGINE current: { node: 'v22.9.0', npm: '10.8.3' }
npm warn EBADENGINE }
npm error code E503
npm error 503 Service Unavailable - GET http://10.0.0.28:4873/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz
npm error A complete log of this run can be found in: /.npm/_logs/2025-04-07T06_15_54_495Z-debug-0.log


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6bfd6f7 and 944f905.

📒 Files selected for processing (1)
  • components/campaigns/AnnouncementHero.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 180000ms (3)
  • GitHub Check: Redirect rules - asyncapi-website
  • GitHub Check: Header rules - asyncapi-website
  • GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (1)
components/campaigns/AnnouncementHero.tsx (1)

63-63: Responsive design improvement looks good!

This change adjusts the container width from a fixed w-5/6 to a responsive w-4/5 md:w-5/6, making the component slightly narrower on mobile devices while maintaining the original width on medium and larger screens. This aligns well with the PR objective of improving responsiveness across all screen sizes.

✨ Finishing Touches
  • 📝 Generate Docstrings

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

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

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.

Copy link

netlify bot commented Mar 27, 2025

Deploy Preview for asyncapi-website ready!

Name Link
🔨 Latest commit 225c6a5
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6831aa276cef9400084a7af8
😎 Deploy Preview https://deploy-preview-3982--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
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

🔭 Outside diff range comments (1)
components/newsroom/Newsroom.tsx (1)

24-129: 🛠️ Refactor suggestion

Overall code improvements align with PR objectives but need Prettier fixes.

The changes successfully implement the redesign of the "Latest News" section with improved layout and alignment as per the PR objectives. The card-based layout, better organization, and responsive design improvements are evident in the code. However, all the formatting changes violate the project's Prettier rules and will cause pipeline failures.

I recommend running npm run format or yarn format (whichever is used in the project) to automatically fix all the Prettier issues before merging this PR.

🧰 Tools
🪛 ESLint

[error] 24-27: Replace ⏎··········typeStyle={ParagraphTypeStyle.md}⏎··········className='mx-auto·mt-5·max-w-2xl'⏎········ with ·typeStyle={ParagraphTypeStyle.md}·className='mx-auto·mt-5·max-w-2xl'

(prettier/prettier)


[error] 28-29: Replace ⏎··········a·blog·post?·We·love·community with ·a·blog·post?·We·love·community⏎·········

(prettier/prettier)


[error] 30-33: Replace ⏎············href='https://github.com/asyncapi/website/issues/new?template=blog.md'⏎············target='_blank'⏎·········· with ·href='https://github.com/asyncapi/website/issues/new?template=blog.md'·target='_blank'

(prettier/prettier)


[error] 41-44: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold}

(prettier/prettier)


[error] 66-69: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold}

(prettier/prettier)


[error] 76-80: Replace ⏎··············href='https://twitter.com/AsyncAPISpec'⏎··············className='mt-4·inline-flex·items-center'⏎··············target='_blank'⏎············ with ·href='https://twitter.com/AsyncAPISpec'·className='mt-4·inline-flex·items-center'·target='_blank'

(prettier/prettier)


[error] 102-105: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold}

(prettier/prettier)


[error] 109-110: Delete ⏎···········

(prettier/prettier)


[error] 113-117: Replace ⏎··············href='https://www.youtube.com/c/AsyncAPI'⏎··············className='mt-4'⏎··············target='_blank'⏎············ with ·href='https://www.youtube.com/c/AsyncAPI'·className='mt-4'·target='_blank'

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project

[error] 24-24: Replace ⏎··········typeStyle={ParagraphTypeStyle.md}⏎··········className='mx-auto·mt-5·max-w-2xl'⏎········ with ·typeStyle={ParagraphTypeStyle.md}·className='mx-auto·mt-5·max-w-2xl' prettier/prettier


[error] 28-28: Replace ⏎··········a·blog·post?·We·love·community with ·a·blog·post?·We·love·community⏎········· prettier/prettier


[error] 30-30: Replace ⏎············href='https://github.com/asyncapi/website/issues/new?template=blog.md'⏎············target='_blank'⏎·········· with ·href='https://github.com/asyncapi/website/issues/new?template=blog.md'·target='_blank' prettier/prettier


[error] 41-41: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold} prettier/prettier


[error] 66-66: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold} prettier/prettier


[error] 76-76: Replace ⏎··············href='https://twitter.com/AsyncAPISpec'⏎··············className='mt-4·inline-flex·items-center'⏎··············target='_blank'⏎············ with ·href='https://twitter.com/AsyncAPISpec'·className='mt-4·inline-flex·items-center'·target='_blank' prettier/prettier


[error] 102-102: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold} prettier/prettier


[error] 109-109: Delete ⏎··········· prettier/prettier


[error] 113-113: Replace ⏎··············href='https://www.youtube.com/c/AsyncAPI'⏎··············className='mt-4'⏎··············target='_blank'⏎············ with ·href='https://www.youtube.com/c/AsyncAPI'·className='mt-4'·target='_blank' prettier/prettier

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c51a00c and c5d1d2e.

📒 Files selected for processing (1)
  • components/newsroom/Newsroom.tsx (3 hunks)
🧰 Additional context used
🪛 ESLint
components/newsroom/Newsroom.tsx

[error] 24-27: Replace ⏎··········typeStyle={ParagraphTypeStyle.md}⏎··········className='mx-auto·mt-5·max-w-2xl'⏎········ with ·typeStyle={ParagraphTypeStyle.md}·className='mx-auto·mt-5·max-w-2xl'

(prettier/prettier)


[error] 28-29: Replace ⏎··········a·blog·post?·We·love·community with ·a·blog·post?·We·love·community⏎·········

(prettier/prettier)


[error] 30-33: Replace ⏎············href='https://github.com/asyncapi/website/issues/new?template=blog.md'⏎············target='_blank'⏎·········· with ·href='https://github.com/asyncapi/website/issues/new?template=blog.md'·target='_blank'

(prettier/prettier)


[error] 41-44: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold}

(prettier/prettier)


[error] 66-69: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold}

(prettier/prettier)


[error] 76-80: Replace ⏎··············href='https://twitter.com/AsyncAPISpec'⏎··············className='mt-4·inline-flex·items-center'⏎··············target='_blank'⏎············ with ·href='https://twitter.com/AsyncAPISpec'·className='mt-4·inline-flex·items-center'·target='_blank'

(prettier/prettier)


[error] 102-105: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold}

(prettier/prettier)


[error] 109-110: Delete ⏎···········

(prettier/prettier)


[error] 113-117: Replace ⏎··············href='https://www.youtube.com/c/AsyncAPI'⏎··············className='mt-4'⏎··············target='_blank'⏎············ with ·href='https://www.youtube.com/c/AsyncAPI'·className='mt-4'·target='_blank'

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/newsroom/Newsroom.tsx

[error] 24-24: Replace ⏎··········typeStyle={ParagraphTypeStyle.md}⏎··········className='mx-auto·mt-5·max-w-2xl'⏎········ with ·typeStyle={ParagraphTypeStyle.md}·className='mx-auto·mt-5·max-w-2xl' prettier/prettier


[error] 28-28: Replace ⏎··········a·blog·post?·We·love·community with ·a·blog·post?·We·love·community⏎········· prettier/prettier


[error] 30-30: Replace ⏎············href='https://github.com/asyncapi/website/issues/new?template=blog.md'⏎············target='_blank'⏎·········· with ·href='https://github.com/asyncapi/website/issues/new?template=blog.md'·target='_blank' prettier/prettier


[error] 41-41: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold} prettier/prettier


[error] 66-66: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold} prettier/prettier


[error] 76-76: Replace ⏎··············href='https://twitter.com/AsyncAPISpec'⏎··············className='mt-4·inline-flex·items-center'⏎··············target='_blank'⏎············ with ·href='https://twitter.com/AsyncAPISpec'·className='mt-4·inline-flex·items-center'·target='_blank' prettier/prettier


[error] 102-102: Replace ⏎············level={HeadingLevel.h4}⏎············typeStyle={HeadingTypeStyle.mdSemibold}⏎·········· with ·level={HeadingLevel.h4}·typeStyle={HeadingTypeStyle.mdSemibold} prettier/prettier


[error] 109-109: Delete ⏎··········· prettier/prettier


[error] 113-113: Replace ⏎··············href='https://www.youtube.com/c/AsyncAPI'⏎··············className='mt-4'⏎··············target='_blank'⏎············ with ·href='https://www.youtube.com/c/AsyncAPI'·className='mt-4'·target='_blank' prettier/prettier

🔇 Additional comments (1)
components/newsroom/Newsroom.tsx (1)

87-95: Good implementation of the card-based layout for articles.

This change successfully implements a more flexible layout container for the news articles with proper responsive behavior and height constraints. The max-h-96 class limits the height appropriately for better UI consistency.

This layout change looks good, but I'd recommend verifying how it behaves with different amounts of content. The max-h-96 (24rem/384px) might be restrictive if there are many articles. Does this container provide scrolling for overflow content as intended?

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: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5d1d2e and 0b41441.

📒 Files selected for processing (1)
  • components/newsroom/Newsroom.tsx (2 hunks)
🧰 Additional context used
🪛 ESLint
components/newsroom/Newsroom.tsx

[error] 25-25: Delete ··

(prettier/prettier)

🪛 GitHub Actions: PR testing - if Node project
components/newsroom/Newsroom.tsx

[error] 25-25: Delete ·· prettier/prettier

🔇 Additional comments (3)
components/newsroom/Newsroom.tsx (3)

64-66: Improved Twitter follow button alignment.

The addition of inline-flex items-center class and changing from inline to ml-2 improves the alignment of the Twitter follow button with proper spacing - which directly addresses the PR objective of enhancing the UI.


71-72: Well-implemented card-based layout.

The changes to the container div implement a responsive card-based layout with appropriate flex properties and overflow handling. This directly addresses the PR objective for redesigning the "Latest News" section with a card-based layout.

  • flex-row items-stretch justify-between ensures proper alignment and spacing
  • md:flex provides responsiveness for medium screens and up
  • max-h-96 with overflow-y-auto creates a scrollable container with fixed height

74-74: Improved sizing for article container.

The size-full class (shorthand for w-full and h-full) ensures the NewsroomArticle component takes up the full available space within its container, improving the layout.

Copy link

codecov bot commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (482253b) to head (225c6a5).
Report is 1 commits behind head on master.

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

@PankajKumardev
Copy link
Contributor Author

/rtm

@vishvamsinh28
Copy link
Contributor

@PankajKumardev LGTM

@PankajKumardev
Copy link
Contributor Author

@PankajKumardev LGTM

Than, this PR is going to be merge?

@@ -61,17 +61,17 @@ export default function Newsroom() {
Read about what people are <br /> saying about AsyncAPI
</Paragraph>
<div className='my-5' data-testid='Newsroom-Twitter-Link'>
<TextLink href='https://twitter.com/AsyncAPISpec' className='mt-4' target='_blank'>
<TextLink href='https://twitter.com/AsyncAPISpec' className='mt-4 inline-flex items-center' target='_blank'>
Copy link
Member

Choose a reason for hiding this comment

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

is there any other alternative of using inline-flex

@sambhavgupta0705
Copy link
Member

@Mayaleeeee this is a design change so can you please review this

@Mayaleeeee
Copy link
Member

@Mayaleeeee this is a design change so can you please review this

Is this not part of the GSoC project?

@sambhavgupta0705
Copy link
Member

it is minor fix so we can merge this one
@Mayaleeeee

@sambhavgupta0705
Copy link
Member

Screenshot_2025-04-06-15-27-53-95_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

This is also breaking in your changes
Kindly fix it and see for other changes

@PankajKumardev
Copy link
Contributor Author

it is minor fix so we can merge this one @Mayaleeeee

Hey bro,
Updated AnnouncementHero as you mentioned , I hadn't changed it before, but fixed it now. Also removed the inline styles from the latest News section, just like you suggested.
If anything else needs to be done, just let me know.

After the changes in AnnouncementHero:

WhatsApp Image 2025-04-07 at 11 41 21_a0e756dc

@PankajKumardev
Copy link
Contributor Author

Just wanted to follow up on the PR I updated as per your suggestions. Let me know if there’s anything else you’d like me to address or if it's good to go. Appreciate your time and feedback!

@akshatnema akshatnema merged commit 829bd73 into asyncapi:master May 24, 2025
16 of 18 checks passed
aminoxix pushed a commit to aminoxix/asyncapi-website that referenced this pull request Jun 4, 2025
)

* improve UI responsiveness for 'Latest News' section in Community Newsroom

* fix the preetier part

* refactor: standardize quotation marks in Newsroom component

* liniting fix

* lint fix

* lint fix

* fix: correct indentation in Newsroom component

* Remove duplicate tool rendering in ToolsList using Set for unique titles.

* Remove duplicate tool rendering in ToolsList using Set for unique titles.

* Refactor ToolsList component to simplify rendering and remove duplicate tool handling

* removed inline

* fix: correct typo in Twitter link class name

* fix: adjust width of banner container for better responsiveness

---------

Co-authored-by: Akshat Nema <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] : Comminutiy newsroom latest news section is not ui friendly.
7 participants