-
Notifications
You must be signed in to change notification settings - Fork 40
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
Introduce Wallet Select Dropdown #401
Conversation
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.
6670781
to
5d191d1
Compare
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.
tACK 4ef3149
A few observations (cc @GBKS)
-
Sample wallet ("
Singlesig Wallet
") is still shown, is this going to be removed in the next iteration/ follow-up?
-
Should the wallets in the listview be ordered (e.g. in current desktop
QT
they are by naming as you can see in the following pict)?
-
In Figma, the wallet lists have an "X" on the right side of each item, is this to close/ unload the wallet? I see in
src/qml/models/walletlistmodel.cpp
the list is built looking at the wallet dirs (so there's no distinction in previous model/ current QT between "load" and "select" wallet functionality, now will be done all in once), so what's that "X" for? It needs to be added to this PR (as it's missing at the moment)?
I agree with @MarnixCroes, his observation regarding clicking outside the wallet menu (listview) the menu should be closed I think.
The idea is that you can close the wallet that is currently open (result is that there would be no open wallet). And if you press "x" on a close wallet, you would remove it from the application altogether. We don't have those anywhere else in the UI yet on mobile. Are there other options you may want to directly take on the wallet from here? Like changing the name? If we have more, we could instead use an ellipsis |
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.
Want to re-ACK? |
To ensure that someone's ACK is related to a certain version of the branch, it is wise to mention the top commit hash. Besides, the merge script needs a top commit hash to count an ACK. |
Mmm... then we need to indicate somehow when the wallet is open and the "x" would close it and when it's closed and the "x" will remove it from the UI... and how do you get it back when has been removed? It's not very intuitive at the moment. Also, I'm not sure if listing all wallets available in the datadir would be practical... perhaps this can be configured as an option and disabled as default or if there are more then 5/ 10 wallets asking the user and persist that into the config?
Yeah, there's no "renaming" feature in |
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.
Pablo and I spoke about the wallet selector and I did another design iteration based on my current understanding. Here's a video that covers it. Still have some minor questions in there, please take a look and let me know how it looks. |
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.
Here's a video that covers it.
These are my obs:
-
ordering the wallet list on last opened criteria (last 5? then alphabetical?);
-
scroll solution ok (but we need to solve the bar that gets on top of the remove/ close wallet icons);
-
icon for remove wallet looks fine but for closing looks a bit simple (what about using the wallet icon at the top when there are no wallets at all?)... also, what if we put both icons? you dont need to close (unload) the wallet first and then remove it, no?
-
once we remove a wallet, perhaps after the user clicks on the "Add +" we show these options: create a new or "add previously removed walet" or "link a wallet dir"?
-
we still have the issue when there are many wallets, what about a warning? "you have more than 15 wallets in your datadir, do you want to list them all? (and something saying this will be asked once and saved the configuration into the settings?);
These are open questions to the other reviewers as well.
Thanks for the feedback.
Why not always use the last open date?
I will mock this up
I'll do another revision of this design as we discussed yesterday, where the wallet options are in a small overlay menu
The current design is that in the "Add wallet" screen, you can import. From there you select the wallet file you want to add. Does that work?
Why is this an issue? |
Depends on the amount of wallets we are talking about, that's what I call "issue", perhaps on the mobile version doesn't make sense to have as many, not sure. I'll ask other devs.
Ok, maybe that's the use case. Is it possible for you to do a prototype as you did in the previous video to see how it would work? From removing the wallet from the list to add it back (if it's doable with the tool you are using).
Performance will be impacted loading multiple wallets but what I'm not convinced about is building the list of wallets in the menu with whatever amount of wallets there are in the data directory. I'll ask around, perhaps there's nothing wrong with it and I'm just overly worried. |
re-tACK 5d191d1 on WSL Ubuntu 22.04 works as expected... Does it need rebase? |
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.
5d191d1
some possible improvements:
- when having many wallets there should be some scrollbar, also to be able to select wallets displayed at the bottom
WalletSelect { | ||
id: walletSelect | ||
model: walletListModel | ||
closePolicy: Popup.CloseOnPressOutside |
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.
close when press outside.
I guess it should also close when clicking on it again, additionally when clicking outside?
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 want to add this as an issue. It turns out its more difficult than I thought to fix this.
5d191d1
to
411a08a
Compare
beginInsertRows(QModelIndex(), rowCount(), rowCount()); | ||
m_items.append(item); | ||
endInsertRows(); | ||
} |
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.
Does it need a blank line at the end?
tACK 411a08a on WSL Ubuntu 22.04 Works as expected... |
411a08a
to
833fc38
Compare
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.
tACK 833fc38
previous points #401 (review) can be done as follow up
src/qml/pages/wallet/WalletBadge.qml
Outdated
PropertyChanges { target: balanceText; color: root.textHoverColor } | ||
} | ||
] | ||
} |
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.
does it need a blank line at the bottom?
tACK 833fc38 on WSL Ubuntu 22.04 Works as expected... Only comment is about a missing ending line in WalletBadge.qml |
59d59b5
to
366c605
Compare
previous (833fc38): update (366c605) Will address other significant changes as new PRs as to not make this one too large for now. For instance, load/delete buttons in the wallet list I plan to have as a follow up as well as the logic for ordering the list based on recent use. |
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.
tACK 366c605
some nits, can be follow up:
- a visible scrollbar for the wallet list
- when a wallet name exceeds the width and is thus cut off -> would be good display the full wallet name in a tooltip on hover
The WalletBadge is an Item that shows a wallet's name, type and balance. The WalletBadge balance shows all of the decimal places for a whole bitcoin and highlights the satoshis available. The component can be configured to not show the Icon or the Balance.
WalletSelect is a Popup that appears after clicking the main WalletBadge in the DesktopNavigation bar. It contains a ListView that allows the user to select one of the wallets listed in the wallet directory.
366c605
to
0939f2b
Compare
tACK 0939f2b on WSL Ubuntu 22.04 Works as expected and looks great |
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.
re-ack 0939f2b
FWIW, "ack" is not counted by the merge script. The "ACK" is expected. |
ba98b83 qml: add scrollbar to wallet select list (Marnix) Pull request description: This adds a scrollbar to the wallet selection list. Addresses #401 (review) --- ### Images scrollbar visible on hover/when scrolling when having more wallets than that are initially visible ![image](https://github.com/user-attachments/assets/6cecd990-5e20-48d7-95eb-fcf79cd368d6) no scrollbar when not needed: ![image](https://github.com/user-attachments/assets/1d9d7418-858a-4576-a1fc-c63ead211919) <!-- *** Please remove the following help text before submitting: *** Pull requests without a rationale and clear improvement may be closed immediately. GUI-related pull requests should be opened against https://github.com/bitcoin-core/gui first. See CONTRIBUTING.md --> <!-- Please provide clear motivation for your patch and explain how it improves Bitcoin Core user experience or Bitcoin Core developer experience significantly: * Any test improvements or new tests that improve coverage are always welcome. * All other changes should have accompanying unit tests (see `src/test/`) or functional tests (see `test/`). Contributors should note which tests cover modified code. If no tests exist for a region of modified code, new tests should accompany the change. * Bug fixes are most welcome when they come with steps to reproduce or an explanation of the potential issue as well as reasoning for the way the bug was fixed. * Features are welcome, but might be rejected due to design or scope issues. If a feature is based on a lot of dependencies, contributors should first consider building the system outside of Bitcoin Core, if possible. * Refactoring changes are only accepted if they are required for a feature or bug fix or otherwise improve developer experience significantly. For example, most "code style" refactoring changes require a thorough explanation why they are useful, what downsides they have and why they *significantly* improve developer experience or avoid serious programming bugs. Note that code style is often a subjective matter. Unless they are explicitly mentioned to be preferred in the [developer notes](/doc/developer-notes.md), stylistic code changes are usually rejected. --> <!-- Bitcoin Core has a thorough review process and even the most trivial change needs to pass a lot of eyes and requires non-zero or even substantial time effort to review. There is a huge lack of active reviewers on the project, so patches often sit for a long time. --> <!-- Link to github actions build artifacts. [![Build Artifacts](https://img.shields.io/badge/Build%20Artifacts-green )]() --> ACKs for top commit: pablomartin4btc: utACK ba98b83 jarolrod: ACK ba98b83 Tree-SHA512: 1013230070913dcb2be6674b9c25acc51c49b8e603b079ca6e6802b3d6b6ce7fabca44a25bef1f641c133b75051d132200573e3d5846c59beb14bcff5edbd34c
WalletSelect is a Popup that appears after clicking the main
WalletBadge in the DesktopNavigation bar. It contains a ListView
that allows the user to select one of the wallets listed in the
wallet directory.
This PR uses the arrow icon that is shared with the Tooltip so it is based off of that commit.