Skip to content

Conversation

@Recxsmacx
Copy link

@Recxsmacx Recxsmacx commented Mar 10, 2025

Fixes #3828
Able to find the social handles of the ambassadors and updated their values so that they can redirect them to the correct locations

Fixes #3828

Remove the Twitter link for the ambassador without a Twitter account.

* Update `config/AMBASSADORS_MEMBERS.json` to remove the `twitter` field for the ambassador without a Twitter account.
* Modify `pages/community/ambassadors/index.tsx` to add a conditional check to only generate a Twitter URL if the ambassador has a Twitter account.
* Update `pages/community/ambassadors/index.tsx` to add a conditional check to only display the Twitter link if the profile has a Twitter account.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2025

Walkthrough

This update adds a Twitter handle entry for Manuel Ottlik in the ambassadors configuration JSON file. Additionally, it modifies the rendering logic in the community ambassadors page to always display the Twitter link, regardless of the validity of the URL. Furthermore, it includes corrections in the AsyncAPI document generation functions and updates to the formatting of hook descriptions in the documentation.

Changes

File Summary
config/AMBASSADORS_MEMBERS.json Added the "twitter": "ManuelOttlik" field for Manuel Ottlik.
pages/community/ambassadors/index.tsx Updated rendering logic to always display the Twitter anchor tag, regardless of ambassador.twitterUrl's truthiness.
markdown/docs/tools/generator/asyncapi-document.md Corrected syntax in createAsyncapiFile function, fixing path resolution and adding a closing brace.
markdown/docs/tools/generator/hooks.md Updated descriptions and formatting for hook types, including modifying URLs in the "Arguments" column.
markdown/docs/tools/generator/migration-nunjucks-react.md Updated hyperlink format by removing .md extension from the link to the file templates guide.

Possibly related PRs

Suggested labels

autoapproved, ready-to-merge, autoupdate

Suggested reviewers

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

Poem

I'm a little rabbit, swift and true,
Hopping through code with changes anew.
Twitter fields added, a link to embrace,
Clean config and UI, an elegant space.
With a twitch of my nose, I celebrate with glee 🐇✨!


📜 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 8824427 and 18184ea.

📒 Files selected for processing (3)
  • pages/community/ambassadors/index.tsx (2 hunks)
  • pages/community/ambassadors/index.tsx (1 hunks)
  • pages/community/ambassadors/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • pages/community/ambassadors/index.tsx
  • pages/community/ambassadors/index.tsx
  • pages/community/ambassadors/index.tsx
⏰ 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

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

@netlify
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 03110f4
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67d7d516c39fc20008affabd
😎 Deploy Preview https://deploy-preview-3859--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.

@codecov
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (07ea7df) to head (03110f4).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3859   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          667       667           
  Branches       113       113           
=========================================
  Hits           667       667           

☔ 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: 0

🧹 Nitpick comments (1)
pages/community/ambassadors/index.tsx (1)

32-32: Simplify the Twitter URL assignment

There's a redundant conditional check in this line. Since this code is already inside an if (userData.twitter) block, we know userData.twitter is truthy at this point, making the additional check unnecessary.

- userData.twitterUrl = userData.twitter ? `https://www.twitter.com/${userData.twitter}` : null;
+ userData.twitterUrl = `https://www.twitter.com/${userData.twitter}`;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d18e10c and fbb1bed.

📒 Files selected for processing (2)
  • config/AMBASSADORS_MEMBERS.json (0 hunks)
  • pages/community/ambassadors/index.tsx (2 hunks)
💤 Files with no reviewable changes (1)
  • config/AMBASSADORS_MEMBERS.json
⏰ Context from checks skipped due to timeout of 180000ms (1)
  • GitHub Check: Lighthouse CI
🔇 Additional comments (1)
pages/community/ambassadors/index.tsx (1)

144-154: Great implementation of conditional Twitter link rendering

