Skip to content

Filter feature proposed changes #2680

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

Merged
merged 7 commits into from
Jun 18, 2025

Conversation

rdswift
Copy link
Collaborator

@rdswift rdswift commented Jun 17, 2025

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences: Suggested improvements to the newly added metadata filtering system.

Problem

The newly added metadata filtering system provides some unexpected results.

  • JIRA ticket (optional): PICARD-XXX

Solution

This PR proposes some changes as follows:

  1. Add Persistent Settings:

    • Add persistent settings for selected filters, so that the settings are retained between sessions.
  2. Filter Logic Changes:

    • Return True if no filters selected or no filter text entered.
    • Return True if no tags are found for selected filters.
    • Return True if tag found in selected filters and filter text in tag value.
    • Return False if one or more tags found in selected filters and filter text not in any values of the tags found.
  3. Add Master Selection Checkbox:

    • Add checkbox at the top of the dialog to select / clear all filters.
  4. Add Logging:

    • Add debug logging when the set of filterable tags is updated.

The new dialog looks like:

image image

Action

Additional actions required:

  • Update Picard documentation (please include a reference to this PR)
  • Other (please specify below)

rdswift added 4 commits June 17, 2025 08:32
- Return True if no filters selected or no filter text entered.
- Return True if no tags are found for selected filters.
- Return True if tag found in selected filters and filter text in tag
value.
- Return False if one or more tags found in selected filters and filter
text not in any values of the tags found.
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good improvements. LGTM.

@rdswift
Copy link
Collaborator Author

rdswift commented Jun 17, 2025

Two questions:

  1. Should we also persist the filter text?
  2. Should we include an option to filter on ANY metadata tag, including hidden tags and those not found in the filterable_tags set? I can't think of a use case, but there may be one that other users might find necessary.

Both are fairly easy to include, but I don't want to overdo this with things that might not make sense.

@zas
Copy link
Collaborator

zas commented Jun 17, 2025

  1. Should we also persist the filter text?

I'd say no.

2. Should we include an option to filter on ANY metadata tag, including hidden tags and those not found in the filterable_tags set? I can't think of a use case, but there may be one that other users might find necessary.

Nope, keep it simple.

@phw phw merged commit 66feb00 into metabrainz:master Jun 18, 2025
47 checks passed
@rdswift rdswift deleted the search_feature_proposed_changes branch June 18, 2025 13:43
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.

3 participants