refine chat list with modern look and better perfomance #8

Merged
andrielfr merged 15 commits from refactor/refine-chat-list into master 2026-03-25 21:47:36 -03:00
Member

summary:

  • refactors and enhances the chat list with improved performance, filtering capabilities, and modern UI patterns.

changes:
performance improvements:

  • massive scrolling improvements: migrated from ListBox to TypedListView for better performance
  • optimized state management: reduced unnecessary re-renders and selection handling

new features:

  • chat filtering: add filter toggles for all, unreads, and groups
  • message status icons: display send status icons (success/warning) in chat list for outgoing messages

ui/ux improvements:

  • edge-to-edge design: revamped chat list layout for modern look
  • responsive layout: improved breakpoints and spacing for better responsiveness
  • scroll behavior: fixed scroll bouncing during updates, preserves scroll position when updating non-top chats

bug fixes:

  • chat list updates: fixed chat list not updating when sending messages
  • selection handling: removed suppress_selection guard, auto-select already disabled in selection model
summary: - refactors and enhances the chat list with improved performance, filtering capabilities, and modern UI patterns. changes: performance improvements: - massive scrolling improvements: migrated from ListBox to TypedListView for better performance - optimized state management: reduced unnecessary re-renders and selection handling new features: - chat filtering: add filter toggles for all, unreads, and groups - message status icons: display send status icons (success/warning) in chat list for outgoing messages ui/ux improvements: - edge-to-edge design: revamped chat list layout for modern look - responsive layout: improved breakpoints and spacing for better responsiveness - scroll behavior: fixed scroll bouncing during updates, preserves scroll position when updating non-top chats bug fixes: - chat list updates: fixed chat list not updating when sending messages - selection handling: removed suppress_selection guard, auto-select already disabled in selection model
- replace ListBox with TypedListView for better typed row management and binding.
- refactor ChatRow to implement RelmListItem trait with proper widget lifecycle management.
- update selection handling to use position signals.
- reorganize chat_view.rs by moving type definitions to bottom of impl blocks.
- fix get_first_name to return first word instead of first character.
- remove row_metadata to prevent index desynchronization.
- make ChatRow purely data (no RefCells or internal async tasks).
- load avatar textures and database queries asynchronously before inserting into the ListView.
- make bind() synchronous for zero-lag GTK widget recycling.
- emit ChatListInput::UpdateChat when sending a message to move the chat to top
- add Default derive to ChatListState for simpler initialization
- scroll to top when selected chat is moved to top position
- replace adw::ActionRow with a custom gtk::Box layout to prevent background color conflicts.
- add title_label and subtitle_label to ChatRowWidgets to manage text manually.
- increase window min height and sidebar max width for better spacing
- wrap session view in BreakpointBin for proper breakpoint handling
- increase chat view max width to 960px with tighter threshold
- fix chat list label alignment with Fill instead of Start
- remove propagate_natural_width for cleaner sizing behavior
(papo:1604109): Adwaita-WARNING **: 14:22:15.358: AdwBreakpointBin 0x55d0c6b904a0 does not have a minimum size, set the 'width-request' and 'height-request' properties to specify it
- add icon_name() method to Status enum for consistent icon names
- add status icon to ChatRowWidgets for chat list items
- show status icon for outgoing messages with success/warning styling
- refactor chat view to use icon_name() method
- change UpdateChat logic to use a "replace via insertion" approach.
- insert the updated chat row into the list before removing the old one.
- transfer the selection_model state to the newly inserted row to prevent focus loss.
- delete the old row only after the handoff is complete.

this prevents GTK4 from erratically recalculating scrollbars when a chat is marked as read or moved to the top.
- add ChatListFilter enum for filtering options
- add toggle group UI for filter selection
- add horizontal scrolling to filter bar with custom scroll handling
- implement filter logic for groups and unread messages
- split chat list into vertical Box with filter bar and chat list as separate scrollable areas
- improve scroll handling to properly access ScrolledWindow from controller
- preserve scroll position when updating non-top chats
- add re-selection when clearing filters to restore current chat selection
andrielfr force-pushed refactor/refine-chat-list from ec19586d0e to b3cee65346 2026-03-25 21:00:51 -03:00 Compare
andrielfr merged commit dce87b41e2 into master 2026-03-25 21:47:36 -03:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AmanoTeam/Papo!8
No description provided.