gui
gui copied to clipboard
Add new "address type" column to the "receiving tab" address book page
This PR fixes #646 and introduces some enhancements to the Address Book functionality.
A new "Address Type" column has been added to the address book table page, only visible for the "Receiving address" tab. Users can employ an also new added combo box at the bottom of the page to filter address by their type, this filtering can be combined with the current search line text box. When the export feature is used, this new field will be included.
As highlighted with the performed manual testing shown in the image above:
- address type combo box has been reused from receive coins dialog, but each widget container can specify different tool-tips for their items;
- "Sending address" tab doesn't display the new column, combo box or its label, and the search text specify only the fields to be filtered out;
- "Receiving address" tab display the new added widgets, filter works fine in combination of either text, combo item selection or combination of both, tool-tip texts differs from the ones on the receive coins dialog where the address can be created specifying their types.
Tested in mainnet and all test networks.
For code reviewers, please check the commit messages for a detailed breakdown.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| Concept ACK | hernanmarino, BrandonOdiwuor |
| Stale ACK | MarnixCroes |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
No conflicts as of last run.
it jumps weird when having it sorted on address type and then changing the address type.
Yeah, it seems that that's due to the resize mode configuration, it was something that was already happening:
I'll check if it can be fixed.
Fixed the issue reported by @MarnixCroes above where the columns were resizing incorrectly.
A follow up could be to set a default width value for each column or most of them and have the feature of storing the user preferable width as in the peers table in the "Node window".
Thanks for checking that also @MarnixCroes.
That looks weird, the way the export button works or its functionality behind it hasn't been even touched. For me, on master and with any network passed at the startup works the same, I always get the 2nd dialog you posted.
I'll try it later on a different OS. Did the export actually worked for you? Another thing I could think of is that perhaps the new filter model has some particular behavior but I can imaging that would be used for the persistence, not for the file dialog itself, could you please try testing it just up to the 3rd. commit (that's where the new column is added but not the filter & combo-box)? On the folder you have this PR's code you can do it by running git checkout 95d5b3c65cc6be67eb270e5ddd5e8abf068fd0f3.
@pablomartin4btc Please ignore my previous comment, I cannot repro it on master or other PR commits, sorry my bad.
Did the export actually worked for you?
yes it does
@pablomartin4btc Please ignore my previous comment, I cannot repro it on master or other PR commits, sorry my bad.
Don't worry, it was a good spot. This is the part of the code that opens the "Save file..." (app) dialog and as you can see the title that you were seeing in your first screenshot for master, "Export Address List" is being set there: https://github.com/bitcoin-core/gui/blob/4b00cdc6fd9109a6b1094b936e175e9909155857/src/qt/addressbookpage.cpp#L320-L324 That code hasn't been touched by this PR.
I couldn't reproduced it in either master or this branch in both Ubuntu 20.04 or 22.04 but I crossed compiled it in WSL and run bitcoin-qt in Windows 11 Pro and you can see the "Export Address List" dialog in both master and this PR (you can note that master doesn't have the new column address type in the receiving window):
master:
this PR:
So this PR hasn't interfered with the way that on the export feature the save file dialog is getting open or displayed.
Rebased.
@luke-jr would you be interested on looking at this if you have some time?
I don't know how useful this is. Why would users care to see only a certain type, or to see what type addresses are like this?
I don't know how useful this is. Why would users care to see only a certain type, or to see what type addresses are like this?
Well, since QT offers to the user the feature to create certain types, it'd make sense to list them properly identifying the original intention.
Personally, I'd add the column on the "Requested payments history" as well (or making it optional, adding previously a feature to show/ hide columns, feature that could be more useful on the Peers table).
It'd have been good to discuss it on the issue #646 itself, which has been moved from the core repo, perhaps I should've asked before working on it. However, given that it's already developed, I don't think it would hurt to merge it once it gets approved accordingly, of course.