Skip to content

Add Custom Preview Component for Lemmy Provider #805

@nevo-david

Description

@nevo-david

Overview

The Lemmy provider currently uses the default GeneralPreviewComponent instead of a platform-specific preview that matches Lemmy's UI/UX.

Current State

  • Provider file: apps/frontend/src/components/launches/providers/lemmy/lemmy.provider.tsx
  • Using: withProvider(LemmySettings, undefined, ...) - no custom preview component
  • Falls back to: GeneralPreviewComponent

Needed Implementation

Create a LemmyPreview component that:

  • Matches Lemmy's post design (Reddit-like federated social media layout)
  • Shows proper community context with proper formatting
  • Displays upvote/downvote system and karma indicators
  • Shows Lemmy-specific elements like federated community indicators
  • Includes open-source, decentralized social media styling
  • Shows proper post title, body, and community context
  • Handles federated social media features

Reference

See existing implementations:

  • apps/frontend/src/components/launches/providers/medium/medium.provider.tsx (MediumPreview)
  • apps/frontend/src/components/launches/providers/devto/devto.provider.tsx (DevtoPreview)

Technical Details

  • Component should be added as second parameter in withProvider(LemmySettings, LemmyPreview, ...)
  • Should implement FC<{ maximumCharacters?: number }> interface
  • Use useIntegration() hook to access post content and settings
  • Access Lemmy-specific settings like subreddit selection from LemmySettings

Priority

Medium - Lemmy is a growing federated alternative to Reddit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions