Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Geary
Geary
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 319
    • Issues 319
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 28
    • Merge Requests 28
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • GearyGeary
  • Issues
  • #1192

Closed
Open
Created Apr 07, 2021 by djrenren@djrenrenContributor2 of 11 tasks completed2/11 tasks

Migrate ConversationList from `TreeView` to `ListBox`

Goal

ConversationList (the middle pane that lists all your email threads in the current scope) currently relies on TreeView which is the Gtk+3 recommended widget for long lists. We should replace this with ListBox

Why

Although TreeView is the canonical way to handle long lists in Gtk-3 it has several drawbacks. Namely, it's complicated and rows in the TreeView cannot contain widgets---instead they use CellRenderers. This means Geary's rows must be drawn using cairo rather than being built out of standard GTK widgets. On its own this is fine, but it prevents improvements to the display of rows in the ConversationList (see #391). One quick example is that we want to use HdyAvatar in the row.

Concerns

TreeView is the preferred way to do long lists for performance (and flexibility) reasons. GTK devs say that in general, ListBox is good up to 1,000 list items whereas TreeView scales up to 100,000 items. It's hard to say what perf will look like until we build it, but regardless this is valuable work because it prepares us for GTK-4.

GTK-4 introduces a new widget called ListView which scales to a list of unlimited size (see here and here for details). The interface for ListView is modeled after ListBox. Specifically they both use an underlying ListModel in place of TreeView's TreeStore. Porting from ListBox to ListView should be a pretty lightweight change compared to the TreeView -> ListBox transition.

If ListBox perf is unacceptable, we can still hold on to the work until we can upgrade to GTK-4 (currently blocked primarily by WebkitGtk which we need to render emails).

TODOS

  • Replace ConversationListStore with ConversationListModel
  • Get ListBox rendering
  • Implement proper multiselection for ListBox
  • Build row widget
    • Unread status
    • Multiple sender addresses
    • Account for unread status in sender list
    • Message counts
    • Load contact image
    • Figure out what to do with avatars and multiple senders
  • Lots of testing
Edited Apr 09, 2021 by djrenren
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None