gratipay / gratipay.com

Here lieth a pioneer in open source sustainability. RIP
https://gratipay.news/the-end-cbfba8f50981
MIT License
1.12k stars 308 forks source link

Giving should be number pad on mobile #4593

Closed mattbk closed 6 years ago

mattbk commented 7 years ago

I'm no longer seeing the extra space (below), but should still be a number pad, not a keyboard.

Right now text entry, so decimals add extra space.

img_20170901_050451

EdOverflow commented 7 years ago

This could be resolved as follows:

- <input type="text" name="amount" class="amount" value="0" min="0" max="1000">
+ <input type="number" step="0.01" name="amount" class="amount" value="0" min="0" max="1000">
Changaco commented 7 years ago

I think type="number" wasn't used for a reason, possibly related to i18n, or maybe just because native number inputs aren't that great on desktop.

@EdOverflow You forgot to add step="0.01" in your diff.

sthkindacrazy commented 7 years ago

how about limiting the input by keycode?

datavistics commented 7 years ago

Is this still an issue? It looks like it might have been fixed:

<input type="text" name="amount" class="amount" value="{{ format_decimal(payment_instruction.amount) }}" min="0" max="1000">

mattbk commented 7 years ago

The extra space seems to have been resolved (maybe it was a phone issue?). I'm still not seeing a number pad (versus keyboard) on Android, though.

EchoLynx commented 7 years ago

I want a Hacktoberfest shirt - I'm going to work on this issue some. Building gratipay now.

EDIT: As described in the readme, cryptography has problems, hehe

EchoLynx commented 7 years ago

Most of the places that talk about the cryptography build error I'm getting say that it was fixed in later versions. I see that the latest version of cryptography is 2.1.1. I tried it without thinking about semantic versioning and (no surprise) it didn't work. So now I'm going to try the next version in the changelog, 1.6.

This raised some questions:

  1. Should I bother upgrading this? Is there a reason gratipay uses the version that it does? (1.5.3)
  2. Shouldn't the latest version of cryptography be used at all times? This comes from the naieve assumption that all financial stuff should use the latest crypto.

EDIT - Just found something that suggests this is all in my environment.

EDIT2 - It seems that 1.5.3 links against OpenSSL 1.0.2j during build. I'm running Arch Linux and the version of OpenSSL provided by pacman is OpenSSL 1.1.0f. According to the cryptography changelog, support for building against 1.1.0 wasn't added until cryptography version 2.0. Cryptography's supported platforms don't include Arch Linux...

EchoLynx commented 7 years ago

I'm unsure of what to do next. I could run an OS that you folks use in a virtual machine and use that to build gratipay.com. Or I could try to upgrade to a later version of cryptography. I supposed I'd prefer upgrading, but I don't know if there's a reason why you're using this version of cryptography or how much work upgrading would be or if the work would be appreciated. Any thoughts would be appreciated.

mattbk commented 7 years ago

@EchoLynx, what steps are you taking to run locally? What platform are you running on? Duh, you said this.

EchoLynx commented 7 years ago

Hey @mattbk, thanks for following up.

I've been doing my best to follow the README.md. Specifically,

git clone https://github.com/gratipay/gratipay.com.git
cd gratipay.com
createdb gratipay
make schema fake
make run

make schema fake is the step I'm stuck on. I've found that I can reproduce the cryptography build issues just by running make env, so I've been doing that until I can get past it. Specifically, I get the following error about building cryptography: https://gist.github.com/EchoLynx/b1ee77e49a70ec5e08a4cc96d6fdaa8e I've made it past that a few times (more details above) and when I do I make clean then make schema fake... but then there are new errors about calls to the cryptography library being improperly made.

I'm trying to build this all on an installation of Arch Linux that was up to date as of 9:33pm EST today.