-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 "Buy BSQ" button next to trade fee selector #5055
Conversation
8872400
to
6c8a7c7
Compare
Can we please add link to wiki on bsq etc? |
I've been trying to resolve the combo box focus issue for a long time, with not much success. I tried the following:
These either had no effect, or caused the combo box not to reflect Also, when the combo box receives focus, it's probably happening too early, as indicated by the fact that the drop-down list is rendered incorrectly - it's shifted to the left: Some options that I see:
|
This one? https://bisq.wiki/Trading_fees |
Yeah that one. Just in the pop-up I think. Guides folks to wiki if they want to know benefits etc.
I think ideally should have bsq amount somewhere more prominent.
…________________________________
From: Jakub Loucký <[email protected]>
Sent: Tuesday, January 5, 2021 11:01:47 AM
To: bisq-network/bisq <[email protected]>
Cc: Conza <[email protected]>; Comment <[email protected]>
Subject: Re: [bisq-network/bisq] Add "Buy BSQ" button next to trade fee selector (#5055)
Can we please add link to wiki on bsq etc?
So folks can easily see trading value of purchasing etc
This one? https://bisq.wiki/Trading_fees
Is this not enough?
[image]<https://user-images.githubusercontent.com/16313562/103594500-233dad80-4ef9-11eb-8bd6-2b0db7b2cb1a.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#5055 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMMLWYRWCCXYG2JZMDJHI5LSYJQHXANCNFSM4VT2J6CQ>.
|
@Jakub-CZ looks great. I had a read but not sure what happens when they click the 'Buy BSQ' button? Are they taken to the Buy > BSQ/BTC market? |
Yep, except it's Sell, as in "selling BTC for BSQ". I've added the final screenshot in the description at the top. |
Thanks, that is great. Hopefully will get more new users to buy some BSQ :) |
I had a quick look, but did not see anything obvious which could cause the problems you described. Would need to debug locally but too busy atm... |
I really think these concerns need to be addressed before sending shiteload more people to buy bsq: #5046 |
For the case where someone is selling BTC I think the current sale tab needs to be closed and a new one opened for buying BSQ since there can only be one BTC sell tab open. That could perhaps be a bit confusing but I think allowing for multiple create offer tabs would be more trouble. Perhaps include a warning that the current BTC sell tab will be closed in the popup as well for that case. Auto creating a BSQ account is reasonable and something I did for the not yet completed atomic BSQ trades. It's a bit more problematic for the current model as the receive address needs to be available throughout the trade process and our current model expects 1 single address per account. I think we could create a BSQ account with the first unused BSQ address if there is no other BSQ account. That would make it somewhat easier to get started with BSQ in the current state. @Jakub-CZ I can't give any input on the UI elements not aligning and the focus, @ripcurlx knows that best I think. |
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 think having on the small green button Buy BSQ
might confuse noobs what will happen if they click on this.
Maybe it should be something more like Get BSQ
or How to get BSQ
👈 @m52go ?
We could use this popup afterwards not only to push the user to buy BSQ, but also show the possibility to earn BSQ by contributing.
Maybe we could also only show the Buy BSQ button if the trade has insufficient funds to pay the trading fee with BSQ.
Regarding the combobox question. So the goal is to open the offer book to sell BTC and have all BSQ offers selected? Atm it switches to the offer book setting the focus in the currency combobox.
For the case where someone is selling BTC I think the current sale tab needs to be closed and a new one opened for buying BSQ since there can only be one BTC sell tab open. That could perhaps be a bit confusing but I think allowing for multiple create offer tabs would be more trouble. Perhaps include a warning that the current BTC sell tab will be closed in the popup as well for that case.
That is the current behavior. It will just replace the current Take offer
tab that was used for selling BTC in the first place. Maybe we just add a don't show again
popup if a user is trying to take different offers to reduce confusion where the old take offer
tab vanished to.
String buyBsqText = Res.get("shared.buyCurrency", "BSQ"); | ||
var buyBsqButton = new AutoTooltipButton(buyBsqText); | ||
buyBsqButton.getStyleClass().add("action-button"); | ||
buyBsqButton.setStyle("-fx-pref-height: 20; -fx-padding: 3 8 3 8; -fx-font-size: 0.769em; -fx-border-radius: 5;"); |
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.
Please move this into the css file and use another class instead.
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.
done
@sqrrm Also, closing the tab may get around the UI issue I'm having right now.
Yes, that is the goal. The fact that it focuses on the currency combobox is an unintended side effect of the current design. Looks like the Offer Book view gets invalidated as a result of switching from Take Offer. I don't know why the same doesn't happed when switching from BUY BTC.
Good idea. Will look into that. |
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.
UtAck
I think it may certainly confuse any noobs, and even old crew. Also it's like a check-out, instead of one-click amazon - you're putting up barriers for people to think about before making the trade. All else being equal, they'll likely be less inclined to go through with it. Less trades, not good for Bisq. If the UX process was smooth for buying BSQ, I'd be less hesitant. Definitely not when it's a battle! Shifting to a (i) How to get BSQ would not be a barrier to the final trade, but an FYI for future purposes. |
@Jakub-CZ any updates or roadblocks? Been looking forward to this PR for a long time :) |
@cd2357 I'll try to get back to this during the upcoming weekend. |
Updates since last review:
There are still buggy scenarios where the "Filter by currency" combo box gets cleared intentionally, as a result of receiving focus. Switching to BUY BTC and then back to SELL BTC activates the desired filter (BSQ). This needs more debugging and fixing. |
Tried it out, looks promising. You're right, it can get tricky with the closing of tabs, updating states of UI components, etc. To keep things simple, it might be enough to not do any UI transitions and navigation to the "Sell BTC / Buy BSQ" view, but instead to just open the "Buy BSQ" popup. If the user is interested, he will follow the links and read into it. The popup's button could then link to the step-by-step guide on how to go about and buy some BSQ. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Conflicts: desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java
Conflicts: desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java
Conflicts: desktop/src/main/java/bisq/desktop/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java
Conflicts: desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java desktop/src/main/java/bisq/desktop/util/DisplayUtils.java
d9fc0eb
to
0e4933f
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.
utACK
navigation.navigateTo(MainView.class, SellOfferView.class, OfferBookView.class); | ||
}).show()); | ||
|
||
final VBox buyBsqButtonVBox = new VBox(buyBsqButton); |
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.
Why a VBox is created if there is only one element in it?
The final
in local variables should not be used (I know much of old code have it as well, but current code style suggest to not use it as unnecessary verbose).
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.
Good question - I inherited this part, but didn't looked in the exact necessity of this layout. I'll simplify this positioning.
I think the "BSQ is colored coin..." can be removed then the truncating with smaller width is not happening. Those methods are a bit weird as they mix up buyer/seller sides (isBuyBsqOffer / !isBuyOffer):
|
Yes, this is a little bit confusing because of the fact that when you buy an altcoin you actually selling Bitcoin. I can add an additional comment to make this less confusing. But actually the naming of |
Yes the buy/sell direction is always referred to BTC. Only in the UI we swap it for altcoins as its not intuitive otherwise. |
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.
utACK
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.
ACK - based on #5055 (review)
Fixes #4579
New button is added in the CREATE OFFER and TAKE OFFER tabs. When clicked, it shows a popup and then brings the user to the Sell Offer Book (SELL BITCOIN), with BSQ preselected in the currency filter.
The button is visible only when the fee currency toggles are visible (relevant in the CREATE OFFER tab).
Screenshots
start creating or take any offer ->
-> click "BUY BSQ" ->
-> click "BUY BSQ" in popup ->
Situations when the button is clicked (unchecked are still buggy):
TODOs from discussion below:
Known bug:
Discussion: