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

add embed widget support, tee up support for oembed/opengraph embeds #4448

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 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
42 changes: 21 additions & 21 deletions cosmos.imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ import * as fixture10 from './packages/app/fixtures/Pressable.fixture';
import * as fixture11 from './packages/app/fixtures/PostScreen.fixture';
import * as fixture12 from './packages/app/fixtures/PostReference.fixture';
import * as fixture13 from './packages/app/fixtures/ParentAgnosticKeyboardAvoidingView.fixture';
import * as fixture14 from './packages/app/fixtures/OutsideEmbed.fixture';
import * as fixture15 from './packages/app/fixtures/MetaEditorScreen.fixture';
import * as fixture16 from './packages/app/fixtures/MessageInput.fixture';
import * as fixture17 from './packages/app/fixtures/MessageActions.fixture';
import * as fixture18 from './packages/app/fixtures/InviteUsersSheet.fixture';
import * as fixture19 from './packages/app/fixtures/Input.fixture';
import * as fixture20 from './packages/app/fixtures/ImageViewer.fixture';
import * as fixture21 from './packages/app/fixtures/GroupListItem.fixture';
import * as fixture22 from './packages/app/fixtures/GalleryPost.fixture';
import * as fixture23 from './packages/app/fixtures/Form.fixture';
import * as fixture14 from './packages/app/fixtures/MetaEditorScreen.fixture';
import * as fixture15 from './packages/app/fixtures/MessageInput.fixture';
import * as fixture16 from './packages/app/fixtures/MessageActions.fixture';
import * as fixture17 from './packages/app/fixtures/InviteUsersSheet.fixture';
import * as fixture18 from './packages/app/fixtures/Input.fixture';
import * as fixture19 from './packages/app/fixtures/ImageViewer.fixture';
import * as fixture20 from './packages/app/fixtures/GroupListItem.fixture';
import * as fixture21 from './packages/app/fixtures/GalleryPost.fixture';
import * as fixture22 from './packages/app/fixtures/Form.fixture';
import * as fixture23 from './packages/app/fixtures/EmbedContent.fixture';
import * as fixture24 from './packages/app/fixtures/EditProfileScreen.fixture';
import * as fixture25 from './packages/app/fixtures/CreateChatSheet.fixture';
import * as fixture26 from './packages/app/fixtures/ContactList.fixture';
Expand Down Expand Up @@ -65,7 +65,7 @@ import * as decorator0 from './packages/app/fixtures/cosmos.decorator';
import * as decorator1 from './apps/tlon-mobile/src/fixtures/cosmos.decorator';

export const rendererConfig: RendererConfig = {
"playgroundUrl": "http://localhost:5002",
"playgroundUrl": "http://localhost:5001",
"rendererUrl": null
};

