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

wallet: Allow user to navigate options while encrypting at creation #722

Merged

Conversation

hernanmarino
Copy link
Contributor

@hernanmarino hernanmarino commented Mar 16, 2023

This fixes #394.
It adds a "Go back" button to the "Confirm wallet encryption" window, allowing the users to change the password if they want to. It also adds a Cancel button to the "Wallet to be encrypted" window.
Prior to this change users had no option to alter the password, and were forced to either go ahead with wallet creation or cancel the whole process. Also, at the final window, they were shown a warning but with no option to cancel.
The new workflow for wallet encryption and creation is similar to the following:

videoNavigation

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 16, 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 alfonsoromanz, BrandonOdiwuor, hebasto
Concept ACK luke-jr
Stale ACK jarolrod, pablomartin4btc

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Copy link
Contributor

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

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

Tested ACK.
It works as expected according to the description of the PR and it fulfils the requirements of the related issue.
Just as a reminder for other reviewers, if you want to verify if the wallet was encrypted or not, when a user creates an encrypted wallet, the password won't be requested on loading or switching to the encrypted wallet, only on "send"; the private keys are encrypted not the wallet (.dat) itself.

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.

Concept ACK.

src/qt/askpassphrasedialog.cpp Outdated Show resolved Hide resolved
src/qt/askpassphrasedialog.cpp Outdated Show resolved Hide resolved
@hernanmarino
Copy link
Contributor Author

Updated the code as per @hebasto suggestions.

Copy link
Contributor

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

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

re-ACK 78660e7. cc @jarolrod.

I seewallet_create_tx.py --descriptorstest is failing and you are re-running it, I don't think it's related with your change but let's see.

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

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

ACK 78660e7

Tested for functionality and sanity checked the user flows between master and this PR.

@hernanmarino hernanmarino force-pushed the wallet-encryption-navigation branch from 78660e7 to 1edbd6e Compare June 17, 2023 01:35
@hernanmarino
Copy link
Contributor Author

After @hebasto 's comment I decided to update the code to explicitly call reject() when cancelling the first dialog. This introduces one less change from the original code, and also makes the intention more explicit to developers / reviewers.

@luke-jr
Copy link
Member

luke-jr commented Jun 23, 2023

Concept ACK

But shouldn't the final confirmation dialog also have a "Go back" instead of "Cancel"?

