Skip to content

Conversation

nivinab
Copy link
Collaborator

@nivinab nivinab commented Sep 21, 2025

No description provided.

hbmoshe and others added 30 commits September 16, 2025 13:28
- Implement Instagram feed component following 3-level architecture pattern
- Integrate with @wix/instagram-account and @wix/instagram-media SDKs
- Add comprehensive TypeScript support and proper component structure
- Configure build pipeline for both ESM and CJS outputs
- Set up testing infrastructure with vitest
@nivinab nivinab changed the base branch from instagram-updated to main September 25, 2025 11:56
@nivinab nivinab requested a review from carmelc September 25, 2025 13:28
@nivinab nivinab changed the title added new components for new structure interface Instagram headless component Sep 25, 2025
<div>
<InstagramFeed.Title />
<InstagramFeed.UserName />
<InstagramFeed.Hashtag hashtag="myhashtag" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need to provide the hashtag? I thought it was supposed to list the hashtags from the feed or something, does it have any actual headless logic? or is it pure UI?

<InstagramFeed.InstagramMedias>
<InstagramFeed.InstagramMediaRepeater>
<MediaGallery.Root>
<InstagramMedia.caption />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.Caption, .MediaType, ...
all components' names should start with capital letter including after .

<InstagramMedia.timestamp />
<InstagramMedia.MediaGalleries>
<InstagramMedia.MediaGalleryRepeater>
<MediaGallery.Root />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Root is rendered inside the repeater you don't need to render MediaGallery.Root but MediaGallery.ViewPort (or whatever they call it)

<InstagramFeed.UserName />
</div>
<div className="opacity-70 text-sm">
<InstagramFeed.Hashtag hashtag={instagramConfig.accountId || 'instagram'} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have the instegramConfig on the Root level, this component should get the data from it, and not as a prop

<InstagramFeed.InstagramMediaRepeater>
<InstagramMedia.MediaGalleries>
<InstagramMedia.MediaGalleryRepeater>
<MediaGallery.Root mediaGalleryServiceConfig={{ media: [], infinite: true }}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be on the repeater component which is rendering the root component internally and not rendering the media root again,


return (
<div ref={ref}>
<MediaGallery.Thumbnails>{children}</MediaGallery.Thumbnails>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the MediaGallery.Thumbnail get the context from? if it is from Gallery component than this component is redundant and we can use MediaGallery.Thumbnails directly


<InstagramFeed.InstagramMedias>
<InstagramFeed.InstagramMediaRepeater>
<InstagramMedia.MediaGalleries>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we render MediaGallery.Thumbnails here and use MediaGallery components directly under it?

}));

return (
<MediaGallery.Root
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything under MediaGallery.Root should be just MediaGallery and not Instegram media

const { type } = mediaItemService.mediaItem.get();

return props.children({
mediaType: type,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you provide the same prop twice with different names?

const feedData = instagramFeedService.feedData.get();

const displayName =
feedData.account?.instagramInfo?.instagramUsername || 'unknown';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

labels should always be controlled by the user you should accept an unknownLabel or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants