Skip to content

Conversation

@Ashwolaa
Copy link
Contributor

@Ashwolaa Ashwolaa commented Jul 4, 2025

Small PR related to the behavior of the plugin manager

Some preliminary comments

  • The way the filter is being used does not require at all RegExp syntax and I am not sure that we are interested in going in that direction. Overall, this complexifies the syntax for not much reason.

  • The filter checks all the information (name/description/instrument) to test if a plugin should be displayed in the list. This does not feel necessary as a standard behavior (in particular if the plugin's description are outdated.)
    As a small example, by typing thorlabs
    image
    One gets access to plugins not related to it. In fact, it is because the thorlabs word appear in a url in the description of the plugin (which is not seen by the user).
    In fact, if one would type thor, all the plugins would be accepted as you can find authors in all the plugins' description.

What this PR does:

  • it simplifies the syntax by only testing str instead of using regexp making it less prone to error for standard use

  • it adds some QCheckBox to extend the filter settings, in general one would only need to filter by name which is now the standard use. With the example above, now we only see Thorlabs as expected.

image

  • it updates the use of Qt.Something to use the full path which makes it easier to read, e.g Qt.DisplayRole becomes Qt.ItemDataRole.DisplayRole with qtpy. In practice, this helps avoiding possible conflicts between different Qt version:

Ashwolaa and others added 2 commits July 4, 2025 12:36
- Replace regexp with simple str check as we were not benefiting from it (and it leads to problemwith qtpy)
- adding filter options to check for name (user can decide if he wants additional details)
@seb5g seb5g merged commit 88dd9a6 into PyMoDAQ:main Sep 27, 2025
@Ashwolaa Ashwolaa deleted the bugfix/regexp_and_filter_options branch September 28, 2025 12:16
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

Successfully merging this pull request may close these issues.

2 participants