MerginMaps / mobile

Mobile app for Mergin Maps 📲. Open QGIS projects and manage vector data on your phone, even offline 📶 (Android/iOS/Windows app)
https://merginmaps.com
GNU General Public License v2.0
292 stars 64 forks source link

Fix logic of how the "N more" is calculated in relation editor #3309

Closed wonder-sk closed 4 months ago

wonder-sk commented 4 months ago

Fixes #3242

This pretty much reverts the logic to use what we had before e4b5d28a2. The updated logic with counting of items made invisible was more efficient in theory, but fragile in reality :slightly_smiling_face:

The relation editor is probably quite prone to slowness if there are many related features, because Repeater may create many items even if they end up hidden and we may do many recalculations of number of hidden items. It may be a good idea to implement a custom "flow relation features" model, that would be aware of the flow parameters (number of rows, font metrics, spacing etc.) so that 1. we would only create few items even for large relations, 2. all layout logic would be in one place (and testable)

tomasMizera commented 4 months ago

Great idea with the custom model. Certainly something to think about. Would you like to file a ticket for that?

wonder-sk commented 4 months ago

Ticket created: https://github.com/MerginMaps/mobile/issues/3310