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

[WIP] PR: Support for dynamic filtering of files #15968

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oscargus
Copy link
Contributor

@oscargus oscargus commented Jul 2, 2021

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Initial attempt of dynamic filtering of files as discussed in #15939

Currently it works when GLOB-type expressions are used, so sort of useful, but not as it is planned to be. Primarily opening this so that it is clear that it is worked on and to get potential feedback on the button placement etc.

image

Also, it wasn't really clear to me where I should have put the combo box in the code. Right now it is in ExplorerTreeWidget, but could also be created directly in ExplorerWidget.

No documentation and no tests so far.

Issue(s) Resolved

Fixes #15939 (sort of)

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: Oscar Gustafsson, oscargus

@pep8speaks
Copy link

pep8speaks commented Jul 2, 2021

Hello @oscargus! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-07-05 16:22:03 UTC

@oscargus
Copy link
Contributor Author

oscargus commented Jul 2, 2021

Probably it makes sense to use a text box instead as the feature of saving old queries is not so useful/easy to implement with dynamic searching...

@oscargus oscargus changed the title WIP: Support for dynamic filtering of files [WIP] PR: Support for dynamic filtering of files Jul 2, 2021
@oscargus oscargus marked this pull request as draft July 5, 2021 16:32
@ccordoba12
Copy link
Member

ccordoba12 commented Jul 5, 2021

Hey @oscargus, thanks a lot for this! My initial comments about this:

  • It's fine that you did this PR against master and not 5.x because 5.x won't receive new features.

  • I think we should leave the static filtering functionality as it is. For me it's nice that you can discard certain file types or directories by default.

  • You should probably add a new button to "search" for files (although it's technically filtering) and a text field at the bottom to do the search, in a similar fashion to the current button and filed that filter variables in the variable explorer:

    imagen

  • Fuzzy or dynamic filtering model should be applied on top of the static one.

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.

Add fuzzy seaching and a refresh button to Files pane
3 participants