Skip to content

[HOLD for payment 2024-05-02] [$750] [CRITICAL] Create a reusable and stylable MoneyRequestAmountInput  #40382

Description

@youssef-lr

Problem

the MoneyRequestAmountForm is currently designed to be used from the Amount pages where it is displayed in a view that takes up the whole page, and has specific style for that. We'd like to reuse this input without any extra style and be able to re-style it with ease.

Solution

Decouple the logic that handles accepting and formatting amounts from MoneyRequestAmountForm, by creating a new MoneyRequestAmountInput that doesn't have any custom styles and looks like a basic input.

  1. Move all the logic for handling input from MoneyRequestAmountForm into the new input.
  2. The MoneyRequestAmountForm should only keep navigation and form logic.
  3. The input should have a new callback onAmountChange that can be used by parent components.
  4. Display currency as part of the input as in the mocks. For this we can simply use the prefixCharacter that should be prop drilled into the underlying TextInput used in this component. We will need to configure the padding of the prefix text to accomodate for both single character currencies and 3 characters currencies. (e.g. $ and AED). Since the prefix is absolutely positioned, this is necessary.
  5. The new input should accept styles so that it can be reused from the Amount full pages, e.g. no borders, increased font, etc.

Here's a mock of how the input should look like when used from the Splits page:

Screenshot 2024-04-17 at 22 13 15
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f6b340c95c53b510
  • Upwork Job ID: 1780706666038550528
  • Last Price Increase: 2024-04-30
  • Automatic offers:
    • hungvu193 | Reviewer | 0
    • ZhenjaHorbach | Contributor | 0

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions