Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the standard search bar to the SelectPerson dialog #1865

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stevenyoungs
Copy link
Contributor

Add the standard search bar to the SelectPerson dialog

@stevenyoungs
Copy link
Contributor Author

This is draft, pending user feedback from the forum. See the post Adding Search Bar to Select Person Dialog

@stevenyoungs
Copy link
Contributor Author

Requires PR #1869 to be merged first

@stevenyoungs
Copy link
Contributor Author

This is now ready for review.
The image below shows what adding a Father now looks like by default:
image
With #1869 is applied the filter becomes "Gender is"
The user experience for adding a Mother is similar, but the text defaults to Female
When adding a child, there is no default filter applied.

The user can click Clear to remove the default filter. All people are then shown. This allows the "Show All" toggle to be removed.
Using the search bar filter removes the ambiguity of whether the search bar or default filter should take precedence; they are now one and the same.

This was in part made possible by using the search bar filter instead of FastMaleFilter and FastFemaleFilter classes. Whilst the class names imply they are fast, when measured in gramps 6.0 performance was essentially the same.
Tests were carried out using a 15 generation tree containing 32,767 individuals. The tree was created using [Gedfan](https://www.tamurajones.net/[GedFan](https://www.tamurajones.net/GedFan.xhtml)

Using FastMaleFilter: 5 runs
PersonTreeModel rebuild_data 5.990803000051528 sec
PersonTreeModel rebuild_data 6.005976999993436 sec
PersonTreeModel rebuild_data 6.018445700057782 sec
PersonTreeModel rebuild_data 6.21256649994757 sec
PersonTreeModel rebuild_data 5.999285100027919 sec

Using search bar filter: 5 runs
PersonTreeModel rebuild_data 6.127757900045253 sec
PersonTreeModel rebuild_data 5.954343599965796 sec
PersonTreeModel rebuild_data 6.565670200041495 sec
PersonTreeModel rebuild_data 6.176048699999228 sec
PersonTreeModel rebuild_data 6.132094100001268 sec

@stevenyoungs stevenyoungs force-pushed the selectperson-searchbar branch from 5017ef4 to c5297fb Compare January 25, 2025 16:56
@Nick-Hall
Copy link
Member

This looks like a better approach.

@stevenyoungs
Copy link
Contributor Author

stevenyoungs commented Jan 25, 2025

The bug fix part of #1865 has been combined into this PR

@stevenyoungs stevenyoungs marked this pull request as ready for review January 25, 2025 17:21
When the user specifies a filter in the search bar, use this in preference to the default filter.
… classes

In testing, performance was observed to be very similar
From a usability point of view, it is now clear to the user what, if any, filter is applied.
The user can click the Clear button to remove the filter. This allows the Show All toggle to be removed.
@Nick-Hall Nick-Hall force-pushed the selectperson-searchbar branch from 6504604 to ac267fd Compare January 25, 2025 19:28
@Nick-Hall
Copy link
Member

Rebased.

@Nick-Hall Nick-Hall added this to the v6.0 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants