Open stackingsaunter opened 1 year ago
I would like to work on this for Hacktoberfest.
@abhiShandy I assigned you
First phase
Second phase
The Intl.NumberFormat
displays fiat in different formats when locale is changed. Check this example.
@abhiShandy I changed a bit colors in the inputs. Please refer to those colors:
@stackingsaunter Adding a trailing unit in the user input is difficult with HTML and CSS. I'll try to find a JavaScript trick. Meanwhile, have you considered an alternative design?
I was wondering if an auto-growing input field maybe might work? - to have the unit not as part of the input but after the input. though avoiding JS would be nice.
I was wondering if an auto-growing input field maybe might work? - to have the unit not as part of the input but after the input. though avoiding JS would be nice.
width: fit-content
doesn't work on Chrome at least. Check this Tailwind Playground.
This CSS trick uses <span contenteditable>
instead of <input type="number"/>
. Is that an acceptable solution?
@abhiShandy hey are you still working on this?
@abhiShandy hey are you still working on this?
No. I'm not working on this.
maybe we start without 2 - and just do the fiat - sat switch first?
@bumi you mean add a button somewhere?
This is indeed very well missed feature. Being able to see the equivalent fiat amount when entering the amount of sats in a new invoice is very useful thing to have. Remember to add somewhere an option to choose the available fiat to be the default used.
Currently there are two important missing features while creating an invoice that are often used and requested:
Let's add both being able to set an input by user in fiat and also change sats to BTC. You can play how desired outcome should work in this prototype
You can see the behaviour flow and hanoff HERE.
Changes description:
Add trailing users input "sats" or "BTC" unit:
Those units should be clickable and change to BTC (and vice versa)
Clicking on fiat unit should switch it's place with bitcoin units, thus making it possible for the user to create an invoice priced in fiat:
If fiat unit has a symbol, we show it in front of the number. If it uses 3 letters (USD, ARS, TRY, PLN etc) we should show it after the fiat amount:
All units have hover states I also found one colouring inconsistency. Amount input in dark mode uses "gray" instead of "neutral" like all the rest units, so we could upgrade it to "neutral" with PR related to this issue^
Handoff