Changes

Jump to: navigation, search

GEPS 041: New Selector

9,834 bytes added, 11:58, 20 February 2022
m
Clever search for each selector
What should be part of the [https://en.wikipedia.org/wiki/List_box Selector]?
==What is the need?==
# Runtime and performance
# Selection expected by the user, marked and tagged objects
# refining a selection
====[[Gramps_4.2_Wiki_Manual_-_Filters#Filter_vs._Search|Filter vs. Search]]====
The current design of the ''Search bar'' lets us find '''visible data''' on '''active column'''.
The ''Search Bar'' is often available on selectors.  [[File:Main-window-searchbar-annotated-42.png|Search Bar concept]]
====Set of filter rules====
For now, some selectors, on reports and on Family Editor, provide a ''fast filter'', '''by default'''.
The ''Search bar'' is disabled and an additionnal additional ''Show all'' bouton button is available at the bottom
of the dialog.
For limiting a gtk issue on ''Search'' field, gramps42 has it '''own interactive search widget'''.
 
[[File:Interactive_search.png|Interactive Search]]
Just write the first letters of the word on the dialog, and the cursor will try to find this word.
# Few fast filter rules, by default
# Consistency, mixup of features and widgets
# Hierarchically grouping records (e.g., Person, Place) in the Selector cripples sorting capabilities. Sub-sorting within grouping by "Last Changed" is of little value compared for the entire list. Add option to use Flat lists?
 
{{man note|Note, there was a [[#Interactive_Search|Gtk SearchEntry bug (latency and collapsed seizure)]] limiting a good search match: max_length(3).|Fixed since gramps 4.2.0, see bug report {{bug|1450}}.}}
Note, there is still a [[#Interactive_Search|Gtk SearchEntry bug (latency and collapsed seizure)]] ==Proposals==
limiting a good search match: max_length(3)'''Optional''' proposals.
Fixed since gramps 4[[File:GEP41_new_selector.2.0, see bug report {{bugpng|675px|1450}}.Search and filter on new selector]] ===Displayed columns===
==Proposals==
'''Current Selectors''':
{|class="wikitable"
! | Selector
! Columnsand search keys
! Interactive Search key
|-
! Columns
! Interactive Search key
! Search keys with regex support
|-
|Person
|Name, ID, Gender, Birth Date, Birth Place, Death Date, Death Place, Spouse, <s>Last Change</s>
|Name
|Name, ID, Gender, Birth Date, Birth Place, Death Date, Death Place, Spouse
|-
|Family
|ID, Father, Mother, <s>Last Change</s>
|ID
|ID, Father, Mother
|-
|Event
|Type, Main Participants, Date, Place, Description, ID, <s>Last Change</s>
|Type
|Type, Main Participants, Date, Place, Description, ID
|-
|Place
|Name, ID, Type, Title, <s>Last Change</s>
|Name
|Name, ID, Type, Title
|-
|Source
|Title, Author, ID, <s>Last Change</s>
|Title
|Title, Author, ID
|-
|Citation
|Source: Title or Citation: Volume/Page, ID, <s>Last Change</s>
|Source: Title
|Source: Title or Citation: Volume/Page, ID
|-
|Repository
|Title, ID, <s>Last Change</s>
|Title
|Title, ID
|-
|Media
|Title, ID, Type, <s>Last Change</s>
|Title
|Title, ID, Type
|-
|Note
|Preview, ID, Type, Tags, <s>Last Change</s>
|Preview
|Preview, ID, Type, Tags
|-
|}
===Fast filter by default===
Ability to have a fast filter with the last active objects and bookmarked objects.
Some experimentations have been made on feature request {{bug|5024}}.
See [[#Screenshots|Person selector]] on reports and [[#Set_of_filter_rules|Father/Mother selector]] on Family Editor.
{{man note|''On gramps '''4.2.2''There is ', there was a bug {{bug|9315}} on the '''Show all'''/'''FindSearch''' featuresload''.See [[#Others|others]]}}
===Clever search for each selector===
[[File:Gramps_connect_query.png|Search query and filter on gramps_connect]]
Ability to also use one search field matching on multiple columns (''names'', ''ID'', ''datedates'', etc .) [[File:Gramps_connect_search..)png|675px|Search on gramps_connect]]
See also [[Filehttps:Gramps_connect_search//cloud.githubusercontent.com/assets/310024/13737225/d8c0a7d4-e978-11e5-9e9f-58a6c4c162a5.png|Search search on gramps_connect]filter rules editor]
===Interface for handling and selecting custom filters on selectors===
See * [[UI_style|User Interface Style]]* [https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/nautilus/nautilus-next/search-filters-wires.png mockupsMockups] and [https://csorianognome.wordpress.com/2016/02/08/nautilus-3-20-and-looking-forward/ new features] since Gnome gtk+ 3.20.
===Additional proposals===
[[File:GEP41_fast_filter.png|GtkSwitcher]]
{{===History=== * Provide dynamic groups of objects based on the date of the last edition. ** via API  time = object.get_change_time()  last = today group1 = from today to 1 week back group2 = from today to 2 weeks back group3 = from today to 1 month back group4 = from today to 6 months back group5 = more than 6 months back ** via Filter  sfilter.add_rule(rules.event.ChangedSince(["''Today date''", ""]))where "''Today date''" uses ISO-}}date format. * Displayed items can be sorted by change time
==See also==
 
* [https://github.com/gramps-project/gramps/tree/master/gramps/gui/selectors gramps/gui/selectors]
* [[Database_Query_API]]
=== Feature requests ===
*{{bug|9837}}: More than 10 items in 'Latest Change' Gramplet list*{{bug|9814}}: Expanded Place tree when selecting existing place*{{bug|9276}}: <s>Need ability to search alternate place names when selecting place</s>
*{{bug|8762}}: Last Used places in the Select Place window
*{{bug|8743}}: Search for place needs more options
*{{bug|7342}}: <s>Show "Main Participants" with events </s>*{{bug|6558}}: Optimize the use of citations *{{bug|6332}}: Move home person to bookmark menu
*{{bug|5142}}: Keep selected the last selected source
*{{bug|5037}}: [Reports] More names listed in the person/family selector box
*{{bug|5024}}: By default, to display [Last Recent Used] and [bookmarked] objects on selectors
*{{bug|3655}}: "last modified" timestamp changes everytime a tree is accessed
*{{bug|12026}}: Add Existing Person is missing Find feature
*[https://gramps.discourse.group/t/quickselect-combo-boxes/202 Discourse Topic]: [https://gramps.discourse.group/c/ideas/9 Ideas]; QuickSelect combo-boxes
=== Others ===
*{{bug|9880}}: <s>Time loading for person selector in census forms</s>*{{bug|9738}}: <s>Select person dialog opens always expanded</s>*{{bug|9700}}: <s>Select Place search & Source/Citation hierarchy should NOT automatically open</s>*{{bug|9315}}: <s>[Regression]: filter set by default on selector is ignored on load (_init_) </s> *{{bug|9314}}: <s>Two selectors on Places report can generate a confusion </s> *{{bug|9028}}: <s>Find is broken when used in the Family selector </s> *{{bug|7536}}: <s>Events model does not have 8 columns</s>*{{bug|7514}}: <s>Searching on Listviews is VEEERYYY slow and typing echo is scrambled</s>*{{bug|7004}}: <s>Only Event and Family Editors are checking if data_has_changed on save()</s>*{{bug|5032}}: <s>Report selection logic</s>*{{bug|3653}}: <s>Manage Family Trees Window shows as 'last modified' the time stamp of generating the tree</s>*{{bug|1450}}: <s>Incremental Gtk Search is broken on View</s> ==Test== Some experimentations are available on a forked branch. {{man warn|New Branch|Based on gramps master branch, a new major branch with many changes. For tests, need to focus on ''Selector'' features}} [https://github.com/romjerome/gramps_cryptic_rebase/archive/refs/heads/Selectors.zip Download a copy], unzip the archive and run: $ cd gramps_cryptic_rebase-Selectors $ python3 Gramps.py -d "gui.selector"create a '''new family tree''', and import a '''copy of your data'''. {{man note|Resource path|You may have to play with resource path.}}  $ ResourcePath.ERROR: Unable to determine resource path $ export GRAMPS_RESOURCES=/usr/local/lib/python3.6/dist-packages/gramps-5.2.0-py3.6.egg/share ===Warnings=== Tested some years ago with remaining indirect and unfixed issues (title, model, editors) because the focus was on possible modifications on Selectors. Should take it as a draft. ==Performances== {| {{prettytable}}|-!Test Code !People (1)!Families (2)!Events (3)!Places (4)!Sources (5)!Citations (6)!Repositories (7)!Media (8)!Notes (9)|-|id0|17565 individuals - 3918 surnames|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|-|id1 |4009 individuals - 1031 surnames|1633|9426|1043|1376|2870|38|1542|924|-|id2 |<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|-|id3 |<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|-|id4 |<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|<!-- -->|-|<!-- Test Code -->|<!-- People -->|<!-- Families -->|<!-- Events -->|<!-- Places -->|<!-- Sources -->|<!-- Citations -->|<!-- Repositories -->|<!-- Media -->|<!-- Notes -->|} === Configurations === {| {{prettytable}}|- !Hardware Code!Gramps version!Processor!Clock!RAM!Storage<!--Type eg: HDD or SSD-->!OS!User|-|H01 || 4.2.3 || AMD FX-4100 quad || 3.6 GHz || 8 GB || SSD || .. || Chris|-|H02 || 4.2.5 || AMD FX-4100 quad || 3.6 GHz || 8 GB || SSD || .. || Chris|-|H03 || GEP041 || AMD FX-4100 quad || 3.6 GHz || 8 GB || SSD || .. || Chris|-|H04 || 4.2.5 || Intel Pentium 4 HT || 2.8 GHz || 512 MB || HDD || Ubuntu 14.04 based|| [[User:Romjerome]]|-|H05 || GEP041 || Intel Pentium 4 HT || 2.8 GHz || 512 MB || HDD || Ubuntu 14.04 based|| [[User:Romjerome]]|-|H06 || 5.0.0-alpha (5099b42) || Intel Pentium 4 HT || 2.8 GHz || 512 MB || HDD || Ubuntu 14.04 based|| [[User:Romjerome]]|-|H07 || 4.2.3 || .. || .. GHz || .GB || SSD || .. || ..|-|H08 || 4.2.5 || .. || .. GHz || .GB || SSD || .. || ..|} === Tests table legend === {| {{prettytable}}|-!Test Code !! Test Description|- |T01 || Time to '''open''' the Person Selector, no '''search''' yet|- |T01_a || Time to find the person from {{man label|Association}} tab on {{man label|Person Editor}}|- |T01_b || Time to find the person from Selector on {{man label|Reports}}, '''pre-selection'''|- |T01_c || Time to find one parent from {{man label|Family Editor}}, '''pre-selection'''|- |T01_d || Time to find one child from {{man label|Family Editor}}, '''pre-selection'''|-|T01_e || Time to '''open''' the active person from {{man label|Form}} addon, no need '''search''' time|-|T01_f || Time to find the non-active person from {{man label|Form}} addon|-|T02 || Time to find the {{man label|Family}} from Selector|-|T03 || Time to find the {{man label|Event}} from Selector|-|T04 || Time to find the {{man label|Place}} from Selector|-|T05 || Time to find the {{man label|Source}} from Selector|-|T06 || Time to find the {{man label|Citation}} from Selector|-|T07 || Time to find the {{man label|Repository}} from Selector|-|T08 || Time to find the {{man label|Media}} from Selector |-|T09 || Time to find the {{man label|Note}} from Selector |} === Performance results === You can add print statements, like: import time one = time.clock() two = time.clock() print(two-one)then run gramps via console {| {{prettytable}}|-!Config !! data !! T01 (no search, build model)!! T01_a (raw find and search)!! T01_b (filter by user data)!! T01_c (filter by sex)!! T01_d (filter, skip list)!! T01_e (no search, has_focus)!! T01_f (alternative focus)!! comments|-|H01||id0||bgcolor="#a0ffa0"|2.5s||bgcolor=""|-||bgcolor=""|-||bgcolor=""|-||bgcolor=""|-||bgcolor="#a0ffa0"|2.5s||bgcolor=""|-||expands only surname of person selected|-|H02||id0||bgcolor="#ffa0a0"|18s||bgcolor=""|-||bgcolor=""|-||bgcolor=""|-||bgcolor=""|-||bgcolor="#ffa0a0"|18s||bgcolor=""|-||expands all surnames|-|H03||id0||bgcolor="#e0ffe0"|5s||bgcolor=""|-||bgcolor=""|-||bgcolor=""|-||bgcolor=""|-||bgcolor="#e0ffe0"|5s||bgcolor=""|-||expands all surnames|-|H04||id1||bgcolor="#e0ffe0"|4s<t<12s||bgcolor="#e0ffe0"|7s<t<15s||bgcolor="#a0ffa0"|>3s||bgcolor="#a0ffa0"|<3s||bgcolor="#e0ffe0"|6s||bgcolor="#a0ffa0"|4s||bgcolor="#e0ffe0"|7s||Sometimes, BaseSelector.__init__can take 2/3 of time|-|H05||id1||bgcolor="#a0ffa0"|4s||bgcolor="#a0ffa0"|~5s||bgcolor="#a0ffa0"|~3s||bgcolor="#a0ffa0"|~3s||bgcolor="#e0ffe0"|~5s||bgcolor="#a0ffa0"|4s||bgcolor="#e0ffe0"|~6s||if filter does right, then few seconds for matching, else ~+3 seconds for finding|-|H06||id1||bgcolor="#a0ffa0"|4s||bgcolor="#a0ffa0"|~7s||bgcolor="#a0ffa0"|~4s||bgcolor="#a0ffa0"|~3s||bgcolor="#e0ffe0"|~6s||bgcolor="#a0ffa0"|5s||bgcolor="#e0ffe0"|~7s||Do not have problem. Need ~+3 seconds for finding. Time close to GEP041 (~+1s).|} Tests could be on BaseSelector as some objects do not have own _init_(). {| {{prettytable}}|-!Config !! data !! T02 !! T03 !! T04 !! T05 !! T06 !! T07 !! T08 !! T09 !! comments|-|H04||id1||bgcolor="#a0ffa0"|<1s||bgcolor="a0ffa0"|<1s||bgcolor="#a0ffa0"|<1s||bgcolor="#a0ffa0"|1s||bgcolor="a0ffa0"|<1s||bgcolor="a0ffa0"|<1s||bgcolor="a0ffa0"|<1s||bgcolor="a0ffa0"|<1s||''very fast'': +/- 3 seconds for matching, searching, finding.|-|H05||id1||bgcolor="#a0ffa0"|<3s||bgcolor="#a0ffa0"|<3s||bgcolor="#a0ffa0"|<3s||bgcolor="#a0ffa0"|<4s||bgcolor="#a0ffa0"|<3s||bgcolor="#a0ffa0"|<3s||bgcolor="#a0ffa0"|<3s ||bgcolor="#a0ffa0"|<3s||''fast'': filter rules provide a user selection (last edited, last used, bookmarked, related, active), else, +/- 3 seconds for matching, searching, finding.|} ===More=== {| {{prettytable}}|-!Config !! data !! T01 (no search)!! T01_a (raw find and search)!! T01_b (filter by user data)!! T01_c (filter by gender)!! T01_d (filter)!! T01_e (no search, has_focus)!! T01_f (alternative focus)!! comments|-|H07||id2||bgcolor="#ffa0a0"|1m||bgcolor="#a0ffa0"|1s||bgcolor="#e0ffe0"|10s||bgcolor="#ffa0a0"|1m||bgcolor="#a0ffa0"|1s||bgcolor="#e0ffe0"|10s||bgcolor="#ffa0a0"|1m ||comments|-|H08||id2||bgcolor="#ffa0a0"|1m||bgcolor="#a0ffa0"|1s||bgcolor="#e0ffe0"|10s||bgcolor="#ffa0a0"|1m||bgcolor="#a0ffa0"|1s||bgcolor="#e0ffe0"|10s||bgcolor="#ffa0a0"|1m ||comments|} Tests could be on BaseSelector as some objects do not have own _init_(). {| {{prettytable}}|-!Config !! data !! T02 !! T03 !! T04 !! T05 !! T06 !! T07 !! T08 !! T09 !! comments|-|H07||id2||bgcolor="#ffa0a0"|-||bgcolor="#a0ffa0"|-||bgcolor="#e0ffe0"|-||bgcolor="#ffa0a0"|-||bgcolor="#a0ffa0"|-||bgcolor="#e0ffe0"|-||bgcolor="#ffa0a0"|-||bgcolor="#a0ffa0"|-||comments |-|H06||id2||bgcolor="#ffa0a0"|-||bgcolor="#a0ffa0"|-||bgcolor="#e0ffe0"|-||bgcolor="#ffa0a0"|-||bgcolor="#a0ffa0"|-||bgcolor="#e0ffe0"|-||bgcolor="#ffa0a0"|-||bgcolor="#a0ffa0"|-||comments |} 
[[Category:GEPS|S]]

Navigation menu