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

Add wallet name to address book page title #757

Conversation

pablomartin4btc
Copy link
Contributor

@pablomartin4btc pablomartin4btc commented Sep 13, 2023

It fixes #756.

Each address book page window it's now labeled with the wallet name they were opened with, so the user can easily identify which addresses belong to which wallet even when there are many windows opened. It's a helpful enhancement for users managing multiple wallets.

image

@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 13, 2023

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
ACK hebasto
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

Reviewers, this pull request conflicts with the following ones:

  • #753 (Add new "address type" column to the "receiving tab" address book page by pablomartin4btc)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 9fc21cf

@hebasto
Copy link
Member

hebasto commented Sep 23, 2023

Tested 9fc21cf. It works as expected.

However, I'm curious, doesn't the ability to open "Sending/Receiving addresses" windows for multiple wallets rather confuse the user than improve their experience?

Maybe, it makes sense to make those windows modal?

@hebasto hebasto added Wallet UX All about "how to get things done" labels Sep 23, 2023
@hebasto
Copy link
Member

hebasto commented Sep 23, 2023

@pablomartin4btc
Copy link
Contributor Author

Making those windows modal could be an alternative but it would change the present behaviour unexpectedly for those users that are used to it. Perhaps a current use case could be that a user may want to make transfers between wallets and needs to see their addresses.

Some other alternative could be that when a user selects a different wallet a dialog shows up asking to confirm the preference to close the addresses book page/ s (sending/ receiving/ both) hide them temporarily (until the user selects the wallet back) or just keep them open? Then we can also save it as a setting so that dialog doesn't show up anymore or ask for confirmation every time.

src/qt/addressbookpage.cpp Outdated Show resolved Hide resolved
src/qt/addressbookpage.cpp Outdated Show resolved Hide resolved
src/qt/addresstablemodel.cpp Outdated Show resolved Hide resolved
@@ -451,3 +451,5 @@ void AddressTableModel::emitDataChanged(int idx)
{
Q_EMIT dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex()));
}

QString AddressTableModel::GetWalletDisplayName() const { return walletModel->getDisplayName(); };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This shouldn't be flattened to a single line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the same convention as in 7 lines above to keep it consistent:

OutputType AddressTableModel::GetDefaultAddressType() const { return walletModel->wallet().getDefaultAddressType(); };

I'm happy to change it, or move it to the header file maybe? I saw other places in the code where we have single line in headers with the implementation, but there were mostly getters and setters I think.

src/qt/addressbookpage.cpp Outdated Show resolved Hide resolved
Extend addresstablemodel to return the display name from the wallet and
set it to the addressbookpage window title when its  model is set.
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 58c9b50, tested on Ubuntu 22.04.

@hebasto hebasto merged commit 8369467 into bitcoin-core:master Oct 4, 2023
7 of 16 checks passed
Frank-GER pushed a commit to syscoin/syscoin that referenced this pull request Oct 13, 2023
58c9b50 gui: Add wallet name to address book page (pablomartin4btc)

Pull request description:

  It fixes bitcoin-core/gui#756.

  Each address book page window it's now labeled with the wallet name they were opened with, so the user can easily identify which addresses belong to which wallet even when there are many windows opened. It's a helpful enhancement for users managing multiple wallets.

  ![image](https://github.com/bitcoin-core/gui/assets/110166421/628e37bb-87b9-42fb-9158-bffdd8428bcb)

ACKs for top commit:
  hebasto:
    ACK 58c9b50, tested on Ubuntu 22.04.

Tree-SHA512: 82febc020653560281da144cd35c672c49ca9f48b23d173eb19395e9ab4d045500295a9b5f24c82efdbf6e7ea70c87e733207cb6a31d3f84828b27e3b2df558b
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Oct 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
UX All about "how to get things done" Wallet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Address book page window (receiving or sending) should display the wallet name on its title
5 participants