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

FilterParams 1.1.7 is rendering oddly in Gramps 5.2.1 #41

Open
emyoulation opened this issue Sep 8, 2024 · 2 comments
Open

FilterParams 1.1.7 is rendering oddly in Gramps 5.2.1 #41

emyoulation opened this issue Sep 8, 2024 · 2 comments

Comments

@emyoulation
Copy link

Filter Params rendered the filter very strangely.

  1. The filter name and check box parameters are indented way to the right of their labels
  2. checkboxes are shown as values
  3. the color fills are fragmented (2 shades of grey fill and 5 shades of blue fill.)
    image

I created a 2-stage custom filter using Mathias Kemmer's addon rule PersonsInFamilyFilterMatch ( infamilyrule.py ) of the FilterRules addon rule pack.

I think that part of the problem is the way the addon rule is written. It certainly is SLOOOOW. And the source is internally remarks as having some ugly hacks. (I will ask Matt to open a Discourse discussion about optimizing it. This could serve as an example of how to improve rule coding.)

<filters>
  <object type="Person">
    <filter name="Find the Family Members of" function="and">
      <rule class="PersonsInFamilyFilterMatch" use_regex="False" use_case="False">
        <arg value="Find a specific Family"/>
        <arg value="1"/>
        <arg value="1"/>
      </rule>
    </filter>  
  </object>
  <object type="Family">
    <filter name="Find a specific Family" function="and">
        <rule class="HasIdOf" use_regex="False" use_case="False">
          <arg value="F000162"/>
        </rule>
    </filter>
  </object>
</filters>
@kkujansuu
Copy link
Owner

kkujansuu commented Sep 8, 2024 via email

@emyoulation
Copy link
Author

Actually, I think that FilterParams may a very effective litmus test for whether a rule is consistent with guidelines.

In use, I suspect it is a far better tool than you fear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants