Filter gramplet's fields position definition

In the Filter gramplet sometimes the first field is the name sometimes the ID. Where is the position of these fields defined in order to make it homogeneous from one view to another?

The code for the various sidebar filters (GUI) is in gramps/gui/filters/sidebar. Each view has its own definition, and the layout of the elements is defined in the Python code. For instance, in _personsidebarfilter.py the layout order is in the ‘create_widget’ method.

I’m not too sure that changing the order of these would be well received… Nick Hall would be the one to have to approve that.

1 Like

Paul’s got a point. And you might find you don’t like it either. But it sounds like it’d be worth an experiment. Maybe you could do a hack & see if it works?

Perhaps when it was originally created, they experimented and chose which the field that was normally what the filter would key upon. So they decided utility was more important than conformity.

Over the last year, I’ve been reading parts of different dev docs. One of the sections for developing add-ons talks about add-ons being replacements for core core.

It was not clear if the docs that meant someone could completely supplant a core module with an add-on. But the possibility sounds intriguing.

I wondered if some of the hacks (that are targeted for a not-yet-scheduled enhancement release) could be converted to add-ons that would be called instead of the original module? That would simplify beta testing.

There are hacks languishing in the MantisBT database (some for years) that aren’t targeted for release. And some seem so rough-hewn that they might never be released. But if they could be converted to add-ons to get some exposure & feedback, they might be refined into something that worthy of core inclusion.

As an example of retarded core evolution, it would be nice to see Nick’s modernization of the built-in Age Stats Gramplet as a short-term 5.1.x add-on before 5.2 version. (It has been ready for quite a while already.) Built-in Gramplets are crippled by the release cycle. They simply don’t get enough loops of the feedback & suggestion cycle to evolve.

(For instance, the new graph makes Gramplet desirable. But it probably won’t get the filter enhancement for another couple major releases. The reasoning might be that if it RECENTLY had some work, then shouldn’t jump the queue past other built-ins that need tweaking. And years down the line, it might get a revision to allow the graphing intervals to be adjusted.)

Looking at all the various sidebar filters, they all have ID as the first field except the Person filter which leads with Name. After Custom Filter, Name is my most often search criteria. I would be agnostic about any change. I would still be able to fill in the appropriate search field regardless of the order of options.

1 Like