Skip to content

[IOU] Make CreateMenu dynamic, add launch Modal options #1508

Description

@jboniface

If you haven’t already, check out our contributing guidelines for onboarding!


view the job on Upwork here.

Platform - version:
current

Deliverables:

This issue builds on top of the existing CreateMenu Bottom Drawer (original issue which introduced this modal can be found here)
New Menu Chat (2)

Chat (3)

  1. Add a menuOption enum to the CreateMenu class
    • With the following types: NewChat: 'NewChat', NewGroup: 'NewGroup', RequestMoney: 'RequestMoney', SplitBill: 'SplitBill', AttachmentPicker: 'AttachmentPicker'
  2. Add a new CreateMenu prop menuOptions which takes an array of the above menuOptions. The menuItemData array should be modified and should now be created dynamically in the constructor, based upon the menuOptions prop
  3. The existing usage of the CreateMenu Modal should then be refactored to use the new prop method (for example here), and new array items should be generated for the new menuOptions (RequestMoney, SplitBill, AttachmentPicker). For now RequestMoney & SplitBill can redirect to an existing route.
  4. A new prop should be created on The ReportView Component: hasMultipleParticipants which will be true if participants is greater than 2
  5. In a 1:1 or group chat, the attachment picker should be replaced with the CreateMenu Component.
    • The ReportView hasMultipleParticipants prop should then be used to determine the correct menu options to pass in (SplitBill|AddAttachment if true, else RequestMoney|AddAttachment).
    • When the AttachmentPicker option is selected, a callback to the parent component should be invoked via another new prop: onAttachmentPickerSelected or something similar. Finally, this callback should trigger the AttachmentPicker to be rendered from the ReportActionCompose Component, like it was prior to the CreateMenu addition.
  6. The new image assets (for the new menu items) should be added as Expensicons here -- these should be available as the attachment: MenuIcons.zip

Metadata

Metadata

Assignees

Labels

No labels
No labels

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