refactor: extract RoomFooter and RoomMessageActions components from RoomView#7490
refactor: extract RoomFooter and RoomMessageActions components from RoomView#7490diegolmello wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (4)**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
app/views/**/*.tsx📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📚 Learning: 2026-04-30T17:07:51.020ZApplied to files:
📚 Learning: 2026-06-24T22:58:43.390ZApplied to files:
📚 Learning: 2026-06-25T18:37:44.793ZApplied to files:
🔇 Additional comments (7)
WalkthroughRoomView footer and message-action rendering are extracted into dedicated components. The new components preserve room-state conditions, composer rendering, message actions, error actions, refs, and existing RoomView wiring. ChangesRoomView component extraction
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposed changes
Extracts the two remaining inline JSX blocks of
RoomView— the footer (renderFooter) and the message-action sheets (renderActions) — into dedicated, compiled child components:components/RoomFooter.tsx— selectsroom,joined,loading,joinRoom,resumeRoomfrom the room store and renders every footer variant (composer, join/take-it CTA, resume when on-hold, read-only, blocked, federation notice, air-gapped restriction). Only instance-specific values remain props (composer ref, insets padding, federation flags,readOnly).components/RoomMessageActions.tsx— selectsroomfrom the store, guards until the room is loaded, and rendersMessageActions+MessageErrorActions, receiving the action-sheet refs and action-init handlers as props.RoomViewdrops both render functions, thegetFederatedFooterDescriptionhelper, and the now-unused imports, rendering the two components in their place. Each component re-renders only when its selected store slice changes instead of being rebuilt on everyRoomViewrender.Behavior is unchanged — all footer branches and action sheets render and act exactly as before.
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-34
How to test or reproduce
Open a room and confirm the footer renders correctly across states: normal composer, preview/join CTA, livechat "take it", on-hold resume, read-only room, blocked DM, federated-room notice, and an air-gapped read-only workspace. Confirm long-pressing a message opens the action sheet and each action (edit/reply/quote/react/etc.) works, and that failed-message error actions still open.
Screenshots
Types of changes
Checklist
Further comments
Targets
native-34-roomview-hooks(PR #7482), notdevelop— this is one step of the RoomView class→hooks decomposition and stacks on that branch. Both components are compiled via the'use memo'directive (annotation mode).readOnlyis deliberately kept as a prop rather than moved into the store to keep the change behavior-neutral.Summary by CodeRabbit