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

Recovery wallet auto complete #810

Merged
merged 7 commits into from Nov 8, 2018

Conversation

Projects
None yet
3 participants
@lontivero
Contributor

lontivero commented Nov 5, 2018

This PR is for improving the recovery wallet mnemonic suggestions, making the suggested words clickable.

image

lontivero added some commits Nov 5, 2018

@lontivero lontivero force-pushed the lontivero:Features/Recovery-Wallet-AutoComplete branch from 42aa826 to 5dc35a2 Nov 5, 2018

@lontivero

This comment has been minimized.

Contributor

lontivero commented Nov 5, 2018

@danwalmsley could you give me a hand, please? This code works okay but there are a couple of thing it would be good if you could review them:

  1. After autocompleting the mnemonic texbox by clicking on any suggestion the textbox caret doesn't move to the end of the text, keeping in the middle of the word. I've found a quite awful workaround by implementing a PutCursorAtTheEndTextBoxBehavior behavior to do that but it only works okay if I use a delay. This doesn't look correct to me but I didn't find a better way.

  2. After changing my first implementation by one that fit better with the mvvm pattern, i couldn't decide what is the best pattern to notify the parent viewmodel about a child selection event.

@danwalmsley

Would just like you to consider if the Autocomplete box control is more suitable, if so it might allow better viewmodel code.

@@ -50,11 +52,10 @@ private void HandleAutoUpdate()
var text = textBox.Text;
var enteredWordList = text.Split(' ', StringSplitOptions.RemoveEmptyEntries);
var lastWorld = enteredWordList.LastOrDefault();

This comment has been minimized.

@danwalmsley

danwalmsley Nov 5, 2018

Contributor

typo lastWord :)

This comment has been minimized.

@lontivero

lontivero Nov 5, 2018

Contributor

yes, you're right. I cannot listen the national inflation forecast report and program at the same time.

using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using WalletWasabi.Gui.Tabs.WalletManager;

This comment has been minimized.

@danwalmsley

danwalmsley Nov 5, 2018

Contributor

Iv never used it but Avalonia has an inbuilt auto completing textbox control, this might perhaps be more suitable?

https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/AutoCompleteBox.cs

It is also in the control catalog if you want to evaluate the way it works.

lontivero and others added some commits Nov 5, 2018

@lontivero lontivero changed the title from WIP - Features/recovery wallet auto complete to Features/recovery wallet auto complete Nov 6, 2018

@lontivero lontivero changed the title from Features/recovery wallet auto complete to Recovery wallet auto complete Nov 6, 2018

@lontivero

This comment has been minimized.

Contributor

lontivero commented Nov 6, 2018

Update This can be merged now. Thanks @danwalmsley

@nopara73 nopara73 merged commit afe735e into zkSNACKs:master Nov 8, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
CodeFactor No issues found.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment