MerginMaps / MerginMaps/mobile
Feature search does not use the tooltip or reference relation descriptions in fields
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 20
Description
Description
While Mergin Maps mobile shows map tooltips in the layer's feature list, the search functionality seems to ignore it and just search on searchable fields. If the tool tip is composed only by fields from that table this shouldn't be a problem, but when you have relation references to other layers, the tooltip can be composed by fields of the related layer (using represent_value()), and that's where it fails.
I will use the following image as an example.
The tooltip for this layer is the following expression:
represent_value("ug_id") || ' - ' || concat("codigo", ' - ' || "nome_propriedade" )
If I search for "Cadoiços" the results list gets empty, because that string in the first feature actually comes from another table.
Search works if I search for strings in the "codigo" and "nome_propriedade" fields, and the ID number in the "ug_id", but not on the result of represent_value("ug_id") which returns the description from the existing relation reference with another table. Which becomes quite confusing for users.
The workaround I found was to create a virtual field with the expression represent_value("ug_id") and made it searchable. It would be more user frinedly if search functionality also search on the tooltip for results.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing feature-list search in the mobile app and compare the fields it queries with the tooltip expression and relation-reference descriptions described in the issue. Reproduce the case using a related-layer value such as “Cadoiços”; done means searches also match tooltip text produced through represent_value(), while existing field searches continue to work.
Written by the indexing model from the issue text.
Assessment
- Domain
- mobile-dev, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100