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

feat: add channel page #3681

Merged
merged 6 commits into from
Sep 1, 2023
Merged

feat: add channel page #3681

merged 6 commits into from
Sep 1, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented Sep 1, 2023

What does this PR do?

🤖 Generated by Copilot at 6d235a7

This pull request adds a new feature to the web app and the channels worker that allows users to view channel profile pages. It creates a new route /c/<channel-slug> on the web app that renders the ViewChannel component, which fetchs the channel data from the channels worker using the getChannel handler. It also adds a new component Feed that shows the channel publications using the GraphQL API and infinite scrolling. It also adds loading, error, and not found states, as well as meta tags and analytics.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at 6d235a7

  • Add a new page for viewing channel profile and publications (link)
  • Create a new component ViewChannel that renders the channel data and the Feed component (link)
  • Use the useQuery hook to fetch the channel data from the channels worker in ViewChannel (link)
  • Add a new handler getChannel in the channels worker that queries the Supabase database for the channel with the given slug (link)
  • Register the getChannel handler as a route on the router instance of the channels worker (link, link)
  • Create a new component Feed that renders a list of publications related to a channel (link)
  • Use the useExploreFeedQuery hook to fetch the publications from the GraphQL API in Feed (link)
  • Implement infinite scrolling in Feed using the useInView hook (link)
  • Create a new component ProfilePageShimmer that renders a placeholder skeleton for the channel profile page while the data is loading (link)
  • Render the MetaTags component in ViewChannel to set the page title (link)
  • Handle loading, empty, error, and not found states in ViewChannel and Feed (link, link)
  • Use Sentry to capture and trace any errors or transactions in the getChannel handler (link)
  • Use the useEffectOnce hook to track the page view event in ViewChannel (link)

Emoji

📰📺🚀

@vercel
Copy link

vercel bot commented Sep 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview Sep 1, 2023 6:54am
web ✅ Ready (Inspect) Visit Preview Sep 1, 2023 6:54am

});

const fetchCommunity = async (): Promise<Channel> => {
const response = await axios.get(`${CHANNELS_WORKER_URL}/get/${slug}`);

Check failure

Code scanning / CodeQL

Server-side request forgery Critical

The
URL
of this request depends on a
user-provided value
.
@vercel vercel bot temporarily deployed to Preview – prerender September 1, 2023 06:52 Inactive
@bigint bigint merged commit 38cc064 into main Sep 1, 2023
6 of 8 checks passed
@bigint bigint deleted the channels-page branch September 1, 2023 06:58
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.

None yet

1 participant