[Chat] [IOU] Create IOU Amount step
See original GitHub issueIf you haven’t already, check out our contributing guidelines for onboarding!
This issue builds on top of the existing IOU Modal, which was implemented in this PR. The IOUAMount
step component has already been created (original PR) and functions as a controlled component (IOUModal manages its state).
The page allows users to select the amount they are requesting from a single user or group. To open the Modal, you can navigate to localhost:8080/#/iou/request
AND localhost:8080/#/iou/split
.
Mobile: Web/Desktop:
Deliverables:
- Create the UI displayed in the above screenshot: An amount text field (not an input field), a currency symbol text field, a collection of buttons making up the BigNumberPad (mobile and mobile web only), and a button for progressing to the next step.
- As the Component state is managed by IOUModal,
selectedCurrency
andamount
should be added asIOUAmount
props. - Add callback functions as addition props (
numberPressed
,backspacePressed
, ¤cySelected
), similar to the already existingonStepComplete
prop. - Persist
selectedCurrency
(in code form: ‘GBP, USD, EUR’) andamount
within IOUModal’s state, pass this down to the IOUAMount Component via the props you just added. - For now, currency will remain hardcoded as ‘USD’ within the IOUModal state. The currency Text component can also be set to use the currency code, instead of the currency symbol (currency will be added in a separate issue).
- When the function props are called, verify the validity of the input via a decimal number regex, and update the Amount Text field if valid
- When the
currencySelected
function prop is called, update the currency code within IOUModal state (for now, this prop function won’t be called – but please test it with a currency code, like USD, EUR, AUD). - Enable/disable the next button depending on the validity of the amount (matching against the decimal number regex)
- The page title should be set to ‘Request Money’ or ‘Split Bill’ based upon the current route (example). The current solution should be replaced.
Job posting: https://www.upwork.com/jobs/~01e9946a32707d6c32
Edit: Added Web/Desktop mock
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
How to Write an IOU: 9 Steps (with Pictures) - wikiHow
Include the date and the amount being borrowed, or the amount agreed on for the service or product. ... How much did you...
Read more >IOU ChatBot - Devpost
The IOU ChatBot integrates directly with the user's existing group chats to help keep track of these "IOU" transactions between group members.
Read more >[HOLD RNW #2421] [$2000] Android/IOS - Split/request money
The composer should not be focused after making an IOU request. Actual Result: The composer is focused. Workaround: Swipe the keyboard down to ......
Read more >Free IOU Form & FAQs - Rocket Lawyer
Acknowledge a debt with a signed agreement. Make, sign & save a customized IOU Form with Rocket Lawyer. ... Create Your Document In...
Read more >Lightning = BTC ≠ IOU - Medium
Calling Lightning transactions “IOUs” devalues them as nothing more than cheap talk, something less than “real” bitcoin transactions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @johnmlee101,
Thanks for flagging this issue. In order to resolve this issue, I’m planning to add a prop to
TextInputFocusable
component to control cursor position (whether we should keep the cursor at the end all the time) and set this prop inIOUAmount
page.I will send the PR soon.
Hi @tugbadogan, what I would recommend in this case is to differentiate by screen width instead of platform. So you can wrap your component with the
withWindowDimensions
HOC, and then check the value of theisSmallScreenWidth
prop. If true, you can assume you’re dealing with a mobile device. If false, assume you’re dealing with a laptop or desktop computer. That’s probably sufficient for this use case in my opinion.