beeware / beeware/toga

Detailed List Sorting and assigning new accessors

Open
#2,563 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### What is the problem or limitation you are having?

I have a detailed list with many attributes. In order to sort by those attributes I need to sort the list of rows itself, I then need to then notify("clear") then notify("insert", row) for each row in the list. This is performant enough on Linux but is extremely slow on Android; I presume it's making a new list each time, or something like that. This issue alone is making me consider writing my project for each platform individually, so I feel as a whole this is a pretty important issue.

### Describe the solution you'd like

I would like to see a performant solution to both of these issues. A sort function would be great but I would be more interested in an added notify() option of the likes of "all_changed", where the platform rerenders the entire list. I understand you could just re-declare a new detailed list but if I remember correctly, that's even slower than re-rendering each row manually.

### Describe alternatives you've considered

It's possible that this specific is too specific and too complex to implement.

### Additional context

Contributor guide

Open the contributing guide

Research direction

Start by tracing the DetailedList row-update and notify() entry points, focusing on the sort workflow and the proposed "all_changed" notification. Compare the Linux and Android behavior, then define completion as a performant way to reorder rows or rerender the entire list without repeated per-row notifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.