Closed mountiny closed 3 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.
@Expensify/design @JmillsExpensify Can you please double check that is right?
Looks good to me!
Initial value incorrectly appears above List values for report field configuration
The MenuItemWithTopDescription
for initialValue
is placed above lisvalues
https://github.com/Expensify/App/blob/d739580e46c01bc754c2410467f41ed321990c7c/src/pages/workspace/reportFields/ReportFieldsSettingsPage.tsx#L83-L98
Place MenuItemWithTopDescription
for initialValue
after MenuItemWithTopDescription
for lisvalues
We should also do this in CreateReportFieldsPage.
Then in ReportFieldsSettingsPage
we need to get the list values. We can merge disabled values if needed.
const listValues = Object.values(policy?.fieldList?.[reportFieldKey]?.values ?? {});
const reportFieldDisabledValues = Object.values(policy?.fieldList?.[reportFieldKey]?.disabledOptions ?? {});
// Pass title
{isListFieldType && (
<MenuItemWithTopDescription
style={[styles.moneyRequestMenuItem]}
titleStyle={styles.flex1}
title={listValues.join(', ')}
Same should be done in CreateReportFieldsPage
but there we should get the list values from formDraft?.[INPUT_IDS.LIST_VALUES]
.
{inputValues[INPUT_IDS.TYPE] === CONST.REPORT_FIELD_TYPES.LIST && (
<MenuItemWithTopDescription
description={translate('workspace.reportFields.listValues')}
shouldShowRightIcon
onPress={() => Navigation.navigate(ROUTES.WORKSPACE_REPORT_FIELDS_LIST_VALUES.getRoute(policyID))}
title={formDraft?.[INPUT_IDS.LIST_VALUES]?.join(', ')}
/>
)}
If we want to wrap the title in next line we can do that by using numberOfLinesTitle
prop.
Code can be refactored because we have the similar way of getting list values in ReportFieldsListValuesPage
also.
disabledListValues
in ReportFieldsSettingsPage
and formDraft?.[INPUT_IDS.DISABLED_LIST_VALUES]
in CreateReportFieldsPage
page.// 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
https://github.com/user-attachments/assets/018c1dd1-cb91-4d03-a046-4c860745da93
Job added to Upwork: https://www.upwork.com/jobs/~0124fe6a5dd4337910
Current assignees @rushatgabhane and @shubham1206agra are eligible for the External assigner, not assigning anyone new.
@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
@Krishna2323 Your proposal looks good. Can you just show the screenshot with 20 values and one super-long list value?
Thanks
The list values are displayed incorrectly
This is a new feature request
We should move the initial value item to below the list value
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))}
/>
)}
ScrollView
here so that if the list value is too long, we can scroll to the initial valueWe 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.
NA
https://github.com/user-attachments/assets/3032e8b1-930f-4e74-9758-a0d4809c14a5
@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 |
---|---|---|
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.
I definitely think we should cap it, these imported lists of customers/projects can be very long.
๐ฃ @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:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
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
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.
I think capping at 4-5 lines is good.
Updated proposal https://github.com/Expensify/App/issues/45990#issuecomment-2244784255 with new design.
Lets go ahead with @Krishna2323's proposal then.
๐๐๐ C+ reviewed
Current assignee @mountiny is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Not passionate about truncating.
๐ฃ @shubham1206agra ๐ An offer has been automatically sent to your Upwork account for the Reviewer role ๐ Thanks for contributing to the Expensify app!
๐ฃ @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 ๐
โ ๏ธ 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.
Reviewing
label has been removed, please complete the "BugZero Checklist".
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:
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:
@muttmuure, this is ready for payments :)
@mountiny For this issue, my payment will be separate from the project or in the project?
@rushatgabhane, @mountiny, @muttmuure, @shubham1206agra, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
This can be separate
$250 to @Krishna2323 and to @shubham1206agra please @muttmuure
I have been paid. ๐๐ป
@Krishna2323 has indeed been paid
@shubham1206agra I need you to accept the offer https://www.upwork.com/nx/wm/offer/103272331
@rushatgabhane - $250 C+ @Krishna2323 - $250 @shubham1206agra - $250
@muttmuure Offer accepted
Paid
@rushatgabhane can request in ND using the summary above https://github.com/Expensify/App/issues/45990#issuecomment-2304378754
$250 approved for @rushatgabhane based on this summary.
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
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @muttmuure