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.57k stars 2.9k forks source link

[$0] Report fields - No checkbox next to list value on web layout #48724

Closed lanitochka17 closed 2 months ago

lanitochka17 commented 2 months ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.30-10 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Report fields
  3. Click Add field
  4. Select List from Type field
  5. Click List values
  6. Click Add value
  7. Add some list values

Expected Result:

There will be checkbox next to each list value (production behavior)

Actual Result:

There is no checkbox next to each list value The checkbox only appears when long clicking on the list value, which brings up the stretched pop-up

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/698e4789-94e8-4b7f-b983-744942d04152

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021832081817508149579
  • Upwork Job ID: 1832081817508149579
  • Last Price Increase: 2024-09-06
  • Automatic offers:
    • ahmedGaber93 | Reviewer | 103848370
    • rayane-djouah | Contributor | 103848373
Issue OwnerCurrent Issue Owner: @ahmedGaber93
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @Beamanator (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 2 months ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

hoangzinh commented 2 months ago

Proposal

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

Report fields - No checkbox next to list value on web layout

What is the root cause of that problem?

Offending PR https://github.com/Expensify/App/pull/46788

In the above PR, we changed to use shouldUseNarrowLayout in ReportFieldsListValuesPage component, which always returns true because the component is displayed in RHP.

https://github.com/Expensify/App/blob/cadd5a85f0d9508bcb1063480f1a76259735487d/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx#L62

Therefore, the list value is displayed as in small-screen devices, although it's on a large-screen device https://github.com/Expensify/App/blob/cadd5a85f0d9508bcb1063480f1a76259735487d/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx#L70

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

I think we should revert to using isSmallScreen in ReportFieldsListValuesPage, the same as previously. Because, I think we intended to display the list in either small-screen or large-screen devices here, not related to the narrow layout.

Result:

Screenshot 2024-09-06 at 23 27 50
daledah commented 2 months ago

Proposal

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

There is no checkbox next to each list value The checkbox only appears when long clicking on the list value, which brings up the stretched pop-up

What is the root cause of that problem?

Currently, in here the value of the shouldUseNarrowLayoutvariable is true even though we are on a large screen because it is being used in the modal.

It causes the value of the canSelectMultiple variable to be false here, leading to a UI issue.

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

We should use isSmallScreenWidth for this case like we did here and here

    // We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to use the correct modal type
    const {isSmallScreenWidth} = useResponsiveLayout();

What alternative solutions did you explore? (Optional)

https://github.com/user-attachments/assets/f535d00d-ef99-4e93-b15a-0d5a0cd10236

rayane-djouah commented 2 months ago

Will be fixed in https://github.com/Expensify/App/pull/48723

melvin-bot[bot] commented 2 months ago

πŸ“£ @ahmedGaber93 πŸŽ‰ 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 2 months ago

πŸ“£ @rayane-djouah πŸŽ‰ 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 πŸ“–

Beamanator commented 2 months ago

@rayane-djouah assigning you since you're the author of https://github.com/Expensify/App/pull/46788 which caused this blocker & you're working on the fix in https://github.com/Expensify/App/pull/48723

haris-aqeel commented 2 months ago

Hi, Is this task already completed? I recently saw a job post regarding this task on upwork but from here, it seems the matter is already resolved.

Here, is the job post link: https://www.upwork.com/jobs/~021832081817508149579

melvin-bot[bot] commented 2 months ago

πŸ“£ @haris-aqeel! πŸ“£ 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>
Beamanator commented 2 months ago

Hi @haris-aqeel - yes sorry this job is already assigned out and being worked on in https://github.com/Expensify/App/pull/48723

Most available jobs in our Github repository will have the Help Wanted label assigned right now

haris-aqeel commented 2 months ago

Contributor details Your Expensify account email: harisaqeel.2001@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/harisaqeel34

melvin-bot[bot] commented 2 months ago

βœ… Contributor details stored successfully. Thank you for contributing to Expensify!

melvin-bot[bot] commented 2 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.

rayane-djouah commented 2 months ago

The fix was CPed to staging

Beamanator commented 2 months ago

closing since fix was CP'd and was fixed as regression so no payment needed