-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add missing filtering on lists #5963
Conversation
if (filterString.isEmpty()) | ||
return true; | ||
|
||
if (item.getBalance().toString().contains(filterString)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not cover formatted string. E.g. if balance is 0.01 BTC and you type in 0.01 it is not found.
Better create a new string field in the itme (formatter.formatCoin(this.balance) which reflects the displayed string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
desktop/src/main/java/bisq/desktop/main/funds/deposit/DepositView.fxml
Outdated
Show resolved
Hide resolved
boolean matchesBuyersPaymentAccountData = false; | ||
boolean matchesSellersPaymentAccountData = false; | ||
if (contract != null) { | ||
isBuyerOnion = contract.getBuyerNodeAddress().getFullAddress().contains(filterString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those predicates appear several times. Would be good to make it reusable code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pubKeyRing | ||
); | ||
} else { | ||
return new DummyTransactionAwareTradable(tradable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that is from old code, but as that case never gets executed I think we should return null here and then filter out null in the next step. Tradable is only extended from OpenOffer and TradeModel (one other case is not relevant here). The DummyTransactionAwareTradable can be removed then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not looked closely to the other filter predicates. But 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. 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. I know the earlier filter implementations have been done the same way (by myself), but as we extend it now to more screens I think its worth to put a bit more effort into it. Beside that great to see that filter added to more screens. |
@chimp1984 I fixed these small issues you mentioned on particular code lines. 1.Regarding code reusability I've moved it forward, details:
The main problem I have now is some inconsistency in code - fields are rendered in two ways: 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.
Let's polish it after all of the work regarding reusability will be done 3.
It seems to be quite complex - I prefer not doing it in the scope of this particular pull request. |
Yes agree. Don't remember the reasons why that was in the ViewModel, maybe because it accessed other ViewDataModel code or as it was already used from earlier code. But I also dislike that. Rest looks good to me. Not sure if I find time for a full review... If @ripcurlx does not find time ping me again. Thanks. |
This part is finished - |
I'll try to review it tomorrow. Could you please resolve the conflict of this PR with master which was caused by a merge today. Thanks! |
Thanks @ripcurlx. It's rebased. |
I'm in the middle of an in-depth code review and started now to test it in the client itself.
|
I think it would be great to ignore lower upper case differentiation in transactions on the Details column as users are expecting it like that IMO |
Similar behavior would be great for:
But great to see this option now for all lists 👍 |
desktop/src/main/java/bisq/desktop/main/portfolio/bsqswaps/UnconfirmedBsqSwapsView.java
Show resolved
Hide resolved
@ripcurlx Thanks for review - I either fixed or put additional explanation on comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK - Tested it on Regtest
Column sorting by date is broken in |
@xyzmaker123 thanks for this. It is working well for me. |
Fixes #5307
PR introduce possibility to filtering these lists:
Code from Funds -> Transactions was also simplified to be more consistent with whole code base.