feat(ui): implement active state and refactor GroupSidebar #105#127
Closed
The-Big-Danny wants to merge 2 commits into
Closed
feat(ui): implement active state and refactor GroupSidebar #105#127The-Big-Danny wants to merge 2 commits into
The-Big-Danny wants to merge 2 commits into
Conversation
|
@The-Big-Danny Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Collaborator
|
@The-Big-Danny build failing |
Collaborator
|
@The-Big-Danny resolve conflicts |
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.
Closes #105
📌 Pull Request
🔗 Related Issue
Closes #
📝 Description
📝 Description of Changes: Issue #105
Component Extraction: Moved the sidebar logic from the monolithic app/chat/page.tsx into a new, reusable component: components/group-sidebar.tsx.
Interface Definition: Established a strict Group interface to ensure type safety across the application when handling room metadata and message previews.
State Decoupling: Centralized the sidebar's internal state (search queries, loading skeletons) while maintaining a clean prop-based communication with the main chat layout.
Active State Visualization: * Implemented a distinct background highlight (bg-primary/10) and border tint for the currently selected group.
Added a vertical accent bar on the left edge of the active item to provide clear visual feedback on the current selection.
Message Previews: * Added a "Last Message" snippet below each group name to provide immediate context for recent activity.
Utilized Tailwind's truncate and line-clamp-1 utilities to ensure the layout remains clean and consistent regardless of message length.
Presence Indicators: Integrated the PresenceIndicator component to show real-time status (online/recently active) for each group in the list.
Clean Transitions: Added smooth CSS transitions for hover states and selection changes.
Responsive Logic: Preserved and refined the mobile sidebar toggle functionality, ensuring the new GroupSidebar component works seamlessly on smaller screens.
Type Safety: Resolved several TypeScript "ghost" errors by aligning the DBRoom fetch results with the new Group union type.
🚀 Changes Made
🧪 Testing & Validation
If yes, explain:
📸 Screenshots (REQUIRED for UI changes)
📋 Contributor Checklist (MANDATORY)
Closes #)💡 Notes for Reviewer