The conditional rendering of the Twitter link ensures that ambassadors without a Twitter account don't have an empty or broken link displayed, which improves the user experience.

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)
markdown/docs/tools/generator/hooks.md (1)

14-16: Update Relative URLs and Link Descriptions.
The table rows for the hooks generate:before, generate:after, and setFileTemplateName have been updated to use relative URLs (e.g., (api) instead of an absolute link) and a refined description for setFileTemplateName. This change improves consistency and clarity in the documentation. Please verify that the relative links resolve as intended and that the description now accurately references file-templates (omitting the .md extension) to align with the updated documentation.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fbb1bed and 8824427.

📒 Files selected for processing (5)
  • config/AMBASSADORS_MEMBERS.json (0 hunks)
  • config/AMBASSADORS_MEMBERS.json (1 hunks)
  • markdown/docs/tools/generator/asyncapi-document.md (1 hunks)
  • markdown/docs/tools/generator/hooks.md (1 hunks)
  • markdown/docs/tools/generator/migration-nunjucks-react.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • markdown/docs/tools/generator/migration-nunjucks-react.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • config/AMBASSADORS_MEMBERS.json
  • config/AMBASSADORS_MEMBERS.json
⏰ Context from checks skipped due to timeout of 180000ms (1)
  • GitHub Check: Lighthouse CI
🔇 Additional comments (2)
markdown/docs/tools/generator/asyncapi-document.md (2)

71-71: Corrected Path Resolution

The updated path.resolve call correctly removes the extraneous single quote. The use of path.resolve('./', outputFileName) ensures that the file path is properly constructed without any syntax errors.


74-74: Proper Function Closure

The addition of the closing brace } properly terminates the createAsyncapiFile function. This fix resolves the syntax issue that previously could have led to runtime errors.

@Recxsmacx
Copy link
Author

I was able to find their id>

Copy link
Collaborator

@TRohit20 TRohit20 left a comment

Choose a reason for hiding this comment

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

But @sambhavgupta0705 Do we really need this PR to be merged? It could be that Manuel had not given his twitter ID on purpose or for a reason.

Plus, I clearly remember, we have one PR currently on the verge of being merged which essentially displays only the available info on the card without blank links to click on. For instance, in this case, if Manuel didn't provide a twitter/X ID, on his display card on the website, 'Twitter' Icon/Link will not be displayed. So I think this PR might be redundant. WDYT?

@Recxsmacx
Copy link
Author

Screenshot_2025-03-17-13-08-44-31_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

@sambhavgupta0705 it's just an update if manuel didn't provided his x account we can remove it too? Or we can add another social link of everyone like mail-id?

@Recxsmacx
Copy link
Author

Recxsmacx commented Mar 17, 2025

@sambhavgupta0705 @TRohit20 or it - might be possible that he's not active on X either we can remove the X button or add value in it either we can replace it with his mail id

@sambhavgupta0705
Copy link
Member

sambhavgupta0705 commented Mar 17, 2025

But @sambhavgupta0705 Do we really need this PR to be merged? It could be that Manuel had not given his twitter ID on purpose or for a reason.

Yes that can be a reason ,and I feel we should remove the Twitter link ,if he raise a concern about it then we can create another PR for this

Plus, I clearly remember, we have one PR currently on the verge of being merged which essentially displays only the available info on the card without blank links to click on. For instance, in this case, if Manuel didn't provide a twitter/X ID, on his display card on the website, 'Twitter' Icon/Link will not be displayed. So I think this PR might be redundant. WDYT?

Yes ,so should we keep this on hold

@sambhavgupta0705
Copy link
Member

@TRohit20 I think we should not do anything we social links and let the community managers look after this

IMO we should close all issues like this

@TRohit20
Copy link
Collaborator

Totally agreed. That is the reason I raised this concern now. This is not entirely to our discretion to decide and merge tbh. Due to which, I am actually closing this PR and the reference issue.

@TRohit20 TRohit20 closed this Mar 17, 2025
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] Remove Ambassador's twitter link without a Twitter Account

4 participants