Skip to content

Show smart media #5596

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

imthatcarlos
Copy link

changes

smart media category in single post header

if a post is smart media (ie app name is Bonsai and metadata attributes are present) then show the category in the single post header
hey1

smart media details in sidebar

if a post is smart media, then show the category, template, description, and active status (green border) in the sidebar with fullpost
hey2

rationale

users on Hey aren't aware that the post they are looking at is dynamic, and can evolve over time. this PR introduces subtle enhancements to provide more queues

notes

  • styles in both dark / light mode supported
  • on the feed, we simple parse details from the metadata attributes. on the full post, we (gracefully) attempt to fetch the smart media metadata from the associated media url found in the metadata attributes

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces smart media enhancements by displaying additional metadata (category, template, description, active status) in both the single post header and sidebar. Key changes include:

  • New TypeScript types and enums for smart media in the types file.
  • A Zustand-based store and helper function to fetch and manage smart media data.
  • UI updates in multiple post-related components to display smart media details.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/web/src/types/smart-media.ts Adds new types and enums for smart media metadata.
apps/web/src/store/non-persisted/post/useSmartMediaStore.ts Introduces a Zustand store to handle smart media fetching and state management.
apps/web/src/helpers/fetchSmartMedia.ts Implements fetching logic with timeout and error handling for smart media data.
apps/web/src/components/SmartMedia/Details.tsx Creates a details component to properly render smart media metadata.
apps/web/src/components/SmartMedia/Card.tsx Develops a card UI with styling enhancements for smart media display.
apps/web/src/components/Post/* Integrates smart media into post display components (headers, account, full post, single post).

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

Successfully merging this pull request may close these issues.

2 participants