question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Chat] [IOU] Create IOU Amount step

See original GitHub issue

If 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: BNP Web/Desktop: image

Deliverables:

  1. 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.
  2. As the Component state is managed by IOUModal, selectedCurrency and amount should be added as IOUAmount props.
  3. Add callback functions as addition props (numberPressed, backspacePressed, & currencySelected), similar to the already existing onStepComplete prop.
  4. Persist selectedCurrency(in code form: ‘GBP, USD, EUR’) and amount within IOUModal’s state, pass this down to the IOUAMount Component via the props you just added.
  5. 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).
  6. 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
  7. 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).
  8. Enable/disable the next button depending on the validity of the amount (matching against the decimal number regex)
  9. 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:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
tugbadogancommented, Mar 22, 2021

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 in IOUAmount page.

I will send the PR soon.

1reaction
roryabrahamcommented, Mar 11, 2021

I found how to design separate design for native app and web/desktop. But I’m not sure how to handle Web and Mobile Web difference without adding platform specific code in the module. Do you have any example about that?

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 the isSmallScreenWidth 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found