mastercoin-MSC / masterchest-wallet

Masterchest Wallet
MIT License
15 stars 13 forks source link

The send->'amount' field should act like an HTML field with placeholder '0.000000' #60

Open ripper234 opened 10 years ago

ripper234 commented 10 years ago

How to reproduce:

  1. Go the the Send screen
  2. The 'amount' field is pre-populated with '0.00000000'
  3. Click on that field.

Expected:

  1. The field clears up when you start typing
  2. If the field's content is cleared (user deletes everything), the original field content should be returned.

Actual:

  1. The selection is inside (in the middle) of the 0.00000000 content.
  2. When you start typing (e.g. hit the digit '3'), you can get weird number (e.g. 0.0003000) (this type of UX is just not very common or convenient).

image

dexX7 commented 10 years ago

Experimental implementation:

https://github.com/dexX7/masterchest-wallet/tree/eb45845f29d6ca00688125ac609ad94f39697c0e

"Send" - "Amount" input box:

  • Box is cleared, if box is focused and amount is 0.00000000
  • Set amount to 0.00000000, if box loses focus and is empty
  • Amount is formated to "_.____", if box loses focus and amount is valid

Compiled binary is included.

Does this match your expectation?

ripper234 commented 10 years ago

Sounds good.