(Better yet, why don't we just show these warnings upfront in the password entry dialog?)

@pablomartin4btc
Copy link
Contributor

But shouldn't the final confirmation dialog also have a "Go back" instead of "Cancel"?

I think at that point, going back to the previous window, where you have to re-enter the password, won't make much sense.

This is how it's now:

pwd conf back

Now that I've re-tested it, once you have entered the passphrase, when you click on "Back", doesn't go back to anything, just close/ cancel the entire process, so if we agree on the use case I rather put back "Cancel" on the button label or I wouldn't go back to the password either but to the "Create Wallet" window. Having said that I see in @jarolrod's issue #394 that he wanted to go back to the "Encrypt wallet" window where you have to re-enter the password, so I'm not sure if we could add a "second" back, one to the creation wallet window and one for the encrypt wallet to re-enter the password, the reason behind going back to the "Create wallet window" is that perhaps you just realised you don't want to bother, just create a regular (non encrypted) one.

So, same for the final confirmation @luke-jr, I would go "Back" to the "Create Wallet" window or just leave it as cancel.

And, I think I'd change button label "Cancel" on the "Encrypt wallet" and put "Back" there to go back to creation window, also I'd add "Create wallet -" (or "New wallet - #name) on the window's title so you see the context if you alt-tab to another app or anything, also because I see this window is also used when you have a wallet selected and want to encrypt it (I'd add the name of the wallet in the title, perhaps to be consistent with when you create a new one) :

image

(Better yet, why don't we just show these warnings upfront in the password entry dialog?)

I agree with this one, I'd add it when you enter the pwd (current "Encrypt wallet" window) and I'd leave it also on the confirmation pop-up.

@GBKS, @jarolrod, what do you think? And others ofc.

Copy link
Contributor

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

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

re-Tested nACK.

As I mentioned in the above response to @luke-jr, last change made the fix not to work anymore (see animated gif). Please consider my comments above if others also see them useful.

@hernanmarino hernanmarino force-pushed the wallet-encryption-navigation branch from 1edbd6e to 78660e7 Compare August 14, 2023 18:49
@hernanmarino
Copy link
Contributor Author

Rolled back to undo changes detected by @pablomartin4btc . Now changes are at commit 78660e7 , the last one ACK ed by @jarolrod and others.

@pablomartin4btc
Copy link
Contributor

re-ACK 78660e7 as previously here.

@DrahtBot DrahtBot changed the title Wallet : Allow user to navigate options while encrypting at creation wallet: Allow user to navigate options while encrypting at creation Aug 22, 2023
@DrahtBot DrahtBot changed the title wallet: Allow user to navigate options while encrypting at creation Wallet: Allow user to navigate options while encrypting at creation Aug 22, 2023
@DrahtBot DrahtBot changed the title Wallet: Allow user to navigate options while encrypting at creation Wallet: Allow user to navigate options while encrypting at creation Aug 22, 2023
@maflcko maflcko removed the Wallet label Aug 22, 2023
@DrahtBot DrahtBot changed the title Wallet: Allow user to navigate options while encrypting at creation wallet: Allow user to navigate options while encrypting at creation Aug 22, 2023
@DrahtBot DrahtBot requested review from luke-jr and hebasto November 29, 2023 16:46
Copy link
Contributor

@BrandonOdiwuor BrandonOdiwuor left a comment

Choose a reason for hiding this comment

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

Tested ACK 78660e7

Screenshot from 2023-11-29 20-35-54

Copy link
Contributor

@alfonsoromanz alfonsoromanz left a comment

Choose a reason for hiding this comment

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

Tested ACK 78660e7

2 3 4 5 6 7

@hernanmarino hernanmarino force-pushed the wallet-encryption-navigation branch from 78660e7 to cccddc0 Compare February 13, 2024 21:33
@hernanmarino
Copy link
Contributor Author

Rebased for CI, no actual code changes in my code.

Copy link
Contributor

@alfonsoromanz alfonsoromanz left a comment

Choose a reason for hiding this comment

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

Re-Tested ACK cccddc0

test_wallet-encryption-navigation

Copy link
Contributor

@BrandonOdiwuor BrandonOdiwuor left a comment

Choose a reason for hiding this comment

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

re-Tested ACK cccddc0

@hebasto hebasto added this to the 28.0 milestone Feb 15, 2024
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 cccddc0, tested on Ubuntu 24.04.

@hebasto hebasto merged commit 7a40f2a into bitcoin-core:master May 15, 2024
16 checks passed
@maflcko
Copy link
Contributor

maflcko commented May 20, 2024

I don't understand this change. It looks like a "Back" button is added to the warning pop-up, but it will only take you back to enter a different password, not to disable the password selection in the create wallet dialog. Wouldn't it be better to add the "Back" button to the password dialog?

Also, wouldn't it be better if the text from the two warning pop-ups was added to the top of the password dialog? Otherwise, it seems odd to first ask for a password from the user, then print two warnings about it, when the warnings could have been provided in one go?

@maflcko
Copy link
Contributor

maflcko commented May 20, 2024

Also, this doesn't need release notes, does it?

@hebasto
Copy link
Member

hebasto commented May 20, 2024

It looks like a "Back" button is added to the warning pop-up, but it will only take you back to enter a different password, not to disable the password selection in the create wallet dialog. Wouldn't it be better to add the "Back" button to the password dialog?

Also, wouldn't it be better if the text from the two warning pop-ups was added to the top of the password dialog? Otherwise, it seems odd to first ask for a password from the user, then print two warnings about it, when the warnings could have been provided in one go?

@GBKS

What kind of a workflow will suit this part of the UI in your opinion?

@GBKS
Copy link

GBKS commented May 22, 2024

Good points. I think it could work well to combine the two warnings to a single dialog. It could be placed between the initial Create wallet dialog, and the password input.

  1. Create wallet dialog: The user checks Encrypt wallet and clicks Continue.
  2. Password warning dialog: The application informs the user about the risks of using a password and offers Back and Continue options. The user considers, decides to move forward with the password, and clicks Continue.
  3. Password input dialog: The user enters their password and clicks Continue (the other option would be Back). It could be an option to have a I have stored this password in a safe place check box here. Another option is a password difficulty indicator.

This avoids the stack of dialog-on-dialog by putting them in a linear sequence with consistent Continue and Back options.

When dialogs are stacked like this and you mix buttons like Cancel and Back, it can be hard to know what they reference. Do you cancel the whole wallet creation or just the password option, or just the dialog? What does Back refer to in a dialog that sits on top of another dialog? Keeping the sequence linear makes this more obvious.

Just some thoughts, not sure if you even want to revisit this or not right after working through this PR.

@hebasto
Copy link
Member

hebasto commented Jul 30, 2024

@hernanmarino

Are you still working on this PR? If so, what do you think about GBKS's suggestion?

@hernanmarino
Copy link
Contributor Author

@hernanmarino

Are you still working on this PR? If so, what do you think about GBKS's suggestion?

I like them. I can work on them and open a follow up PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add go back button to Confirm wallet encryption window, add cancel button to wallet to be encrypted window
10 participants