UnitySimpleFileBrowser icon indicating copy to clipboard operation
UnitySimpleFileBrowser copied to clipboard

Make file filters extensible by turning them into an interface, instead of concrete class.

Open arturaz opened this issue 3 years ago • 6 comments
trafficstars

arturaz avatar Apr 13 '22 11:04 arturaz

Thank you for the PR. How did you benefit from this change in your own projects? What did your custom IFilter implementations do differently than Filter?

yasirkula avatar Apr 13 '22 16:04 yasirkula

We needed to filter based on regex, something like new Regex(".data-.+?-ourextension"). This allowed us to implement the custom filter for this case.

arturaz avatar Apr 13 '22 18:04 arturaz

Is there any improvement that should be made to get this merged?

arturaz avatar Apr 18 '22 09:04 arturaz

I couldn't inspect most of the recent PRs in detail due to my busy schedule for a long time. About this feature, I was originally thinking about adding an event to FileBrowser to filter the files with custom C# code (regex can be applied in that event). That solution seems cleaner to me as I'd like to keep file filters as clean and simple as possible.

P.S. Actually I forgot that I've already added that event in a past release: FileBrowser.DisplayedEntriesFilter

yasirkula avatar Apr 19 '22 16:04 yasirkula

We needed to filter based on regex, something like new Regex(".data-.+?-ourextension"). This allowed us to implement the custom filter for this case.

---- On Wed, 13 Apr 2022 19:42:11 +0300 Süleyman Yasir KULA @.***> wrote ----

Thank you for the PR. How did you benefit from this change in your own projects? What did your custom IFilter implementations do differently than Filter?

— Reply to this email directly, https://github.com/yasirkula/UnitySimpleFileBrowser/pull/64#issuecomment-1098265995, or https://github.com/notifications/unsubscribe-auth/AAADFA2ELI2LJC3F6ILB3PDVE32OHANCNFSM5TKNPIXA. You are receiving this because you authored the thread.

arturaz avatar Oct 11 '22 07:10 arturaz

I'm open to merging this pull request but please see my review and also merge the latest commit on the mainstream to your branch.

yasirkula avatar Oct 11 '22 08:10 yasirkula