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

feat(tangle-dapp): Bridge UI on Tangle Dapp #2307

Merged
merged 14 commits into from
May 15, 2024
Merged

Conversation

vutuanlinh2k2
Copy link
Contributor

@vutuanlinh2k2 vutuanlinh2k2 commented May 13, 2024

Summary of changes

Provide a detailed description of proposed changes.

  • Add new Bridge page to the site
  • Current functionalities of Bridge Container: select and switch Source & Destination Chain

Proposed area of change

Put an x in the boxes that apply.

  • apps/bridge-dapp
  • apps/hubble-stats
  • apps/stats-dapp
  • apps/tangle-dapp
  • apps/testnet-leaderboard
  • apps/faucet
  • apps/zk-explorer
  • libs/webb-ui-components

Reference issue to close (if applicable)

Specify any issues that can be closed from these changes (e.g. Closes #233).

Screen Recording

If possible provide a screen recording of proposed change.

CleanShot.2024-05-14.at.13.36.41.mp4

Code Checklist

Please be sure to add .stories documentation if any additions are made to libs/webb-ui-components.

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Copy link

netlify bot commented May 13, 2024

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit a632d35
🔍 Latest deploy log https://app.netlify.com/sites/tangle-dapp/deploys/664432fb94c4f00008b6b067
😎 Deploy Preview https://deploy-preview-2307--tangle-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@drewstone
Copy link
Contributor

  • We should be able to interact with the UI without connecting a wallet too, entirely IMO.
  • If I'm transferring from Chain A then I shouldn't see Chain A as an option for a destination @vutuanlinh2k2

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @vutuanlinh2k2

Name Link
🔨 Latest commit 43cf7a6fcb05ece9c46601da1a89d9d9e5a6d9bc
🔍 Latest deploy log https://app.netlify.com/sites/hubble-bridge/deploys/664225634f5bf11bce3ef771
😎 Deploy Preview https://664225634f5bf11bce3ef771--hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

@vutuanlinh2k2
Copy link
Contributor Author

  • We should be able to interact with the UI without connecting a wallet too, entirely IMO.
  • If I'm transferring from Chain A then I shouldn't see Chain A as an option for a destination @vutuanlinh2k2

We can interact with the UI without connecting to a wallet at the moment.

For the second comment, I will update it now!

Copy link
Contributor

@drewstone drewstone left a comment

Choose a reason for hiding this comment

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

LG, comment on the logic of chain selection but if you think it's the right UX that's good.

const onSetDestinationChain = useCallback(
(chain: ChainConfig) => {
setDestinationChain(chain);
// If the destination chain is the same as the source chain, clear the source chain.
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that instead of switching and nullifying things that we should not present the same chain as an option? Or do you think this is better. I'm ambivalent is this is the logic you think is worth having.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Working on it right now!

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @vutuanlinh2k2

Name Link
🔨 Latest commit f395aada7803a2cee8d26ac6b7128ba320457ed0
🔍 Latest deploy log https://app.netlify.com/sites/hubble-bridge/deploys/664306457db7c69ce3ad93a8
😎 Deploy Preview https://664306457db7c69ce3ad93a8--hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@monaiuu monaiuu left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-05-14 at 4 18 49 PM

A few minor updates from me:

  • Ensure that the width of the dropdown menu is consistent with the width of the selector container above it.
  • Add a token container display within the amount input field. This will ensure that the user is clear on what token is being transacted. In the future, when we have more Tangle tokens to be bridged (e.g., tgETH, tgDOT), we can turn this container into a dropdown menu for the user to select the desired token.
  • Update the button copy to 'Approve' or 'Confirm'. Using 'bridge' and 'transfer' simultaneously might be confusing for users, especially we also have 'transfer' in Account.
  • We could consider displaying the potential applicable fees and the estimated transaction time, similar to the sub-bridge shown in the screenshot. (depending on feasibility on getting the data)

@vutuanlinh2k2
Copy link
Contributor Author

Screenshot 2024-05-14 at 4 18 49 PM A few minor updates from me:
  • Ensure that the width of the dropdown menu is consistent with the width of the selector container above it.
  • Add a token container display within the amount input field. This will ensure that the user is clear on what token is being transacted. In the future, when we have more Tangle tokens to be bridged (e.g., tgETH, tgDOT), we can turn this container into a dropdown menu for the user to select the desired token.
  • Update the button copy to 'Approve' or 'Confirm'. Using 'bridge' and 'transfer' simultaneously might be confusing for users.
  • We could consider displaying the potential applicable fees and the estimated transaction time, similar to the sub-bridge shown in the screenshot. (depending on feasibility on getting the data)

I will work on the section for estimated fees when implementing the logic, it will be more efficient.

For other comments, I will update and re-request you again!

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @vutuanlinh2k2

Name Link
🔨 Latest commit 49ba508e69bae4d0c4f4ffff8e37035246269a64
🔍 Latest deploy log https://app.netlify.com/sites/hubble-bridge/deploys/66437270d54dad2aec3ff112
😎 Deploy Preview https://66437270d54dad2aec3ff112--hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @vutuanlinh2k2

Name Link
🔨 Latest commit 45a9d9a798ba4a64f40b5f71bcf06ea03ab49153
🔍 Latest deploy log https://app.netlify.com/sites/hubble-bridge/deploys/66437cc727dd9e31102491c1
😎 Deploy Preview https://66437cc727dd9e31102491c1--hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

@yurixander yurixander changed the title feat (tangle-dapp): Bridge UI on Tangle Dapp feat(tangle-dapp): Bridge UI on Tangle Dapp May 14, 2024
@vutuanlinh2k2
Copy link
Contributor Author

Screenshot 2024-05-14 at 4 18 49 PM A few minor updates from me:
  • Ensure that the width of the dropdown menu is consistent with the width of the selector container above it.
  • Add a token container display within the amount input field. This will ensure that the user is clear on what token is being transacted. In the future, when we have more Tangle tokens to be bridged (e.g., tgETH, tgDOT), we can turn this container into a dropdown menu for the user to select the desired token.
  • Update the button copy to 'Approve' or 'Confirm'. Using 'bridge' and 'transfer' simultaneously might be confusing for users.
  • We could consider displaying the potential applicable fees and the estimated transaction time, similar to the sub-bridge shown in the screenshot. (depending on feasibility on getting the data)

I will work on the section for estimated fees when implementing the logic, it will be more efficient.

For other comments, I will update and re-request you again!

@monaiuu I have updated the Dropdown Size and the Token Selector.

The preview link does not have this page because we just show it in the development environment at the moment (the same as the page for Validator and Restaking). I might create a task to show these features in the deploy preview.

CleanShot.2024-05-14.at.22.49.18.mp4

@vutuanlinh2k2 vutuanlinh2k2 requested a review from monaiuu May 14, 2024 15:57
@drewstone
Copy link
Contributor

Merge conflicts here @vutuanlinh2k2 but otherwise looks good for merge. I do think the style looks different between the implementation and the image @monaiuu presented. I also would like there to be a label over the From and To for the bridge's source and destination chain.

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @vutuanlinh2k2

Name Link
🔨 Latest commit a632d35df8bc68bad8eeed284054a4947a516079
🔍 Latest deploy log https://app.netlify.com/sites/hubble-bridge/deploys/664434f3bbac65483dc169d3
😎 Deploy Preview https://664434f3bbac65483dc169d3--hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

@vutuanlinh2k2
Copy link
Contributor Author

Merge conflicts here @vutuanlinh2k2 but otherwise looks good for merge. I do think the style looks different between the implementation and the image @monaiuu presented. I also would like there to be a label over the From and To for the bridge's source and destination chain.

Try adding labels but it does not look good without them. I personally think the arrow already indicates the source and destination chain for the user.

This can be updated in the future. I will merge this for now

@vutuanlinh2k2 vutuanlinh2k2 merged commit 66e5fbf into develop May 15, 2024
12 checks passed
@vutuanlinh2k2 vutuanlinh2k2 deleted the linh/bridge-ui branch May 15, 2024 04:10
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.

Bridge UI front-end for Tangle dApp
4 participants