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: ✨ Type: Feature, Enhancement | Title: Enhancements in Post Creation and Display Post Feed #14

Merged
merged 1 commit into from
Dec 24, 2023

Conversation

RicardoGEsteves
Copy link
Owner

Description:
The changes mainly focus on enhancing the post creation and display process. The 'text-editor.tsx' file has been cleaned up, removing commented-out code. A new 'post-feed.tsx' file has been added to handle the display of posts in a feed. The 'post.tsx' file has been added to handle the display of individual posts. The 'page.tsx' file now uses the new 'PostFeed' component. Additionally, custom renderers for images and code have been added to enhance the display of these elements in posts. Lastly, a new 'text-editor-output.tsx' file has been added, although it is currently a placeholder.

Main Files Walkthrough:

  • components/rich-text-editor/text-editor.tsx: Cleaned up the file by removing commented-out code. The rest of the code remains unchanged.

  • components/posts/post-feed.tsx: New file added. It uses the 'useInfiniteQuery' hook from 'react-query' to fetch posts in an infinite scroll manner. It also handles the display of posts in a feed.

  • components/posts/post.tsx: New file added. It handles the display of individual posts, including the post's author, votes, comments, and content.

  • app/(main)/r/[slug]/page.tsx: Now uses the new 'PostFeed' component to display posts. The rest of the code remains unchanged.

  • components/renderers/custom-image-renderer.tsx: New file added. It provides a custom renderer for images in posts, using the 'next/image' component for optimized image handling.

  • components/renderers/custom-code-renderer.tsx: New file added. It provides a custom renderer for code blocks in posts, using a 'pre' and 'code' HTML elements for display.

  • components/rich-text-editor/text-editor-output.tsx: New file added. It is currently a placeholder for a component that will handle the output of the text editor.

  • Post feed implementation.

  • Infinite scrolling implemented for better user experience.

…tion and Display Post Feed

Description:
The changes mainly focus on enhancing the post creation and display process. The 'text-editor.tsx' file has been cleaned up, removing commented-out code. A new 'post-feed.tsx' file has been added to handle the display of posts in a feed. The 'post.tsx' file has been added to handle the display of individual posts. The 'page.tsx' file now uses the new 'PostFeed' component. Additionally, custom renderers for images and code have been added to enhance the display of these elements in posts. Lastly, a new 'text-editor-output.tsx' file has been added, although it is currently a placeholder.

Main Files Walkthrough:
- components/rich-text-editor/text-editor.tsx: Cleaned up the file by removing commented-out code. The rest of the code remains unchanged.
- components/posts/post-feed.tsx: New file added. It uses the 'useInfiniteQuery' hook from 'react-query' to fetch posts in an infinite scroll manner. It also handles the display of posts in a feed.
- components/posts/post.tsx: New file added. It handles the display of individual posts, including the post's author, votes, comments, and content.
- app/(main)/r/[slug]/page.tsx: Now uses the new 'PostFeed' component to display posts. The rest of the code remains unchanged.
- components/renderers/custom-image-renderer.tsx: New file added. It provides a custom renderer for images in posts, using the 'next/image' component for optimized image handling.
- components/renderers/custom-code-renderer.tsx: New file added. It provides a custom renderer for code blocks in posts, using a 'pre' and 'code' HTML elements for display.
- components/rich-text-editor/text-editor-output.tsx: New file added. It is currently a placeholder for a component that will handle the output of the text editor.

- Post feed implementation.
- Infinite scrolling implemented for better user experience.
@RicardoGEsteves RicardoGEsteves merged commit d4c45d4 into main Dec 24, 2023
3 checks passed
@RicardoGEsteves RicardoGEsteves deleted the post-feed branch December 24, 2023 04:24
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.

1 participant