Skip to content
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

refactor(compositions): reorganise composition to ease LyonJS needs #1185

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions remotion/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ import React from 'react';
import {Folder} from 'remotion';

import {ShowcasesComposition} from './compositions/showcases/Showcases.composition';
import {TemplatesComposition} from './compositions/templates/Templates.composition';
import {LyonJSMeetup} from './compositions/templates/LyonJSMeetup.composition';
import {MeetupToolKit} from './compositions/templates/MeetupToolKit.composition';
import {AtomsComposition} from './design/atoms/Atoms.composition';
import {MoleculesComposition} from './design/molecules/Molecules.composition';

export const RemotionRoot: React.FC = () => {
return (
<>
<TemplatesComposition />
<LyonJSMeetup />
<MeetupToolKit />
<ShowcasesComposition />
<Folder name="Design">
<AtomsComposition />
Expand Down
2 changes: 1 addition & 1 deletion remotion/compositions/showcases/Showcases.composition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {VolcampComposition} from './volcamp/Volcamp.composition';

export const ShowcasesComposition: React.FC = () => {
return (
<Folder name="Showcases">
<Folder name="Conferences">
<LyonJSComposition />
<AlpesCraftComposition />
<TouraineTechComposition />
Expand Down
17 changes: 9 additions & 8 deletions remotion/compositions/showcases/lyonJS/Replay.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import React from 'react';
import {AbsoluteFill, Audio, interpolate, Sequence, staticFile} from 'remotion';
import {z} from 'zod';

import {BackgroundTriangle} from '../../../design/atoms/BackgroundTriangle';
import {Speaker} from '../../../types/defaultProps.types';
import {SpeakerSchema} from '../showcases.types';

import {BigSpeakers} from './BigSpeakers';
import {Details} from './Details';
import {Logo} from './Logo';
import {LogoSponsor} from './LogoSponsor';
import {TalkTitle} from './TalkTitle';

export type LyonJSReplayType = {
title: string;
date: string;
sponsor: string;
speakers: Speaker[];
};
export const LyonJSReplaySchema = z.object({
title: z.string(),
date: z.string(),
sponsor: z.string(),
speakers: z.array(SpeakerSchema),
});

export const ReplayLyonJS: React.FC<LyonJSReplayType> = ({
export const ReplayLyonJS: React.FC<z.infer<typeof LyonJSReplaySchema>> = ({
title,
speakers,
date,
Expand Down
2 changes: 1 addition & 1 deletion remotion/compositions/showcases/showcases.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {z} from 'zod';

const SpeakerSchema = z.object({
export const SpeakerSchema = z.object({
name: z.string(),
picture: z.string(),
});
Expand Down
128 changes: 128 additions & 0 deletions remotion/compositions/templates/LyonJSMeetup.composition.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import React from 'react';
import {Composition, Folder} from 'remotion';

import {LyonJSReplaySchema, ReplayLyonJS} from '../showcases/lyonJS/Replay';

import {LayersComposition} from './layers/Layers.composition';
import {Meetup, MeetupSchema} from './meetup/Meetup';
import {Silhouette, SilhouetteSchema} from './silhouette/Silhouette';
import {SponsorsComposition} from './sponsors/Sponsors.composition';
import {TalkBranded} from './talk/branded/TalkBranded';
import {Talk} from './talk/Talk';
import {TalkBrandedSchema, TalkSchema} from './talk/talks.types';

const startingDate = new Date(2023, 3, 18, 13);

export const LyonJSMeetup: React.FC = () => {
return (
<Folder name="LyonJS">
<Composition
component={Talk}
width={1200}
height={1200}
id="LyonJS-Talk"
fps={30}
durationInFrames={120}
schema={TalkSchema}
defaultProps={{
speakersNames: 'John Doe',
titleColor: '#efdb50',
talkTitle: 'Is JS an awesome programing language ?',
titleSize: 80,
backgroundImg:
'https://github.com/lyonjs/shortvid.io/blob/48ffea960b300eb9230786ed0ab043ec3387e877/public/images/showcases/lyonjs/defaultBackgroundImage.jpeg?raw=true',
speakerPicture:
'https://raw.githubusercontent.com/lyonjs/shortvid.io/main/public/images/common/defaultAvatar.svg',
eventLogo:
'https://github.com/lyonjs/shortvid.io/blob/main/public/images/showcases/lyonjs/lyonjsSquaredLogo.png?raw=true',
}}
/>
<Composition
component={TalkBranded}
width={1280}
height={720}
id="LyonJS-Talk-Alternate"
fps={30}
durationInFrames={140}
schema={TalkBrandedSchema}
defaultProps={{
backgroundColor: '#efdb50',
title: 'Certification “Google Cloud Architect”',
startingDate,
location: '5 Place Jules Ferry, 69006.',
logoUrl:
'https://github.com/lyonjs/shortvid.io/blob/main/public/images/showcases/lyonjs/lyonjsSquaredLogo.png?raw=true',
speakers: [
{
pictureUrl:
'https://res.cloudinary.com/startup-grind/image/upload/c_fill,dpr_2.0,f_auto,g_center,h_250,q_auto:good,w_250/v1/gcs/platform-data-goog/events/20200911_094649_MbC4W4N.jpg',
name: 'Julien Landuré',
company: 'Zenika Nantes',
job: 'CTO / GDE',
},
],
}}
/>
<Composition
component={Silhouette}
width={1280}
height={720}
id="LyonJS-Talk-Silhouette"
fps={30}
durationInFrames={120}
schema={SilhouetteSchema}
defaultProps={{
backgroundImg:
'https://github.com/lyonjs/shortvid.io/blob/48ffea960b300eb9230786ed0ab043ec3387e877/public/images/showcases/lyonjs/defaultBackgroundImage.jpeg?raw=true',
title: 'Example of title for the template 🚀',
silhouetteUrl:
'https://user-images.githubusercontent.com/6263857/230662773-4d7a534a-e01c-4ba8-9c3b-fa95586adf52.png',
side: 'right',
logoUrl:
'https://github.com/lyonjs/shortvid.io/blob/main/public/images/showcases/lyonjs/lyonjsSquaredLogo.png?raw=true',
}}
/>
<Composition
component={Meetup}
width={1200}
height={1200}
id="LyonJS-Meetup-Announce"
fps={30}
durationInFrames={270}
schema={MeetupSchema}
defaultProps={{
title: '#76 - LyonJS de la rentrée 🦁',
date: '28 septembre 2022',
backgroundImg:
'https://github.com/lyonjs/shortvid.io/blob/48ffea960b300eb9230786ed0ab043ec3387e877/public/images/showcases/lyonjs/defaultBackgroundImage.jpeg?raw=true',
eventLogo:
'https://github.com/lyonjs/shortvid.io/blob/main/public/images/showcases/lyonjs/lyonjsSquaredLogo.png?raw=true',
}}
/>
<Composition
width={1920}
height={1080}
id="LyonJS-Replay"
fps={60}
durationInFrames={320}
component={ReplayLyonJS}
schema={LyonJSReplaySchema}
defaultProps={{
title: 'Meetup #80 : Projet XState',
speakers: [
{
name: 'Maxime Blanc',
picture:
'https://ca.slack-edge.com/T108ZKPMF-U3VL71HHU-179292d5d86f-512',
},
],
date: '8 férvrier 2023',
sponsor:
'https://s3.eu-west-3.amazonaws.com/moovijob.prod/1494438/Horizontal_Black_Logo-Zenika.png',
}}
/>
<LayersComposition />
<SponsorsComposition />
</Folder>
);
};
81 changes: 81 additions & 0 deletions remotion/compositions/templates/MeetupToolKit.composition.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import React from 'react';
import {Composition, Folder} from 'remotion';

import {Talk} from './talk/Talk';
import {TalkSchema} from './talk/talks.types';

export const MeetupToolKit: React.FC = () => {
return (
<Folder name="Meetup-ToolKit">
<Folder name="HumanTalk">
<Composition
component={Talk}
width={1200}
height={1200}
id="HumanTalk-Talk"
fps={30}
durationInFrames={120}
schema={TalkSchema}
defaultProps={{
speakersNames: 'John Doe',
titleColor: '#772757',
talkTitle: 'Is JS an awesome programing language ?',
titleSize: 80,
backgroundImg:
'https://humantalks.com/assets/talks-10min-eabec95a48239e06c9dfb2c466874a3c734c54b579d38cf98a1135eb3f293c5e.jpg',
speakerPicture:
'https://raw.githubusercontent.com/lyonjs/shortvid.io/main/public/images/common/defaultAvatar.svg',
eventLogo:
'https://humantalks.com/assets/logo-HumanTalks-b238463e6389c198a989506119f06d0d0ef836cc90a3c7713939c0ae09eb5f76.png',
}}
/>
</Folder>
<Folder name="ParisJS">
<Composition
component={Talk}
width={1200}
height={1200}
id="ParisJS-Talk"
fps={30}
durationInFrames={120}
schema={TalkSchema}
defaultProps={{
speakersNames: 'John Doe',
titleColor: '#e14680',
talkTitle: 'Is JS an awesome programing language ?',
titleSize: 80,
backgroundImg:
'https://secure.meetupstatic.com/photos/event/4/e/2/0/highres_466520000.webp',
speakerPicture:
'https://raw.githubusercontent.com/lyonjs/shortvid.io/main/public/images/common/defaultAvatar.svg',
eventLogo:
'https://secure-content.meetupstatic.com/images/classic-events/499980504/128x128.jpg',
}}
/>
</Folder>
<Folder name="StrasbourgJS">
<Composition
component={Talk}
width={1200}
height={1200}
id="StrasbourgJS-Talk"
fps={30}
durationInFrames={120}
schema={TalkSchema}
defaultProps={{
speakersNames: 'John Doe',
titleColor: '#FFCC4A',
talkTitle: 'Is JS an awesome programing language ?',
titleSize: 80,
backgroundImg:
'https://secure.meetupstatic.com/photos/event/3/5/b/8/highres_415693752.webp',
speakerPicture:
'https://raw.githubusercontent.com/lyonjs/shortvid.io/main/public/images/common/defaultAvatar.svg',
eventLogo:
'https://secure-content.meetupstatic.com/images/classic-events/493856926/128x128.jpg',
}}
/>
</Folder>
</Folder>
);
};
24 changes: 0 additions & 24 deletions remotion/compositions/templates/Templates.composition.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions remotion/compositions/templates/carousel/Carousel.composition.tsx

This file was deleted.

46 changes: 0 additions & 46 deletions remotion/compositions/templates/carousel/Carousel.tsx

This file was deleted.

Loading
Loading