Expand All @@ -84,16 +84,16 @@ const fixtures = {
'packages/app/fixtures/PostScreen.fixture.tsx': { module: fixture11 },
'packages/app/fixtures/PostReference.fixture.tsx': { module: fixture12 },
'packages/app/fixtures/ParentAgnosticKeyboardAvoidingView.fixture.tsx': { module: fixture13 },
'packages/app/fixtures/OutsideEmbed.fixture.tsx': { module: fixture14 },
'packages/app/fixtures/MetaEditorScreen.fixture.tsx': { module: fixture15 },
'packages/app/fixtures/MessageInput.fixture.tsx': { module: fixture16 },
'packages/app/fixtures/MessageActions.fixture.tsx': { module: fixture17 },
'packages/app/fixtures/InviteUsersSheet.fixture.tsx': { module: fixture18 },
'packages/app/fixtures/Input.fixture.tsx': { module: fixture19 },
'packages/app/fixtures/ImageViewer.fixture.tsx': { module: fixture20 },
'packages/app/fixtures/GroupListItem.fixture.tsx': { module: fixture21 },
'packages/app/fixtures/GalleryPost.fixture.tsx': { module: fixture22 },
'packages/app/fixtures/Form.fixture.tsx': { module: fixture23 },
'packages/app/fixtures/MetaEditorScreen.fixture.tsx': { module: fixture14 },
'packages/app/fixtures/MessageInput.fixture.tsx': { module: fixture15 },
'packages/app/fixtures/MessageActions.fixture.tsx': { module: fixture16 },
'packages/app/fixtures/InviteUsersSheet.fixture.tsx': { module: fixture17 },
'packages/app/fixtures/Input.fixture.tsx': { module: fixture18 },
'packages/app/fixtures/ImageViewer.fixture.tsx': { module: fixture19 },
'packages/app/fixtures/GroupListItem.fixture.tsx': { module: fixture20 },
'packages/app/fixtures/GalleryPost.fixture.tsx': { module: fixture21 },
'packages/app/fixtures/Form.fixture.tsx': { module: fixture22 },
'packages/app/fixtures/EmbedContent.fixture.tsx': { module: fixture23 },
'packages/app/fixtures/EditProfileScreen.fixture.tsx': { module: fixture24 },
'packages/app/fixtures/CreateChatSheet.fixture.tsx': { module: fixture25 },
'packages/app/fixtures/ContactList.fixture.tsx': { module: fixture26 },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { QueryClientProvider, queryClient } from '@tloncorp/shared';
import { PropsWithChildren } from 'react';

import { OutsideEmbed } from '../ui';
import { EmbedContent } from '../ui';
import { FixtureWrapper } from './FixtureWrapper';

const OutsideEmbedFixtureWrapper = ({ children }: PropsWithChildren) => {
const EmbedContentFixtureWrapper = ({ children }: PropsWithChildren) => {
return (
<FixtureWrapper>
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
Expand All @@ -14,25 +14,25 @@ const OutsideEmbedFixtureWrapper = ({ children }: PropsWithChildren) => {

const YoutubeEmbedFixture = () => {
return (
<OutsideEmbedFixtureWrapper>
<OutsideEmbed url="https://www.youtube.com/watch?v=3K3D9LGzvBA" />
</OutsideEmbedFixtureWrapper>
<EmbedContentFixtureWrapper>
<EmbedContent url="https://www.youtube.com/watch?v=3K3D9LGzvBA" />
</EmbedContentFixtureWrapper>
);
};

const SpotifyEmbedFixture = () => {
return (
<OutsideEmbedFixtureWrapper>
<OutsideEmbed url="https://open.spotify.com/track/1k7lK8tjU5BPsXez7WEpg0?si=21cac0122b5141f0" />
</OutsideEmbedFixtureWrapper>
<EmbedContentFixtureWrapper>
<EmbedContent url="https://open.spotify.com/track/1k7lK8tjU5BPsXez7WEpg0?si=21cac0122b5141f0" />
</EmbedContentFixtureWrapper>
);
};

const TwitterEmbedFixture = () => {
return (
<OutsideEmbedFixtureWrapper>
<OutsideEmbed url="https://x.com/tloncorporation/status/1768691579794157746" />
</OutsideEmbedFixtureWrapper>
<EmbedContentFixtureWrapper>
<EmbedContent url="https://x.com/tloncorporation/status/1768691579794157746" />
</EmbedContentFixtureWrapper>
);
};

Expand Down
4 changes: 2 additions & 2 deletions packages/app/ui/components/AudioPost.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Pressable } from '@tloncorp/ui';
import { useCallback, useMemo, useRef } from 'react';
import { View } from 'tamagui';

import { RenderItemType } from '../contexts/componentsKits';
import { ChatAuthorRow } from './AuthorRow';
import { AudioPlayer, AudioPlayerHandle } from './Embed/AudioEmbed';
import { AudioPlayerHandle } from './Embed/AudioEmbedShared';
import { AudioPlayer } from './Embed/AudioPlayer';
import { convertContent } from './PostContent/contentUtils';

export const AudioPost: RenderItemType = (props) => {
Expand Down
90 changes: 0 additions & 90 deletions packages/app/ui/components/ChatMessage/ChatEmbedContent.tsx

This file was deleted.

184 changes: 0 additions & 184 deletions packages/app/ui/components/Embed/AudioEmbed.native.tsx

This file was deleted.

Loading