-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: enhance ambassador card social media buttons #5113
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
Open
yashdarekar17
wants to merge
21
commits into
asyncapi:master
Choose a base branch
from
yashdarekar17:yashdarekar1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+44
−27
Open
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a368d89
added social media logo instead of text
yashdarekar17 b05ada8
Merge branch 'master' into yashdarekar
asyncapi-bot 15b639c
fixed linting issue
yashdarekar17 d8a5063
fixed linting issue
yashdarekar17 5a1fd37
fixed linting issue3
yashdarekar17 4984ea4
fixed linting issue
yashdarekar17 fd36f95
fixed linting issue
yashdarekar17 5269193
fixed linting issue
yashdarekar17 dfd65ee
fixed linting issue4
yashdarekar17 f6981d9
fixed linting issue4
yashdarekar17 77b8faa
fixed linting issue4
yashdarekar17 dd1214b
fixed linting issue4
yashdarekar17 2e7bf8c
fixed linting issue4
yashdarekar17 2a7c4a5
fixed lint error
yashdarekar17 21c45af
fixed lint error
yashdarekar17 dc2e896
lint error fixed
yashdarekar17 0b67095
lint error fixed
yashdarekar17 88a3588
lint error fixed
yashdarekar17 77032b2
fixed critical errors by coderabitai
yashdarekar17 35c5ad3
changed social media links to logo
yashdarekar17 a770077
final commit
yashdarekar17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,9 @@ import type { Ambassador } from '@/types/pages/community/Community'; | |
| import { HeadingTypeStyle } from '@/types/typography/Heading'; | ||
|
|
||
| import Button from '../../../components/buttons/Button'; | ||
| import IconGithub from '../../../components/icons/Github'; | ||
| import IconLinkedIn from '../../../components/icons/LinkedIn'; | ||
| import IconTwitter from '../../../components/icons/Twitter'; | ||
| import GenericLayout from '../../../components/layout/GenericLayout'; | ||
| import NewsletterSubscribe from '../../../components/NewsletterSubscribe'; | ||
| import Heading from '../../../components/typography/Heading'; | ||
|
|
@@ -21,7 +24,6 @@ export function addAdditionalUserInfo(user: Ambassador) { | |
| ...user | ||
| }; | ||
|
|
||
| // add social links | ||
| if (userData.github) { | ||
| userData.githubUrl = `https://www.github.com/${userData.github}`; | ||
| } | ||
|
|
@@ -32,8 +34,6 @@ export function addAdditionalUserInfo(user: Ambassador) { | |
| userData.twitterUrl = `https://www.twitter.com/${userData.twitter}`; | ||
| } | ||
|
|
||
| // add img url | ||
| // github redirects to avatar url using `https://www.github.com/<username>.png` | ||
| userData.img = `${userData.githubUrl}.png`; | ||
|
|
||
| return userData; | ||
|
|
@@ -49,11 +49,15 @@ export default function Index() { | |
| ['name'] | ||
| ); | ||
|
|
||
| // Variable to handle long URL and pass max-len linter | ||
| const ambassadorProgramUrl = | ||
| 'https://github.com/asyncapi/community/blob/master/docs/020-governance-and-policies/AMBASSADOR_PROGRAM.md'; | ||
|
|
||
| return ( | ||
| <GenericLayout title='AsyncAPI Ambassador Program' description='The AsyncAPI Ambassador Program' image={image} wide> | ||
| <div className='flex flex-col items-center justify-between lg:flex-row' data-testid='Ambassadors-main'> | ||
| <div className='w-full text-center lg:w-[45%] lg:text-left' data-testid='Ambassadors-content'> | ||
| <h1 className='mt-10 text-3xl font-semibold md:text-4xl lg:text-5xl' data-testid='Ambassadors-title'> | ||
| <h1 className='mt-10 text-3xl font-semibold md:text-4xl lg:text-5xl' data-testid='Ambassadors-title'> | ||
| Teachers. Champions. <span className='countdown-text-gradient'>Ambassadors!</span> | ||
| </h1> | ||
| <Heading typeStyle={HeadingTypeStyle.bodyLg} textColor='text-gray-700' className='mt-5 text-slate-500'> | ||
|
|
@@ -64,13 +68,13 @@ export default function Index() { | |
| <Button | ||
| className='mt-10 block text-center focus:outline-none md:inline-block' | ||
| text='Become an AsyncAPI Ambassador' | ||
| href='https://github.com/asyncapi/community/blob/master/docs/020-governance-and-policies/AMBASSADOR_PROGRAM.md' | ||
| href={ambassadorProgramUrl} | ||
| target='_blank' | ||
| /> | ||
| </div> | ||
| </div> | ||
| <div className='hidden w-1/2 lg:block'> | ||
| <img src='/img/homepage/ambassador-cover.svg' alt='ambassador-cover' className='w-full' /> | ||
| <img src='/img/homepage/ambassador-cover.svg' alt='ambassador-cover' className='full' /> | ||
| </div> | ||
| </div> | ||
| <div className='mt-20'> | ||
|
|
@@ -123,11 +127,8 @@ export default function Index() { | |
| <div data-testid='Ambassadors-members-country'>{ambassador.country}</div> | ||
| </div> | ||
| <Link href={`ambassadors/${ambassador.github}`} as={`ambassadors/${ambassador.github}`}> | ||
| <div className='p-2'> | ||
| <div | ||
| className='h-auto w-full cursor-pointer rounded-md bg-center' | ||
| data-testid='Ambassadors-members-img' | ||
| > | ||
| <div className='p-2 cursor-pointer'> | ||
| <div className='h-auto w-full rounded-md bg-center' data-testid='Ambassadors-members-img'> | ||
| <img | ||
| src={ambassador.img} | ||
| alt={ambassador.name} | ||
|
|
@@ -140,22 +141,38 @@ export default function Index() { | |
| </div> | ||
| <div className='flex h-full flex-col justify-between'> | ||
| <div className='p-2 text-sm'>{ambassador.bio}</div> | ||
| <div className='flex border-t p-2' data-testid='Ambassadors-members-socials'> | ||
| <a | ||
| href={ambassador.twitterUrl} | ||
| target='_blank' | ||
| rel='noreferrer' | ||
| className='underline' | ||
| data-testid='Ambassadors-members-twitter' | ||
| > | ||
| Twitter ↗ | ||
| </a> | ||
| <a href={ambassador.githubUrl} target='_blank' rel='noreferrer' className='ml-3 underline'> | ||
| Github ↗ | ||
| </a> | ||
| <a href={ambassador.linkedinUrl} target='_blank' rel='noreferrer' className='ml-3 underline'> | ||
| Linkedin ↗ | ||
| </a> | ||
| <div className='flex border-t p-2 gap-4' data-testid='Ambassadors-members-socials'> | ||
| {ambassador.twitterUrl && ( | ||
| <a | ||
| href={ambassador.twitterUrl} | ||
| target='_blank' | ||
| rel='noreferrer' | ||
| className='text-gray-500 hover:text-black transition-colors' | ||
| data-testid='Ambassadors-members-twitter' | ||
| > | ||
| <IconTwitter className='h-5 w-5 fill-current' /> | ||
| </a> | ||
|
Comment on lines
+145
to
+154
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Social icon links missing accessible labels. Screen readers will announce these links as empty since there's no visible text and no ♿ Proposed fix — add aria-labels to all three social links <a
href={ambassador.twitterUrl}
target='_blank'
rel='noreferrer'
className='text-gray-500 hover:text-black transition-colors'
data-testid='Ambassadors-members-twitter'
+ aria-label={`${ambassador.name} on Twitter`}
>
<a
href={ambassador.githubUrl}
target='_blank'
rel='noreferrer'
className='text-gray-500 hover:text-black transition-colors'
+ aria-label={`${ambassador.name} on GitHub`}
>
<a
href={ambassador.linkedinUrl}
target='_blank'
rel='noreferrer'
className='text-gray-500 hover:text-[`#0077b5`] transition-colors'
+ aria-label={`${ambassador.name} on LinkedIn`}
>🤖 Prompt for AI Agents |
||
| )} | ||
| {ambassador.githubUrl && ( | ||
| <a | ||
| href={ambassador.githubUrl} | ||
| target='_blank' | ||
| rel='noreferrer' | ||
| className='text-gray-500 hover:text-black transition-colors' | ||
| > | ||
| <IconGithub className='h-5 w-5 fill-current' /> | ||
| </a> | ||
| )} | ||
| {ambassador.linkedinUrl && ( | ||
| <a | ||
| href={ambassador.linkedinUrl} | ||
| target='_blank' | ||
| rel='noreferrer' | ||
| className='text-gray-500 hover:text-[#0077b5] transition-colors' | ||
| > | ||
| <IconLinkedIn className='h-5 w-5 fill-current' /> | ||
| </a> | ||
| )} | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
@@ -205,7 +222,7 @@ export default function Index() { | |
| <Button | ||
| className='mt-5 block text-center focus:outline-none md:mt-10 md:inline-block md:w-[48%]' | ||
| text='Become an Ambassador now' | ||
| href='https://github.com/asyncapi/community/blob/master/docs/020-governance-and-policies/AMBASSADOR_PROGRAM.md' | ||
| href={ambassadorProgramUrl} | ||
| target='_blank' | ||
| /> | ||
| <Button | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.