MerginMaps / MerginMaps/mobile

Use a custom model for relation editor form widget

Open
#3,310 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement forms performance relations
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

The relation editor form widget shows a couple of related features, with a button to show a full list ("N more") if not all related features can be shown. The current implementation uses Flow+Repeater and some logic to hide extra items (and count number of hidden items) if there are too many items. This is however a bit complicated, and it may be slow when there are many related features, because Repeater will create an item for each feature even if it is hidden. The idea is to move all this complexity to a custom item model that would be also responsible for layout decisions (it will need some basic visual parameters from QML - e.g. font metrics, number of rows, spacing). Such model should be then faster, easier to auto-test and QML code would be without much logic.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the relation editor form widget and its current Flow+Repeater implementation. Read how extra related features are hidden and counted, then define the custom item model's layout inputs and expected output. Done means the model owns those layout decisions, the QML contains less logic, and the behavior is covered by auto-tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
frontend, mobile-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.