Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.61k stars 2.93k forks source link

[HOLD for payment 2024-08-19] [$250] [Wave Control] Update the Report field list type creation flow #45990

Closed mountiny closed 3 months ago

mountiny commented 4 months ago

When creating a list-type report field, we need to make sure the Initial value option comes after the list of values AND the List values option shows the created values as a comma-separated list, as shown below.

Note that the list values should not truncate but wrap to next line

image

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0124fe6a5dd4337910
  • Upwork Job ID: 1815657257015158749
  • Last Price Increase: 2024-07-23
  • Automatic offers:
    • shubham1206agra | Reviewer | 103272331
    • Krishna2323 | Contributor | 103272333
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @muttmuure
melvin-bot[bot] commented 4 months ago

Triggered auto assignment to @muttmuure (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

mountiny commented 4 months ago

@Expensify/design @JmillsExpensify Can you please double check that is right?

shawnborton commented 4 months ago

Looks good to me!

Krishna2323 commented 4 months ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Initial value incorrectly appears above List values for report field configuration

What is the root cause of that problem?

The MenuItemWithTopDescription for initialValue is placed above lisvalues https://github.com/Expensify/App/blob/d739580e46c01bc754c2410467f41ed321990c7c/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx#L83-L98

What changes do you think we should make in order to solve the problem?

What alternative solutions did you explore? (Optional)

// In 'ReportFieldsSettingsPage'
title={listValues.filter((v, i) => !disabledListValues[i]).join(', ')}

// In 'CreateReportFieldsPage'
title={formDraft?.[INPUT_IDS.LIST_VALUES]?.filter((v, i) => !formDraft?.[INPUT_IDS.DISABLED_LIST_VALUES][i]).join(', ')}

Additionally we also might want to increase the number of lines for value field in ReportFieldsValueSettingsPage. Note: This will be refactored

Result

https://github.com/user-attachments/assets/018c1dd1-cb91-4d03-a046-4c860745da93

Krishna2323 commented 4 months ago

Proposal Updated

melvin-bot[bot] commented 4 months ago

Job added to Upwork: https://www.upwork.com/jobs/~0124fe6a5dd4337910

melvin-bot[bot] commented 4 months ago

Current assignees @rushatgabhane and @shubham1206agra are eligible for the External assigner, not assigning anyone new.

mountiny commented 4 months ago

@rushatgabhane @shubham1206agra can you please review the proposal?

I think the main problem here is to make sure the list values nicely wrap even if the list is very long

shubham1206agra commented 4 months ago

@Krishna2323 Your proposal looks good. Can you just show the screenshot with 20 values and one super-long list value?

Thanks

nkdengineer commented 4 months ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

The list values are displayed incorrectly

What is the root cause of that problem?

This is a new feature request

What changes do you think we should make in order to solve the problem?

  1. We should move the initial value item to below the list value

  2. Get the values of the report field and pass the title prop as the joined list value. Add styles.preWrap style to titleStyle prop so the list value can be displayed in multiline and add styles.breakAll so the long value can be displayed fully.

OPTIONAL: If we only want to display some lines of list values, we can pass numberOfLines prop to control the number of lines that we want to display.

const reportFieldValues = policy?.fieldList?.[reportFieldKey].values ?? [];
{isListFieldType && (
    <MenuItemWithTopDescription
        style={[styles.moneyRequestMenuItem]}
        titleStyle={{...styles.flex1, ...styles.preWrap, ...styles.breakAll}}
        description={translate('workspace.reportFields.listValues')}
        shouldShowRightIcon
        title={reportFieldValues.join(', ')}
        onPress={() => Navigation.navigate(ROUTES.WORKSPACE_REPORT_FIELDS_LIST_VALUES.getRoute(policyID, reportFieldID))}
    />
)}

https://github.com/Expensify/App/blob/bf4bc6f5770babaeb5b4c1d932b364e035f69e2a/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx#L97-L98

  1. We also need to wrap the ScrollView here so that if the list value is too long, we can scroll to the initial value

https://github.com/Expensify/App/blob/bf4bc6f5770babaeb5b4c1d932b364e035f69e2a/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx#L72

We should do the same for the creation flow in CreateReportFieldsPage.

We can see the test branch here for more details https://github.com/nkdengineer/App/tree/fix/45990.

What alternative solutions did you explore? (Optional)

NA

Result

https://github.com/user-attachments/assets/3032e8b1-930f-4e74-9758-a0d4809c14a5

Krishna2323 commented 4 months ago

@shubham1206agra, I think we should allow only 4-5 lines. @shawnborton what's you opinion?

Note: numberOfLinesTitle={0} can be used for not setting any limits on number of lines. One super long value l 20 values
Monosnap New Expensify 2024-07-23 15-42-34 Monosnap New Expensify 2024-07-23 15-43-43
shawnborton commented 4 months ago

Cc @Expensify/design @JmillsExpensify @trjExpensify - do we have strong feelings here? Part of me thinks that trimming to 4-5 lines makes sense here in case the list is insanely long.

trjExpensify commented 4 months ago

I definitely think we should cap it, these imported lists of customers/projects can be very long.

melvin-bot[bot] commented 4 months ago

๐Ÿ“ฃ @rafaykr! ๐Ÿ“ฃ Hey, it seems we donโ€™t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
rafaykr commented 4 months ago

contributor details expensify account email:kamham56@gmail.com upwork account : https://www.upwork.com/freelancers/~01510f6bfd2680dd92

Dear Hiring Manager,

I am excited to submit my proposal for the React Native developer position to assist with the migration project at Expensify. As a seasoned full-stack developer with a strong focus on mobile application development and user experience, I am confident in my ability to address the challenges outlined in GitHub issue https://github.com/Expensify/App/issues/45990.

Expensifyโ€™s commitment to maintaining a reliable and secure system for processing financial transactions is commendable, and the goal of unifying the front-end across platforms using React Native is a strategic move towards enhancing user experience and operational efficiency. I am eager to contribute to this mission and help ensure that your platform remains at the forefront of innovation in the financial sector.

Addressing Your Needs: Ensuring Accurate Field Order:

I will modify the React component responsible for rendering the list-type report field to ensure the Initial value option appears after the List values. This will involve a careful restructuring of the JSX to guarantee the desired order is achieved. Improving List Values Display:

To ensure that the List values are displayed correctly as a comma-separated list without truncation, I will update the CSS/styling. This will involve implementing a wrapping mechanism that maintains readability and presentation integrity, even when the values exceed the container width. Proposed Technical Solution: Component Restructuring: Locate and adjust the relevant component file to place the Initial value option after the List values. This ensures logical and user-friendly field arrangement. Styling Adjustments: Update the CSS to prevent truncation and enable wrapping of List values. The goal is to enhance readability and ensure that the comma-separated values are clearly displayed across all device sizes. Implementation Plan: Component File Update:

Adjust the JSX structure in the React component.

Apply CSS to ensure proper wrapping.

..list-values { white-space: normal; word-wrap: break-word; }

Testing:

Conduct comprehensive unit and visual tests across all platforms to verify the correctness and usability of the changes. Provide detailed screenshots and test cases to demonstrate the solutionโ€™s effectiveness.

Why I am the Right Fit:

Experience: With a strong background in React Native and UI/UX design, I have successfully delivered numerous projects that required meticulous attention to detail and robust cross-platform compatibility. Commitment to Quality: I am dedicated to ensuring that my contributions meet the highest standards of quality and reliability, aligning with Expensifyโ€™s reputation for excellence. Collaborative Approach: I value clear communication and collaboration, ensuring that I work seamlessly with your team to integrate the solution efficiently. I have reviewed the Expensify Contributor Guidelines and am fully prepared to adhere to all standards and practices outlined. My proposal is detailed on the GitHub issue as requested, and I am eager to discuss how my skills and experience align with your needs further.

Thank you for considering my application. I look forward to the possibility of contributing to Expensify's continued success and helping to advance your migration project.

Best regards, Muhammad Rafay khan

dannymcclain commented 4 months ago

Part of me thinks that trimming to 4-5 lines makes sense here in case the list is insanely long.

I definitely think we should cap it, these imported lists of customers/projects can be very long.

Yeah I agree. After seeing the super mega long one, I don't really see a whole lot of value gained by NEVER truncating. At a certain point the huge push input list is just not helpful. I think capping at 4-5 lines is good.

nkdengineer commented 4 months ago

I think capping at 4-5 lines is good.

Updated proposal https://github.com/Expensify/App/issues/45990#issuecomment-2244784255 with new design.

shubham1206agra commented 4 months ago

Lets go ahead with @Krishna2323's proposal then.

๐ŸŽ€๐Ÿ‘€๐ŸŽ€ C+ reviewed

melvin-bot[bot] commented 4 months ago

Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

JmillsExpensify commented 4 months ago

Not passionate about truncating.

melvin-bot[bot] commented 4 months ago

๐Ÿ“ฃ @shubham1206agra ๐ŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role ๐ŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 4 months ago

๐Ÿ“ฃ @Krishna2323 ๐ŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role ๐ŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review ๐Ÿง‘โ€๐Ÿ’ป Keep in mind: Code of Conduct | Contributing ๐Ÿ“–

melvin-bot[bot] commented 3 months ago

โš ๏ธ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] commented 3 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 3 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.18-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-19. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 3 months ago

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

Krishna2323 commented 3 months ago

@muttmuure, this is ready for payments :)

shubham1206agra commented 3 months ago

@mountiny For this issue, my payment will be separate from the project or in the project?

melvin-bot[bot] commented 3 months ago

@rushatgabhane, @mountiny, @muttmuure, @shubham1206agra, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

mountiny commented 3 months ago

This can be separate

$250 to @Krishna2323 and to @shubham1206agra please @muttmuure

Krishna2323 commented 3 months ago

I have been paid. ๐Ÿ™๐Ÿป

muttmuure commented 3 months ago

@Krishna2323 has indeed been paid

muttmuure commented 3 months ago

@shubham1206agra I need you to accept the offer https://www.upwork.com/nx/wm/offer/103272331

muttmuure commented 3 months ago

@rushatgabhane - $250 C+ @Krishna2323 - $250 @shubham1206agra - $250

shubham1206agra commented 3 months ago

@muttmuure Offer accepted

muttmuure commented 3 months ago

Paid

muttmuure commented 3 months ago

@rushatgabhane can request in ND using the summary above https://github.com/Expensify/App/issues/45990#issuecomment-2304378754

garrettmknight commented 3 months ago

$250 approved for @rushatgabhane based on this summary.