Add Feed page to spaces with post creation - #21
Merged
Merged
Conversation
Adds a Feed nav entry and route for each space, mirroring the existing Home feed but restricted to posts from rooms attached to that space (recursively, excluding nested DMs), via useSpaceFeedRooms. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vz3XwBGSj72K2VdWdeupDt
Covers getAllParents/mapParentWithChildren (the pure functions that resolve a room's ancestor spaces, including through nested sub-spaces, which useSpaceFeedRooms relies on to scope posts to a space) and the new getSpaceFeedPath route helper. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vz3XwBGSj72K2VdWdeupDt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new Feed page to spaces, allowing users to view and create posts within a space context. The feed displays posts from all rooms within the space hierarchy and includes a floating action button to create new posts.
Changes:
src/app/pages/client/space/Feed.tsx): A new page component that displays a feed of posts from all rooms in a space, with a "Share" button (FAB) to create new postssrc/app/pages/client/space/Feed.css.ts): Styles for the floating action button positioned in the bottom-right cornersrc/app/pages/client/space/Space.tsx): Added a "Feed" nav item to the space sidebar that links to the new feed pagesrc/app/features/feed/useFeedRooms.ts): NewuseSpaceFeedRoomshook that retrieves all rooms within a space hierarchy for feed displaysrc/app/pages/Router.tsx,src/app/pages/paths.ts,src/app/pages/pathUtils.ts): Added routing support for the space feed page with path/space/:spaceIdOrAlias/feedsrc/app/hooks/router/useSelectedSpace.ts): NewuseSpaceFeedSelectedhook to detect when the feed page is activesrc/app/pages/client/space/index.ts): Exported the new SpaceFeed componentThe implementation follows existing patterns in the codebase for space pages (similar to SpaceSearch and SpaceLobby) and reuses the existing Feed component infrastructure.
Fixes #
Checklist:
https://claude.ai/code/session_01Vz3XwBGSj72K2VdWdeupDt