Skip to content

feat: Enable click max when address is empty.#2932

Merged
Keith-CY merged 5 commits into
nervosnetwork:developfrom
yanguoyu:feat-enable-sendmax
Nov 17, 2023
Merged

feat: Enable click max when address is empty.#2932
Keith-CY merged 5 commits into
nervosnetwork:developfrom
yanguoyu:feat-enable-sendmax

Conversation

@yanguoyu

Copy link
Copy Markdown
Contributor

Refer to Magickbase/neuron-public-issues#308. Use placeholder address to generate tx.

enable-click-max.mov

Use placeholder address to generate tx.
Comment thread packages/neuron-ui/src/components/Send/hooks.ts
Comment thread packages/neuron-ui/src/tests/validators/outputs/fixtures.ts Outdated
Comment thread packages/neuron-ui/src/utils/validators/outputs.ts Outdated
@yanguoyu
yanguoyu requested a review from Keith-CY November 14, 2023 06:47
@silySuper

silySuper commented Nov 15, 2023

Copy link
Copy Markdown

/package
Packaging for test is done in 6871989588. @silySuper

@silySuper

Copy link
Copy Markdown

When click max button repeatedly,an total amount will show non-inevitably and ui become abnormal. @yanguoyu

2023-11-15.10.37.41.mov

@yanguoyu

Copy link
Copy Markdown
Contributor Author

When click max button repeatedly,an total amount will show non-inevitably and ui become abnormal. @yanguoyu

2023-11-15.10.37.41.mov

How about click Max after syncing to 100%?

@silySuper

Copy link
Copy Markdown

When click max button repeatedly,an total amount will show non-inevitably and ui become abnormal. @yanguoyu
2023-11-15.10.37.41.mov

How about click Max after syncing to 100%?

When sync 100%,the balance does not change again and again,so abnormal ui does not show up.Is the reason?

@yanguoyu

Copy link
Copy Markdown
Contributor Author

When click max button repeatedly,an total amount will show non-inevitably and ui become abnormal. @yanguoyu
2023-11-15.10.37.41.mov

How about click Max after syncing to 100%?

When sync 100%,the balance does not change again and again,so abnormal ui does not show up.Is the reason?

Maybe some transaction was not synced, then the max balance will be larger than the actual.

@silySuper

Copy link
Copy Markdown

An small strange point is that :when click max ,the total blance is filled.When click again,it shows like this:
截屏2023-11-15 11 03 01

Maybe click max button second time has cancel input box number and come to primitive status like this is better,isn 't it ? @Danie0918
截屏2023-11-15 11 06 09

@yanguoyu

Copy link
Copy Markdown
Contributor Author

An small strange point is that :when click max ,the total blance is filled.When click again,it shows like this: 截屏2023-11-15 11 03 01

Maybe click max button second time has cancel input box number and come to primitive status like this is better,isn 't it ? @Danie0918 截屏2023-11-15 11 06 09

IMO, There are differences between cancel max with initialization , just like entering the username and deleting all the input, we will notify the users that please enter username.

image image

@Danie0918

Danie0918 commented Nov 15, 2023

Copy link
Copy Markdown

Maybe click max button second time has cancel input box number and come to primitive status like this is better,isn 't it ?

For a button, its operation should match the description. There are 2 options here:

  1. Disable repeat clicks.
  2. When clicked again, still perform the action described by the button.

Personally, I prefer the second one, which allows the user to recapture the maximum value when their balance changes.

@yanguoyu

Copy link
Copy Markdown
Contributor Author

Maybe click max button second time has cancel input box number and come to primitive status like this is better,isn 't it ?

For a button, its operation should match the description. There are 2 options here:

  1. Disable repeat clicks.
  2. When clicked again, still perform the action described by the button.

Personally, I prefer the second one, which allows the user to recapture the maximum value when their balance changes.

Currently, the max button has two functions:

  1. Send max if first click
  2. Cancel send max if currently is sending max.

Do you mean we'd better cancel sending max by another action? @Danie0918

@Danie0918

Danie0918 commented Nov 15, 2023

Copy link
Copy Markdown

Currently, the max button has two functions:

  1. Send max if first click
  2. Cancel send max if currently is sending max.

Do you mean we'd better cancel sending max by another action?

Canceling the maximum value can be manually modified or deleted by the user, and the max button should be to enter the maximum value.If the cancel function is implemented via a button, the button should change to cancel when clicked.

IMO,The Max button should be entered as the maximum value even if it is clicked repeatedly.

@yanguoyu

Copy link
Copy Markdown
Contributor Author

Currently, the max button has two functions:

  1. Send max if first click
  2. Cancel send max if currently is sending max.

Do you mean we'd better cancel sending max by another action?

Canceling the maximum value can be manually modified or deleted by the user, and the max button should be to enter the maximum value.If the cancel function is implemented via a button, the button should change to cancel when clicked.

IMO,The Max button should be entered as the maximum value even if it is clicked repeatedly.

How about changing Max to Reset if the current is sending the max? @Danie0918

@Danie0918

Copy link
Copy Markdown

Currently, the max button has two functions:

  1. Send max if first click
  2. Cancel send max if currently is sending max.

Do you mean we'd better cancel sending max by another action?

Canceling the maximum value can be manually modified or deleted by the user, and the max button should be to enter the maximum value.If the cancel function is implemented via a button, the button should change to cancel when clicked.
IMO,The Max button should be entered as the maximum value even if it is clicked repeatedly.

How about changing Max to Reset if the current is sending the max? @Danie0918

Okay, that's better.

@silySuper

silySuper commented Nov 17, 2023

Copy link
Copy Markdown

/package
Packaging for test is done in 6898841975. @silySuper

@silySuper

Copy link
Copy Markdown

When language is Chinese it shows like this:

2023-11-17.11.07.31.mov

Why not shows "最大值" in Chinese?

@yanguoyu

Copy link
Copy Markdown
Contributor Author

When language is Chinese it shows like this:

2023-11-17.11.07.31.mov
Why not shows "最大值" in Chinese?

The tips include Max.

您需要有足够的余额来支付找零(大于 61 CKBytes),或者点击 'Max' 按钮发送全部余额。

@Keith-CY
Keith-CY added this pull request to the merge queue Nov 17, 2023
Merged via the queue into nervosnetwork:develop with commit 04d344c Nov 17, 2023
@yanguoyu
yanguoyu deleted the feat-enable-sendmax branch November 17, 2023 03:22
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.

5 participants