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

FeedCard & ListCard cleanups #4644

Merged
merged 7 commits into from
Jun 28, 2024
Merged

FeedCard & ListCard cleanups #4644

merged 7 commits into from
Jun 28, 2024

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Jun 25, 2024

This PR refactors FeedCard a bit and extracts a ListCard component for easier usage in either case. If you're rendering a feed, use FeedCard. List, use ListCard.

ListCard inherits from FeedCard, since they're very similar, but I think the clarity of usage like this makes this pattern worth it. If we need to further differentiate in the future we can pretty easily like this. Examples:

  • lists don't have likes, no need for Likes component
  • maybe one day we need a different action export for modlists like SubscribeButton
  • TitleAndByline needs a purpose for lists, but not for feeds
    • maybe soon we need a type or purpose field for feeds 👀

Copy link

render bot commented Jun 25, 2024

Copy link

Old size New size Diff
6.48 MB 6.48 MB 0 B (0.00%)

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

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

Reviewed code, tested on web, lgtm

@estrattonbailey estrattonbailey merged commit 1a037d3 into main Jun 28, 2024
6 checks passed
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.

2 participants