From d4fc687951d46a448acbbb96d081303534e27fa1 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 9 Nov 2023 01:27:41 +0100 Subject: [PATCH 1/2] chore: update meetings.json and newsrooom_videos.json (#2301) --- config/newsroom_videos.json | 12 +++---- dashboard.json | 65 +++++++++---------------------------- 2 files changed, 22 insertions(+), 55 deletions(-) diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index adf801b9d94..40a17f976d6 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -5,6 +5,12 @@ "description": "Powered by Restream https://restream.io https://github.com/asyncapi/community/issues/916.", "videoId": "Vm4ZKFb2PVE" }, + { + "image_url": "https://i.ytimg.com/vi/FN5eR1Zqh9c/hqdefault.jpg", + "title": "AsyncAPI Conf on Tour 2023 in Madrid", + "description": "AACoT'23 Madrid Edition streamed live from StageOne at SNGULAR. 00:00 Waiting 57:12 Opening 1:26:07 Everything You Wish ...", + "videoId": "FN5eR1Zqh9c" + }, { "image_url": "https://i.ytimg.com/vi/zSbv4ibqYds/hqdefault.jpg", "title": "Community Meeting(October 17th, 2023)", @@ -22,11 +28,5 @@ "title": "Spec 3.0 docs meeting (September 28, 2023)", "description": "https://github.com/asyncapi/community/issues/885.", "videoId": "qjMojQ-fFew" - }, - { - "image_url": "https://i.ytimg.com/vi/SfATYVwcSQk/hqdefault.jpg", - "title": "Community meeting (September 19, 2023)", - "description": "https://github.com/asyncapi/community/issues/874.", - "videoId": "SfATYVwcSQk" } ] \ No newline at end of file diff --git a/dashboard.json b/dashboard.json index 67eb49ffb10..7127999f2d0 100644 --- a/dashboard.json +++ b/dashboard.json @@ -70,6 +70,22 @@ ], "score": 21.538094156194408 }, + { + "id": "I_kwDOGJ23c85V9C3c", + "isPR": false, + "isAssigned": false, + "title": "Support `referenceIntoComponents` for other components than `message`", + "author": "thake", + "resourcePath": "/asyncapi/bundler/issues/97", + "repo": "asyncapi/bundler", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + } + ], + "score": 20.102221212448114 + }, { "id": "I_kwDOBW5R_c5BIl5P", "isPR": false, @@ -162,30 +178,6 @@ "repo": "asyncapi/community", "labels": [], "score": 14.645904026212197 - }, - { - "id": "PR_kwDOBW5R_c5VmsTR", - "isPR": true, - "isAssigned": true, - "title": "docs: tags in a AsyncAPI document", - "author": "TRohit20", - "resourcePath": "/asyncapi/website/pull/1957", - "repo": "asyncapi/website", - "labels": [ - { - "name": "📑 docs", - "color": "E50E99" - }, - { - "name": "area/docs", - "color": "e50e99" - }, - { - "name": "gsod", - "color": "7B5DB8" - } - ], - "score": 14.07155484871368 } ], "goodFirstIssues": [ @@ -743,21 +735,6 @@ } ] }, - { - "id": "I_kwDOBW5R_c5qCIUD", - "title": "[📑 Docs]: Remove v2 spec links for v3", - "isAssigned": true, - "resourcePath": "/asyncapi/website/issues/1855", - "repo": "asyncapi/website", - "author": "jonaslagoni", - "area": "docs", - "labels": [ - { - "name": "📑 docs", - "color": "E50E99" - } - ] - }, { "id": "I_kwDOBW5R_c5qCG1z", "title": "[📑 Docs]: Adapt github action tooling page for v3", @@ -768,16 +745,6 @@ "area": "Unknown", "labels": [] }, - { - "id": "I_kwDOBW5R_c5qCC_7", - "title": "[📑 Docs]: Adapt frontpage animation for v3", - "isAssigned": true, - "resourcePath": "/asyncapi/website/issues/1853", - "repo": "asyncapi/website", - "author": "jonaslagoni", - "area": "Unknown", - "labels": [] - }, { "id": "I_kwDOFLhIt85o9dDJ", "title": "Add 2023 mentorship directory", From 08c8b9032f0585b5ccd7edc233362b014b9b84c6 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Thu, 9 Nov 2023 10:56:05 +0100 Subject: [PATCH 2/2] feat: add banners for cfp for Bengaluru and Paris (#2218) Co-authored-by: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com>%0ACo-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: akshatnema --- components/campaigns/AnnoucementHero.js | 135 +++++++++++++++--- .../campaignTests/AnnouncementHero.cy.js | 1 - 2 files changed, 115 insertions(+), 21 deletions(-) diff --git a/components/campaigns/AnnoucementHero.js b/components/campaigns/AnnoucementHero.js index 9c539ff1dba..39153357bfc 100644 --- a/components/campaigns/AnnoucementHero.js +++ b/components/campaigns/AnnoucementHero.js @@ -1,8 +1,11 @@ +import { useState, useEffect } from 'react' import Paragraph from '../typography/Paragraph' import Button from '../buttons/Button' import Heading from '../typography/Heading' import Container from '../layout/Container' import AnnouncementRemainingDays from './AnnouncementRamainingDays' +import ArrowLeft from '../icons/ArrowLeft' +import ArrowRight from '../icons/ArrowRight' function shouldShowBanner(cfpDeadline) { const currentDate = new Date(); // G et the current date @@ -15,48 +18,140 @@ function shouldShowBanner(cfpDeadline) { return true; } + export default function AnnouncementHero({ className = '', small = false, hideVideo = false }) { //return null; + + const [activeIndex, setActiveIndex] = useState(0); - const cfpDeadline = '2023-11-30T06:00:00Z' - const showBanner = shouldShowBanner(cfpDeadline); - if (!showBanner) return null; + const cfpDeadlineIndia = '2023-11-30T06:00:00Z' + const cfpDeadlineFrance = '2023-12-6T06:00:00Z' + const showBannerIndia = shouldShowBanner(cfpDeadlineIndia); + const showBannerFrance = shouldShowBanner(cfpDeadlineFrance); - - return ( - + const Banner = ({ title, dateLocation, cfaText, eventName, cfpDeadline, link, city, activeBanner }) => { + return (
- AsyncAPI Conf on Tour 2023 + {title} - - Bangalore Edition + level="h2" + typeStyle="heading-md" > + {city} - 30th of November, 2023 | Bangalore, India + {dateLocation} - +
+ ) + } + + const banners = [ + { + title: "AsyncAPI Conf", + city: "Bengaluru", + dateLocation: "30th of November, 2023 | Bengaluru, India", + cfaText: "Grab Free Tickets", + eventName: "AACoT'23 Bengaluru Edition", + cfpDeadline: cfpDeadlineIndia, + link: "https://opencollective.com/asyncapi/events/asyncapi-conference-on-tour-6b3c0aa1/contribute/aacot-london-edition-66187", + show: showBannerIndia + }, + { + title: "AsyncAPI Conf", + city: "Paris", + dateLocation: "8th of December, 2023 | Paris, France", + cfaText: "Get Free Tickets", + eventName: "AACoT'23 Paris Edition", + cfpDeadline: cfpDeadlineFrance, + link: "https://ticket.apidays.global/event/apidays-paris-2023/8a1f3904-e2be-4c69-a880-37d2ddf1027d/cart?coupon=ASYNCAPICONF23", + show: showBannerFrance + } + ]; + + // Calculate the number of banners that should be displayed + const numberOfVisibleBanners = banners.filter(banner => banner.show).length; + const len = banners.length; + + const goToPrevious = () => { + setActiveIndex((prevIndex) => (prevIndex === 0 ? len - 1 : prevIndex - 1)); + }; + + const goToNext = () => { + setActiveIndex((prevIndex) => (prevIndex === len - 1 ? 0 : prevIndex + 1)); + }; + + const goToIndex = (index) => { + setActiveIndex(index); + }; + + useEffect(() => { + const interval = setInterval(() => setActiveIndex(index => index + 1), 5000); + return () => { + clearInterval(interval); + }; + }, [activeIndex]); + + return ( + +
+
+ +
+
+
+ {banners.map((banner, index) => ( + banner.show && ( + + ) + ))} +
+
+ {banners.map((banner, index) => ( +
goToIndex(index)} + /> + ))} +
+
+
+ +
+
); -} \ No newline at end of file +} diff --git a/cypress/test/components/campaignTests/AnnouncementHero.cy.js b/cypress/test/components/campaignTests/AnnouncementHero.cy.js index 068a20da14e..3d5444d9b20 100644 --- a/cypress/test/components/campaignTests/AnnouncementHero.cy.js +++ b/cypress/test/components/campaignTests/AnnouncementHero.cy.js @@ -24,7 +24,6 @@ describe('AnnouncementHero Component', () => { // Assert the event details cy.get('[data-testid="Paragraph-test"]').should('exist'); cy.get('h2').should('exist'); - cy.get('h3').should('exist'); }); it('should have a link and text for the button', () => {