diff --git a/.all-contributorsrc b/.all-contributorsrc index 8f3a49ee524f..c1c76d9cdfe0 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -61,10 +61,10 @@ ] }, { - "login": "alequetzalli", - "name": "Alejandra Quetzalli ", + "login": "quetzalliwrites", + "name": "Quetzalli Writes", "avatar_url": "https://avatars.githubusercontent.com/u/19964402?v=4", - "profile": "https://github.com/alequetzalli", + "profile": "https://github.com/quetzalliwrites", "contributions": [ "doc", "review", diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 000000000000..74b51b881dd3 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,35 @@ +language: "en-US" +reviews: + high_level_summary: true + tools: + markdownlint: + enabled: true + biome: + enabled: true + github-checks: + enabled: true + timeout_ms: 180000 + languagetool: + enabled: true + enabled_only: false + level: default + hadolint: + enabled: true + yamllint: + enabled: true + gitleaks: + enabled: true + eslint: + enabled: true + actionlint: + enabled: true + semgrep: + enabled: true +knowledge_base: + opt_out: false + learnings: + scope: "local" + issues: + scope: "local" + pull_requests: + scope: "local" diff --git a/.coderrabbit.yml b/.coderrabbit.yml deleted file mode 100644 index e673f66e890d..000000000000 --- a/.coderrabbit.yml +++ /dev/null @@ -1,45 +0,0 @@ -language: "en-US" -reviews: - profile: "assertive" - request_changes_workflow: false - high_level_summary: true - poem: true - review_status: true - auto_review: - enabled: true -tools: - spellcheck: - enabled: true - markdownlint: - enabled: true - biome: - enabled: true - github-checks: - enabled: true - timeout_ms: 180000 - languagetool: - enabled: true - enabled_only: false - level: default - hadolint: - enabled: true - yamllint: - enabled: true - gitleaks: - enabled: true - eslint: - enabled: true - actionlint: - enabled: true - semgrep: - enabled: true -chat: - auto_reply: true -knowledge_base: - opt_out: false - learnings: - scope: "local" - issues: - scope: "local" - pull_requests: - scope: "local" diff --git a/README.md b/README.md index 5d6eab484fea..5f153826f3c7 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ After cloning repository to your local, perform the following steps from the roo #### Steps: 1. Build the Docker image: ```bash - docker build -t asyncapi-website .` + docker build -t asyncapi-website . ``` 2. Start the container: ```bash @@ -336,7 +336,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Fran Méndez
Fran Méndez

💻 📖 🐛 🎨 🚧 🚇 🤔 👀 📝 Lukasz Gornicki
Lukasz Gornicki

💻 📖 🐛 🎨 🚧 🚇 🤔 👀 📝 Maciej Urbańczyk
Maciej Urbańczyk

💻 📖 🐛 🎨 🚧 🚇 🤔 👀 📝 - Alejandra Quetzalli
Alejandra Quetzalli

📖 👀 📢 + Quetzalli Writes
Quetzalli Writes

📖 👀 📢 Aayush Kumar Sahu
Aayush Kumar Sahu

💻 🐛 🎨 David Boyne
David Boyne

💻 🎨 Jesse Menning
Jesse Menning

📝 diff --git a/assets/docs/fragments/contribution-notes.md b/assets/docs/fragments/contribution-notes.md index 5c10d80c480f..64f0015e4d89 100644 --- a/assets/docs/fragments/contribution-notes.md +++ b/assets/docs/fragments/contribution-notes.md @@ -11,4 +11,4 @@ To get started as a Docs contributor: Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear! -Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`alequetzalli`](https://github.com/alequetzalli) 🐙. +Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`quetzalliwrites`](https://github.com/quetzalliwrites) 🐙. diff --git a/components/Calendar.tsx b/components/Calendar.tsx index 767f29648809..5a5bfd2ba134 100644 --- a/components/Calendar.tsx +++ b/components/Calendar.tsx @@ -28,10 +28,16 @@ export default function Calendar({ className = '', size }: ICalendarProps) { const CALENDAR_URL = 'https://calendar.google.com/calendar/embed?src=c_q9tseiglomdsj6njuhvbpts11c%40group.calendar.google.com&ctz=UTC'; - const eventsExist = eventsData.length > 0; + const currentDate = new Date(); + const eventsExist = eventsData?.filter((event: IEvent) => moment(event.date).isAfter(currentDate)).length > 0; return ( -
+
{t('calendar.title')} @@ -43,7 +49,7 @@ export default function Calendar({ className = '', size }: ICalendarProps) { {moment(event.date).format('D')}
-

{event.title}

+

{event.title}

{moment(event.date).local().format('LLLL')} UTC {moment(event.date).local().format('Z')} @@ -53,13 +59,12 @@ export default function Calendar({ className = '', size }: ICalendarProps) { ))} - {eventsExist ? ( -

+
+ {!eventsExist &&
{t('calendar.noMeetingsMessage')}
} +
- ) : ( -
{t('calendar.noMeetingsMessage')}
- )} +
); } diff --git a/components/MDX/MDX.tsx b/components/MDX/MDX.tsx index 32bdb94f9783..c3ead83b61b3 100644 --- a/components/MDX/MDX.tsx +++ b/components/MDX/MDX.tsx @@ -1,7 +1,7 @@ import { MDXProvider as CoreMDXProvider } from '@mdx-js/react'; import mermaid from 'mermaid'; import Link from 'next/link'; -import React, { useLayoutEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { TwitterDMButton, TwitterFollowButton, @@ -97,7 +97,7 @@ function MermaidDiagram({ graph }: MermaidDiagramProps) { /** * @description Renders the Mermaid diagram. */ - useLayoutEffect(() => { + useEffect(() => { if (!graph) { return; } diff --git a/components/NewsletterSubscribe.tsx b/components/NewsletterSubscribe.tsx index 9b4a983bc69b..3d9e0863dd69 100644 --- a/components/NewsletterSubscribe.tsx +++ b/components/NewsletterSubscribe.tsx @@ -1,4 +1,3 @@ -import { useTranslation } from 'next-i18next'; import React, { useState } from 'react'; import IconCircularLoader from '@/components/icons/CircularLoader'; @@ -6,6 +5,7 @@ import { ButtonType } from '@/types/components/buttons/ButtonPropsType'; import { InputTypes } from '@/types/components/InputBoxPropsType'; import { HeadingLevel, HeadingTypeStyle } from '@/types/typography/Heading'; +import { useTranslation } from '../utils/i18n'; import Button from './buttons/Button'; import InputBox from './InputBox'; import Loader from './Loader'; @@ -26,6 +26,7 @@ interface NewsletterSubscribeProps { title?: string; subtitle?: string; type?: string; + errorSubtitle?: string; } /** @@ -37,19 +38,21 @@ interface NewsletterSubscribeProps { * @param {string} props.title - The title of the Subscribe card. * @param {string} props.subtitle - The subtitle of the Subscribe card. * @param {string} props.type - The type of subscription. + * @param {string} props.errorSubtitle - The error subtitle to be displayed. */ export default function NewsletterSubscribe({ className = 'p-8 text-center text-black', dark = false, title = 'Subscribe to our newsletter to receive news about AsyncAPI.', subtitle = 'We respect your inbox. No spam, promise ✌️', - type = 'Newsletter' + type = 'Newsletter', + errorSubtitle = 'Subscription failed, please let us know about it by submitting a bug' }: NewsletterSubscribeProps) { const [email, setEmail] = useState(''); const [name, setName] = useState(''); const [status, setStatus] = useState(FormStatus.NORMAL); - const { t } = useTranslation('common'); + const { t, ready } = useTranslation('common', { keyPrefix: 'newsletterCTA' }); const headTextColor = dark ? 'text-white' : ''; const paragraphTextColor = dark ? 'text-gray-300' : ''; @@ -94,10 +97,10 @@ export default function NewsletterSubscribe({ return (
- {t('newsletterCTA.successTitle')} + {ready ? t('successTitle') : 'Thank you for subscribing!'} - {t('newsletterCTA.subtitle')} + {ready ? t('subtitle') : subtitle}
); @@ -107,12 +110,12 @@ export default function NewsletterSubscribe({ return (
- {t('newsletterCTA.errorTitle')} + {ready ? t('errorTitle') : 'Something went wrong'} - {t('newsletterCTA.errorSubtitle')}{' '} + {ready ? t('errorSubtitle') : errorSubtitle}{' '} - {t('newsletterCTA.errorLinkText')} + {ready ? t('errorLinkText') : 'here'}
@@ -122,10 +125,10 @@ export default function NewsletterSubscribe({ return (
- {title} + {ready ? t('title') : title} - {subtitle} + {ready ? t('subtitle') : subtitle} {status === 'loading' ? ( } dark={dark} /> @@ -134,20 +137,20 @@ export default function NewsletterSubscribe({