diff --git a/.all-contributorsrc b/.all-contributorsrc index 42f54a7f3cc7..413b39b877ee 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -454,6 +454,34 @@ "contributions": [ "doc" ] + }, + { + "login": "Florence-Njeri", + "name": "Florence Njeri", + "avatar_url": "https://avatars.githubusercontent.com/u/40742916?v=4", + "profile": "https://florence-njeri.github.io/NjeriPortfolio", + "contributions": [ + "code" + ] + }, + { + "login": "anshgoyalevil", + "name": "Ansh Goyal", + "avatar_url": "https://avatars.githubusercontent.com/u/94157520?v=4", + "profile": "https://ansh.live", + "contributions": [ + "code", + "review" + ] + }, + { + "login": "SumantxD", + "name": "Sumant.xD", + "avatar_url": "https://avatars.githubusercontent.com/u/65810424?v=4", + "profile": "https://github.com/SumantxD", + "contributions": [ + "infra" + ] } ], "contributorsPerLine": 7, diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index f4955c221630..d4ba4a44c40b 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -27,13 +27,13 @@ jobs: repo: context.repo.repo, body: `Hello, @${{ github.actor }}! πŸ‘‹πŸΌ - I'm Genie from the magic lamp. Looks like somebody needs a hand! πŸ†˜ + I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand! At the moment the following comments are supported in pull requests: - - `/ready-to-merge` or `/rtm` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added - - `/do-not-merge` or `/dnm` - This comment will block automerging even if all conditions are met and ready-to-merge label is added - - `/autoupdate` or `/au` - This comment will add `autoupdate` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.` + - \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added + - \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added + - \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.` }) create_help_comment_issue: @@ -51,10 +51,10 @@ jobs: repo: context.repo.repo, body: `Hello, @${{ github.actor }}! πŸ‘‹πŸΌ - I'm Genie from the magic lamp. Looks like somebody needs a hand! πŸ†˜ + I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand! At the moment the following comments are supported in issues: - - `/good-first-issue {js | ts | java | go | docs | design | ci-cd} ` or `/gfi {js | ts | java | go | docs | design | ci-cd} ` - label an issue as a `good first issue`. - example: `/gfi js` or `/good-first-issue ci-cd` - }) + - \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`. + example: \`/gfi js\` or \`/good-first-issue ci-cd\`` + }) \ No newline at end of file diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 137d2fb77e8e..f8cc63d308df 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -32,7 +32,7 @@ jobs: ) id: should_run name: Should Run - run: echo "::set-output name=shouldrun::true" + run: echo "shouldrun=true" >> $GITHUB_OUTPUT - if: steps.should_run.outputs.shouldrun == 'true' uses: actions/checkout@v3 diff --git a/README.md b/README.md index 69905cfd8983..b1e0d4238773 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ --- -[![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-48-orange.svg?style=flat-square)](#contributors-) [![Netlify Status](https://api.netlify.com/api/v1/badges/b2137407-b765-46c4-95b5-a72d9b1592ab/deploy-status)](https://app.netlify.com/sites/asyncapi-website/deploys) @@ -207,6 +207,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Benjamin Rukundo
Benjamin Rukundo

πŸ’» tthijm
tthijm

πŸš‡ Cynthia Peter
Cynthia Peter

πŸ“– + Florence Njeri
Florence Njeri

πŸ’» + Ansh Goyal
Ansh Goyal

πŸ’» πŸ‘€ + Sumant.xD
Sumant.xD

