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

Ui: Trade flow UI and improvements in Take Offer #90

Merged
merged 9 commits into from
Dec 5, 2024

Conversation

nostrbuddha
Copy link
Contributor

@nostrbuddha nostrbuddha commented Dec 4, 2024

  • Take offer screens: Select Amount, Payment Method, Review Screens - Improved
  • Trade flow UI, along with necessary components
  • Offer card UI

Pushing this, so functional integration can start happening.

This PR covers 90% of the Trade flow UI. Some pending items are

  • Trade completed popup
  • Request mediation popup
  • Link buttons to Wallet guide, Trade guide, etc.,
  • Floating chat icon

@rodvar
Copy link
Collaborator

rodvar commented Dec 4, 2024

rebased to fix compilation issue on ios

Copy link
Collaborator

@rodvar rodvar left a comment

Choose a reason for hiding this comment

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

@nostrbuddha this is starting to feel like we are in the real app :D

First comment is that its been a pleasure to test this one, working great on all 3 apps.

Besides my code comments, here are some functional things I would suggest to work on before merging this one:

  • "Close Trade" button at the end of the workflow should close the whole trading workflow process and go back to the original tab where all started which is buy/sell (eventually we can redirect to my trades when we have support for viewing completed trades)
  • Trade Amount Slider should:
    • be fixed if the offer is for a fixed price
    • allow values between min/max if the offer has a min max for trade
    • show only 8 decimals (for BTC, min trade is 1 SAT) or 11 decimals (for lightning mSAT is allowed) accordingly to the trade
  • there is a glitch in the transition animation where sometimes it would come from the top left. Couldn't figure out how to consistently reproduce it I'll create a separate card for it if I find it.

Hope this makes sense please ask otherwise. It is ok if you prefer to leave some of this stuff above for later on, just please add TODOs or create GH issues for it 🙏

There are also some UX stuff we could improve, like title text spacing for example, but we can do that later when we have the trading fully implemented.

}
}

// TODO: Should do Interface for this?
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably yes since this handles the wholw trade flow. This presenter is very important, it will be interacting with services and/or repositories to manage the real world data and views should be consuming what they need through the interface that this presenter will implement (see other existing examples but I'm sure you know what I'm talking about already :) )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Got it

@HenrikJannsen
Copy link
Contributor

Small comments:

... when we have support for viewing completed trades)

After a trade was closed we delete all data. The user can export trade data if needed, but we intentionally dont keep history to avoid that your privacy gets weakened by your trade peers who keep all the trades and in case that computer falls into the wrong hands your persona data is revealed as well (like name, bank account,...).

...for lightning mSAT is allowed

In Bisq 2 we do not support mSAT. Those tiny amounts would be irrelevant in fiat terms. we also round the Fiat amount to avoid decimals and the BTC amount gets then converted to that.

@nostrbuddha
Copy link
Contributor Author

Thanks for the review @rodvar :-)

"Close Trade"

Doing this now

Trade Amount Slider should be fixed if the offer is for a fixed price

For an offer with fixed trade amount, we will skip this screen, similar to the flow in desktop app.

show only 8 decimals (for BTC, min trade is 1 SAT) or 11 decimals (for lightning mSAT is allowed) accordingly to the trade

For this, created a design for btc/sats display component in Figma, as cbeams suggested. Was planning to code this component next PR. Is that okay?

Screenshot 2024-12-06 at 3 39 57 AM

There is a glitch in the transition animation where sometimes it would come from the top left. Couldn't figure out how to consistently reproduce it I'll create a separate card for it if I find it.

Actually this happened in previous code, where transitions weren't properly defined for all routes. I thought that was fixed in this PR. Spent sometime now to try replicate this, but not happening!

There are also some UX stuff we could improve, like title text spacing for example, but we can do that later when we have the trading fully implemented.

Yeah sure. Once functionalities are done, I will do a last iteration of final UI polish.

@rodvar
Copy link
Collaborator

rodvar commented Dec 5, 2024

Small comments:

... when we have support for viewing completed trades)

After a trade was closed we delete all data. The user can export trade data if needed, but we intentionally dont keep history to avoid that your privacy gets weakened by your trade peers who keep all the trades and in case that computer falls into the wrong hands your persona data is revealed as well (like name, bank account,...).

...for lightning mSAT is allowed

In Bisq 2 we do not support mSAT. Those tiny amounts would be irrelevant in fiat terms. we also round the Fiat amount to avoid decimals and the BTC amount gets then converted to that.

thanks Henrik @HenrikJannsen !!

@rodvar
Copy link
Collaborator

rodvar commented Dec 5, 2024

Thanks for the review @rodvar :-)

"Close Trade"

Doing this now

Trade Amount Slider should be fixed if the offer is for a fixed price

For an offer with fixed trade amount, we will skip this screen, similar to the flow in desktop app.

show only 8 decimals (for BTC, min trade is 1 SAT) or 11 decimals (for lightning mSAT is allowed) accordingly to the trade

For this, created a design for btc/sats display component in Figma, as cbeams suggested. Was planning to code this component next PR. Is that okay?

Screenshot 2024-12-06 at 3 39 57 AM > There is a glitch in the transition animation where sometimes it would come from the top left. Couldn't figure out how to consistently reproduce it I'll create a separate card for it if I find it.

Actually this happened in previous code, where transitions weren't properly defined for all routes. I thought that was fixed in this PR. Spent sometime now to try replicate this, but not happening!

There are also some UX stuff we could improve, like title text spacing for example, but we can do that later when we have the trading fully implemented.

Yeah sure. Once functionalities are done, I will do a last iteration of final UI polish.

Awesome @nostrbuddha - yep the BTC/SAT component should go on a different PR, but let's keep it lo prio for now until we have all the trading fully working, do you agree?

@rodvar
Copy link
Collaborator

rodvar commented Dec 5, 2024

Small comments:

... when we have support for viewing completed trades)

After a trade was closed we delete all data. The user can export trade data if needed, but we intentionally dont keep history to avoid that your privacy gets weakened by your trade peers who keep all the trades and in case that computer falls into the wrong hands your persona data is revealed as well (like name, bank account,...).

...for lightning mSAT is allowed

In Bisq 2 we do not support mSAT. Those tiny amounts would be irrelevant in fiat terms. we also round the Fiat amount to avoid decimals and the BTC amount gets then converted to that.

thanks Henrik @HenrikJannsen !!

@HenrikJannsen @nostrbuddha maybe we can have statistics like # trades done between what currencies, and things like that without compromising any sensitive info. Anyways, that's out of the way for now 👍
your comment on mSAT is spot on so we can keep 8 decimals for all 👍

 - Close trade button logic

 - Fixed missed i18n keys

 - Removed number from Trade flow composables

 - Removed confusing comments
Copy link
Collaborator

@rodvar rodvar left a comment

Choose a reason for hiding this comment

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

@nostrbuddha Just checked the last push, this is pretty much ready to merge just the slider limit on the decimals is missing.

I think we'll merge it as is and do that fix later on the "polishing" times

@rodvar rodvar merged commit 849875d into bisq-network:main Dec 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants