From e92e7663c1c80b3cabd5baa65156d9846a603041 Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Mon, 7 Aug 2023 19:10:54 +0200 Subject: [PATCH 1/7] Fix firefox modal bug --- .../8/Releases/components/index.tsx | 6 +- .../LaunchWeek/8/Releases/index.tsx | 127 ++++++++---------- 2 files changed, 63 insertions(+), 70 deletions(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx index 4fb7a645636..77dad12f22b 100644 --- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx @@ -167,7 +167,9 @@ export const AccordionHeader = ({ videoThumbnail?: string }) => (
{shippable && shipped && youtube_id && ( -
+
- - } - disabled={true} - className="h-[79px] hover:cursor-default" - id={day1.d.toString()} - > - {day1.steps.length > 0 && ( -
- + + {day1.steps.length > 0 && ( +
+ -
-
- {day1.steps[0].title} -

{day1.steps[0]?.description}

-
- - {day1.steps[0]?.bg_layers && - day1.steps[0]?.bg_layers?.map( - (layer, i) => - !!layer.img && ( - - +
+
+ {day1.steps[0].title} +

{day1.steps[0]?.description}

+
+ + {day1.steps[0]?.bg_layers && + day1.steps[0]?.bg_layers?.map( + (layer, i) => + !!layer.img && ( + + - - ) - )} - -
- )} - + layout="fill" + objectPosition={isTablet ? '50%' : '90% 50%'} + objectFit="contain" + /> +
+ ) + )} + +
+ )}
Date: Mon, 7 Aug 2023 19:11:42 +0200 Subject: [PATCH 2/7] Add hn link --- apps/www/components/LaunchWeek/8/Releases/index.tsx | 4 ++-- apps/www/components/LaunchWeek/8/Releases/lw8_data.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/index.tsx b/apps/www/components/LaunchWeek/8/Releases/index.tsx index 98174d4455f..432e95e7b95 100644 --- a/apps/www/components/LaunchWeek/8/Releases/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/index.tsx @@ -321,8 +321,8 @@ export default function LW8Releases() {
diff --git a/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts b/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts index e0b431308fd..8978bd0d855 100644 --- a/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts +++ b/apps/www/components/LaunchWeek/8/Releases/lw8_data.ts @@ -103,7 +103,7 @@ const days: WeekDayProps[] = [ { title: 'Hugging Face now supported in Supabase', blog: '/blog/hugging-face-supabase', - hackernews: '/', + hackernews: 'https://news.ycombinator.com/item?id=37035960', video: 'https://www.youtube.com/watch?v=RJccSbJ9Go4', twitter_spaces: 'https://twitter.com/i/spaces/1DXGyvjkeEeJM', bg_layers: [{ img: images['01-hugging'] }], From e5d4b20d5c48e1fe136abe43a6bd686b4de754bd Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Mon, 7 Aug 2023 19:15:27 +0200 Subject: [PATCH 3/7] update section header layout --- .../8/Releases/components/index.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx index 77dad12f22b..fc833aea991 100644 --- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx @@ -168,7 +168,7 @@ export const AccordionHeader = ({ }) => (
)} + {shippable && shipped && ( + + )}
- {shippable && shipped && ( - - )} {shippable && !shipped && ( Date: Mon, 7 Aug 2023 20:13:56 +0200 Subject: [PATCH 4/7] fix firefox youtube modal bug and open modal when clicking top cta --- .../LaunchWeek/8/Releases/LWAnnouncement.tsx | 127 +++++++++++------- .../8/Releases/components/index.tsx | 2 +- apps/www/pages/launch-week/index.tsx | 2 +- .../ExpandableVideo/ExpandableVideo.tsx | 14 +- 4 files changed, 93 insertions(+), 52 deletions(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx index 69f03967e51..ee0fd9cef69 100644 --- a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx @@ -3,64 +3,93 @@ import { SmallCard } from './components' import Link from 'next/link' import Image from 'next/image' import days from './lw8_data' +import { ExpandableVideo } from 'ui' -const LWAnnouncement = ({ title }: { title?: string }) => { +const LWAnnouncement = ({ + title, + isLaunchWeekPage, +}: { + title?: string + isLaunchWeekPage?: boolean +}) => { + if (typeof document === 'undefined') return null const [_pre, d1, _d2, _d3, _d4, _d5] = days + const today = document.getElementById('today') + + const announcement = ( + <> +
+
+
+
+ + + +
+ {title ?? 'Launch Week 8: Day 1'} +
+ {d1.steps[0].title} +
+
+
+
+ + + +
+ Youtube video thumbnail +
+ + ) + + const handleClick = (e: any) => { + if (!today) return + today.scrollIntoView({ behavior: 'smooth' }) + } return ( ) diff --git a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx index fc833aea991..0cf4e936dc2 100644 --- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx @@ -220,7 +220,7 @@ export const AccordionHeader = ({ )}
{shippable && shipped && youtube_id && ( -
+
- +
-
setExpandVideo(true)}>{trigger ?? }
+ ) } From 32a880c329984f8820f5d38de4fb2a65b8db6f85 Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Mon, 7 Aug 2023 20:21:14 +0200 Subject: [PATCH 5/7] scroll with router --- apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx index ee0fd9cef69..abb51ab0495 100644 --- a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx @@ -4,6 +4,7 @@ import Link from 'next/link' import Image from 'next/image' import days from './lw8_data' import { ExpandableVideo } from 'ui' +import { useRouter } from 'next/router' const LWAnnouncement = ({ title, @@ -13,6 +14,7 @@ const LWAnnouncement = ({ isLaunchWeekPage?: boolean }) => { if (typeof document === 'undefined') return null + const router = useRouter() const [_pre, d1, _d2, _d3, _d4, _d5] = days const today = document.getElementById('today') @@ -63,7 +65,7 @@ const LWAnnouncement = ({ const handleClick = (e: any) => { if (!today) return - today.scrollIntoView({ behavior: 'smooth' }) + router.replace('#today') } return ( From 0c76c6783854a1820874758b272694daae305c9a Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Mon, 7 Aug 2023 20:31:57 +0200 Subject: [PATCH 6/7] Make youtube thumbnail bigger --- .../components/LaunchWeek/8/Releases/components/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx index 0cf4e936dc2..f6491e05f1a 100644 --- a/apps/www/components/LaunchWeek/8/Releases/components/index.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/components/index.tsx @@ -238,8 +238,8 @@ export const AccordionHeader = ({ export const VideoPreviewTrigger = ({ title, thumbnail }: { title: string; thumbnail: string }) => (
{title} -
-
+
+
From b0ad730c862c5fd8e8d46599283befbc7f6ad4c9 Mon Sep 17 00:00:00 2001 From: Francesco Sansalvadore Date: Mon, 7 Aug 2023 20:45:29 +0200 Subject: [PATCH 7/7] scrollIntoView --- apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx index abb51ab0495..ee0fd9cef69 100644 --- a/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx +++ b/apps/www/components/LaunchWeek/8/Releases/LWAnnouncement.tsx @@ -4,7 +4,6 @@ import Link from 'next/link' import Image from 'next/image' import days from './lw8_data' import { ExpandableVideo } from 'ui' -import { useRouter } from 'next/router' const LWAnnouncement = ({ title, @@ -14,7 +13,6 @@ const LWAnnouncement = ({ isLaunchWeekPage?: boolean }) => { if (typeof document === 'undefined') return null - const router = useRouter() const [_pre, d1, _d2, _d3, _d4, _d5] = days const today = document.getElementById('today') @@ -65,7 +63,7 @@ const LWAnnouncement = ({ const handleClick = (e: any) => { if (!today) return - router.replace('#today') + today.scrollIntoView({ behavior: 'smooth' }) } return (