[bisq-network/bisq] Add missing filtering on lists (PR #5963)

xyzmaker123 notifications at github.com
Fri Jan 21 21:23:46 CET 2022


@chimp1984 I fixed these small issues you mentioned on particular code lines.

### 1.
 Regarding code reusability I've moved it forward, details:
- I created [FilteringUtils](https://github.com/xyzmaker123/bisq/blob/e010a98402a05c1e1a86e50eb98722734aee5b32/desktop/src/main/java/bisq/desktop/util/filtering/FilteringUtils.java) that supports filtering upon certain entities
- I created generic [FilterBox](https://github.com/xyzmaker123/bisq/blob/b280b0ac5c93ca832ab81a9dfbc22fe970aa41e4/desktop/src/main/java/bisq/desktop/components/list/FilterBox.java) component that encapsulates filtering layout, listener and common logic


The main problem I have now is some inconsistency in code - fields are rendered in two ways:
A) with model usage, like [here](https://github.com/bisq-network/bisq/blob/8fa66ea7aafd4ebfdcda4b51a2f0eee7a576d2cd/desktop/src/main/java/bisq/desktop/main/portfolio/bsqswaps/UnconfirmedBsqSwapsViewModel.java#L107-L124)
B) inside item, like [here](https://github.com/bisq-network/bisq/blob/c4c231a8182421602e7e4ff8ec0423c3cdf75af9/desktop/src/main/java/bisq/desktop/main/funds/locked/LockedListItem.java#L111-L121)

I think we should unify it (personally I think B approach is better). What do you think?


I'll appreciate your feedback about changes I made so far.


## 2.
> basically it shoud always take the display string as that is what users would expect to be able to filter. Maybe there are some cases where additional domain data filtering is useful as well, but should be additional to the display string case.

Let's polish it after all of the work regarding reusability will be done

## 3.
> I am not so 100% sure if we should show the filter fields by default or extend it just when the user demand it. E.g. add a filter icon and when the user opens it show the field. That would help to not overload more the already overloaded UI.
We can persist the selection of hte icon, so users who prefer to have the filter get it automatically displayed at next restart.

It seems to be quite complex - I prefer not doing it in the scope of this particular pull request.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5963#issuecomment-1018832868
You are receiving this because you are subscribed to this thread.

Message ID: <bisq-network/bisq/pull/5963/c1018832868 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20220121/91814164/attachment-0001.htm>


More information about the bisq-github mailing list