πŸš‡ diff --git a/assets/docs/fragments/how-to-contribute.md b/assets/docs/fragments/how-to-contribute.md new file mode 100644 index 000000000000..932347021a1c --- /dev/null +++ b/assets/docs/fragments/how-to-contribute.md @@ -0,0 +1,23 @@ +## How to contribute to AsyncAPI Docs + +Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; Dev Docs are a **huge** help that benefit the entire OSS ecosystem. At AsyncAPI, we value Doc contributions as much as every other type of contribution. ❀️ + +To get started as a Docs contributor: + +1. Familiarize yourself with our [project's Contribution Guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/asyncapi/.github/blob/master/CODE_OF_CONDUCT.md). + +2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12). + +3. Pick an issue you would like to contribute to and leave a comment introducing yourself. This is also the perfect place to leave any questions you may have on how to get started. + +4. If there is no work done in that Docs issue yet, feel free to open a PR and get started! + +### Tag me in your AsyncAPI Doc PRs + +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) πŸ™. + +### Talk to me + +I want and need to listen πŸ‘‚πŸ½ to all of your perspectives and ideas. Please don't be shy to express to me what you think needs to be documented first or what is missing. πŸ“ There's a lot of good work ahead, but **you** determine _our content roadmap_ because the OSS community needs should always come first.✨ \ No newline at end of file diff --git a/components/TOC.js b/components/TOC.js index 1593c7f8d080..27fd09fd1061 100644 --- a/components/TOC.js +++ b/components/TOC.js @@ -47,7 +47,7 @@ export default function TOC({ href={`#${item.slug}`} key={index} > - {item.content} + {item.content.replaceAll('`', '')} )) } diff --git a/components/campaigns/AnnoucementHero.js b/components/campaigns/AnnoucementHero.js index f85a6cca4e79..ba77845b03bd 100644 --- a/components/campaigns/AnnoucementHero.js +++ b/components/campaigns/AnnoucementHero.js @@ -4,24 +4,24 @@ import Heading from '../typography/Heading' import Container from '../layout/Container' import AnnouncementRemainingDays from './AnnouncementRamainingDays' -function shouldShowBanner() { - const month = new Date().getUTCMonth(); - const year = new Date().getUTCFullYear(); - - //month=4 is May - if (year > 2023 || month !== 4) { +function shouldShowBanner(cfpDeadline) { + const currentDate = new Date(); // Get the current date + const deadline = new Date(cfpDeadline); // Convert the cfpDeadline string to a Date object + + // Check if the current date is after the deadline + if (currentDate > deadline) { return false; } + return true; } - export default function AnnouncementHero({ className = '', small = false, hideVideo = false }) { //return null; - const showBanner = shouldShowBanner(); + const cfpDeadline = '2023-07-28T06:00:00Z' + const showBanner = shouldShowBanner(cfpDeadline); if (!showBanner) return null; - const cfpDeadline = '2023-05-31T06:00:00Z' return ( @@ -42,15 +42,15 @@ export default function AnnouncementHero({ className = '', small = false, hideVi level="h3" typeStyle="heading-sm" > - Madrid Edition + London Edition - October, 2023 | Madrid, Spain + 20th of September, 2023 | London, UK - +
diff --git a/components/docs/DocsCards.js b/components/docs/DocsCards.js index 39aa1bd733af..8262e37ac97f 100644 --- a/components/docs/DocsCards.js +++ b/components/docs/DocsCards.js @@ -6,10 +6,12 @@ import { buckets } from '../data/buckets'; export function DocsCards() { return ( -
+
{buckets.map(card => ( + ))} +
); } @@ -17,17 +19,17 @@ export function DocsCards() { function Card({ title, description, link, className, Icon }) { return ( - +
-
+
-
- +
+
{title}
diff --git a/components/editor/MonacoEditorWrapper.js b/components/editor/MonacoEditorWrapper.js deleted file mode 100644 index f260efd014a7..000000000000 --- a/components/editor/MonacoEditorWrapper.js +++ /dev/null @@ -1,116 +0,0 @@ -import { useEffect, useRef } from 'react' -import PropTypes from 'prop-types'; -import Editor, { monaco } from '@monaco-editor/react' -import { debounce } from 'lodash' - -let editor -let Monaco - -const renderHighlightedLines = (highlightedLines) => { - return renderHighlightedRanges(highlightedLines.map(lineNumber => ({ - startLine: lineNumber, - startCol: 0, - endLine: lineNumber, - endCol: 0, - options: { - isWholeLine: true, - } - }))) -} - -const renderHighlightedRanges = (highlightedRanges) => { - return editor.deltaDecorations(editor.getModel().getAllDecorations(), highlightedRanges.map(range => ({ - range: new Monaco.Range(range.startLine, range.startCol, range.endLine, range.endCol), - options: { - className: 'bg-code-editor-dark', - marginClassName: 'bg-code-editor-dark', - ...range.options - }, - }))) -} - -export default function MonacoEditorWrapper ({ - language, - theme = 'asyncapi-theme', - onChange = () => {}, - value, - highlightedLines = [], - highlightedRanges = [], - updateHighlightOnChange = false, - options, - editorDidMount, - ...props -}) { - const previousValue = useRef(value); - const debouncedOnChange = debounce(onChange, 500) - - const handleEditorDidMount = (getValue, ed) => { - editor = ed - renderHighlightedLines(highlightedLines) - renderHighlightedRanges(highlightedRanges) - - editor.onDidChangeModelContent(ev => { - const currentValue = editor.getValue() - if (currentValue !== previousValue.current) { - previousValue.current = currentValue - const value = debouncedOnChange(ev, currentValue) - - if (typeof value === 'string') { - if (currentValue !== value) { - editor.setValue(value) - } - } - } - }); - - editorDidMount(getValue, editor) - } - - useEffect(() => { - monaco - .init() - .then(monacoInstance => { - Monaco = monacoInstance - monacoInstance.editor.defineTheme('asyncapi-theme', { - base: 'vs-dark', - inherit: true, - rules: [], - colors: { - 'editor.background': '#252f3f', - 'editor.lineHighlightBackground': '#1f2a37', - }, - rules: [{ token: '', background: '#252f3f' }], - }) - }) - .catch(console.error) - }, []) - - useEffect(() => { - if (editor && updateHighlightOnChange) { - renderHighlightedLines(highlightedLines) - renderHighlightedRanges(highlightedRanges) - } - }, [highlightedLines, highlightedRanges]) - - return ( - - ) -} - -MonacoEditorWrapper.propTypes = { - value: PropTypes.string, - editorDidMount: PropTypes.func, - onChange: PropTypes.func, -}; - -MonacoEditorWrapper.defaultProps = { - editorDidMount: () => {}, - onChange: () => {}, -}; diff --git a/components/features/FeatureList.js b/components/features/FeatureList.js new file mode 100644 index 000000000000..c8fec12b78c0 --- /dev/null +++ b/components/features/FeatureList.js @@ -0,0 +1,50 @@ +export const features = [ + { + name: "Specification", + description: + "Allows you to define the interfaces of asynchronous APIs and is protocol agnostic.", + links: [{ label: "Documentation", href: "docs/specifications/latest", id:'whyasyncapi-spec-documentation-link' }], + }, + { + name: "Document APIs", + description: + "Use our tools to generate documentation at the build level, on a server, and on a client.", + links: [ + { + label: "HTML Template", + href: "https://github.com/asyncapi/html-template", + id:'whyasyncapi-apis-htmltemplate-link' + }, + { + label: "React Component", + href: "https://github.com/asyncapi/asyncapi-react/", + id:'whyasyncapi-apis-reactcomponents-link' + }, + ], + }, + { + name: "Code Generation", + description: + "Generate documentation, Code (TypeScript, Java, C#, etc), and more out of your AsyncAPI files.", + links: [{ label: "Generator", href: "tools/generator", id:'whyasyncapi-generation-generator-link' }, { label: "Modelina", href: "tools/modelina", id:'whyasyncapi-generation-modelina-link' }], + }, + { + name: "Community", + description: "We're a community of great people who are passionate about AsyncAPI and event-driven architectures.", + links: [ + { label: "Join our Slack", href: "https://asyncapi.com/slack-invite", id:'whyasyncapi-community-slack-link' }, + ], + }, + { + name: "Open Governance", + description: + "Our Open-Source project is part of Linux Foundation and works under an Open Governance model.", + links: [{ label: "Read more about Open Governance", href: "blog/governance-motivation", id:'whyasyncapi-governance-more-link' }, { label: "TSC Members", href: "community/tsc", id:'whyasyncapi-governance-tsc-link' }], + }, + { + name: "And much more...", + description: + "We have many different tools and welcome you to explore our ideas and propose new ideas to AsyncAPI.", + links: [{ label: "View GitHub Discussions", href: "https://github.com/asyncapi/community/discussions", id:'whyasyncapi-muchmore-github-link' }], + }, + ]; \ No newline at end of file diff --git a/components/features/index.jsx b/components/features/index.jsx index f6c2627ebc9d..3ec6b0d00fba 100644 --- a/components/features/index.jsx +++ b/components/features/index.jsx @@ -2,57 +2,7 @@ import Heading from "../typography/Heading"; import Paragraph from "../typography/Paragraph"; import TextLink from "../typography/TextLink"; import Link from 'next/link' - -const features = [ - { - name: "Specification", - description: - "Allows you to define the interfaces of asynchronous APIs and is protocol agnostic.", - links: [{ label: "Documentation", href: "docs/specifications/latest", id:'whyasyncapi-spec-documentation-link' }], - }, - { - name: "Document APIs", - description: - "Use our tools to generate documentation at the build level, on a server, and on a client.", - links: [ - { - label: "HTML Template", - href: "https://github.com/asyncapi/html-template", - id:'whyasyncapi-apis-htmltemplate-link' - }, - { - label: "React Component", - href: "https://github.com/asyncapi/asyncapi-react/", - id:'whyasyncapi-apis-reactcomponents-link' - }, - ], - }, - { - name: "Code Generation", - description: - "Generate documentation, Code (TypeScript, Java, C#, etc), and more out of your AsyncAPI files.", - links: [{ label: "Generator", href: "tools/generator", id:'whyasyncapi-generation-generator-link' }, { label: "Modelina", href: "tools/modelina", id:'whyasyncapi-generation-modelina-link' }], - }, - { - name: "Community", - description: "We're a community of great people who are passionate about AsyncAPI and event-driven architectures.", - links: [ - { label: "Join our Slack", href: "https://asyncapi.com/slack-invite", id:'whyasyncapi-community-slack-link' }, - ], - }, - { - name: "Open Governance", - description: - "Our Open-Source project is part of Linux Foundation and works under an Open Governance model.", - links: [{ label: "Read more about Open Governance", href: "blog/governance-motivation", id:'whyasyncapi-governance-more-link' }, { label: "TSC Members", href: "community/tsc", id:'whyasyncapi-governance-tsc-link' }], - }, - { - name: "And much more...", - description: - "We have many different tools and welcome you to explore our ideas and propose new ideas to AsyncAPI.", - links: [{ label: "View GitHub Discussions", href: "https://github.com/asyncapi/community/discussions", id:'whyasyncapi-muchmore-github-link' }], - }, -]; +import { features } from "./FeatureList"; export default function Features() { return ( @@ -69,14 +19,16 @@ export default function Features() { Improving the current state of Event-Driven Architectures (EDA)
-