Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-11-28] [$250] When a row is selected in the chat switcher, it doesn't have rounded edges #52158

Closed
1 of 8 tasks
m-natarajan opened this issue Nov 7, 2024 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Nov 7, 2024

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.58-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click Search > chats
  3. Click chat finder and enter key word to search
  4. Use the arrow keys on the keyboard to select a search result

Expected Result:

Row's selected style should have the rounded edges

Actual Result:

Row's selected style doesn't have the rounded edges

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

CleanShot 2024-11-05 at 16 14 33@2x

Snip - (1) New Expensify - Google Chrome

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021854327558552515894
  • Upwork Job ID: 1854327558552515894
  • Last Price Increase: 2024-11-07
  • Automatic offers:
    • rayane-djouah | Reviewer | 104845398
Issue OwnerCurrent Issue Owner: @isabelastisser
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

Triggered auto assignment to @isabelastisser (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@luacmartins luacmartins self-assigned this Nov 7, 2024
@luacmartins luacmartins added the External Added to denote the issue can be worked on by a contributor label Nov 7, 2024
@melvin-bot melvin-bot bot changed the title When a row is selected in the chat switcher, it doesn't have rounded edges [$250] When a row is selected in the chat switcher, it doesn't have rounded edges Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

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

@Krishna2323
Copy link
Contributor

Proposal


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

When a row is selected in the chat switcher, it doesn't have rounded edges

What is the root cause of that problem?

styles.br2 is not added to listItemWrapperStyle prop.

listItemWrapperStyle={[styles.pr3, styles.pl3]}

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


  • Add styles.br2 to listItemWrapperStyle prop.
  • We might need to change the border radius value.
  • We can also remove wrapperStyle: [styles.pr3, styles.pl3] from the line below because wrapperStyle won't be applied.
  • Minor adjustments can be made in the PR. We can also consider removing pressableStyle, but we will test thoroughly before removing the styles. If we remove the styles then we can directly pass recentSearchesData without creating a new array styledRecentReports.
    const styledRecentReports = recentReports.map((item) => ({...item, pressableStyle: styles.br2, wrapperStyle: [styles.pr3, styles.pl3]}));

    wrapperStyle={listItemWrapperStyle}

What alternative solutions did you explore? (Optional)

Result

@bernhardoj
Copy link
Contributor

Proposal

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

The highlighted row in the search router list is not rounded.

What is the root cause of that problem?

The structure of the row is Pressable > View. The border-radius isn't applied because the View has the same size as the pressable and the background overflow the Pressable.

<PressableWithFeedback
// eslint-disable-next-line react/jsx-props-no-spreading
{...bind}
ref={pressableRef}
onLongPress={() => {
onLongPressRow?.(item);
}}
onPress={(e) => {
if (isMouseDownOnInput) {
e?.stopPropagation(); // Preventing the click action
return;
}
if (shouldPreventEnterKeySubmit && e && 'key' in e && e.key === CONST.KEYBOARD_SHORTCUTS.ENTER.shortcutKey) {
return;
}
onSelectRow(item);
}}
disabled={isDisabled && !item.isSelected}
interactive={item.isInteractive}
accessibilityLabel={item.text ?? ''}
role={CONST.ROLE.BUTTON}
hoverDimmingValue={1}
hoverStyle={[!item.isDisabled && styles.hoveredComponentBG, hoverStyle]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: true}}
onMouseDown={(e) => e.preventDefault()}
id={keyForList ?? ''}
style={[
pressableStyle,
isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, !!item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG),
]}
onFocus={onFocus}
onMouseLeave={handleMouseLeave}
tabIndex={item.tabIndex}
wrapperStyle={pressableWrapperStyle}
>
<View
style={[
wrapperStyle,
isFocused && StyleUtils.getItemBackgroundColorStyle(!!item.isSelected, !!isFocused, !!item.isDisabled, theme.activeComponentBG, theme.hoverComponentBG),

We already apply a padding to it, but it's applied to the wrapper (View), which means the View still has the same size.

listItemWrapperStyle={[styles.pr3, styles.pl3]}

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

We can set overflow: hidden to the pressable, but it still doesn't fix the blue outline cut off.
image

Instead, we can apply the padding to the pressable, just like with the "Recent searches" section.

return (
<UserListItem
pressableStyle={[styles.br2]}
// eslint-disable-next-line react/jsx-props-no-spreading

pressableStyle={[styles.br2, styles.ph3]}

And set the wrapper padding to 0.

listItemWrapperStyle={[styles.pr3, styles.pl3]}

listItemWrapperStyle={[styles.pr0, styles.pl0]}

@thishura
Copy link

thishura commented Nov 7, 2024

@m-natarajan It looks like the same UI issue is consistent across all options in the left sidebar when using the search function and scrolling with the arrow keys

Expensify240711-1.mp4

Copy link

melvin-bot bot commented Nov 7, 2024

📣 @thishura! 📣
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>

@rayane-d
Copy link
Contributor

@bernhardoj's proposal looks good to me

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 10, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

📣 @rayane-djouah 🎉 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 melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Nov 12, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @rayane-djouah

@melvin-bot melvin-bot bot added the Weekly KSv2 label Nov 12, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 21, 2024
@melvin-bot melvin-bot bot changed the title [$250] When a row is selected in the chat switcher, it doesn't have rounded edges [HOLD for payment 2024-11-28] [$250] When a row is selected in the chat switcher, it doesn't have rounded edges Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 21, 2024
Copy link

melvin-bot bot commented Nov 21, 2024

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

If no regressions arise, payment will be issued on 2024-11-28. 🎊

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

Copy link

melvin-bot bot commented Nov 21, 2024

@rayane-djouah @isabelastisser @rayane-djouah The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 27, 2024
@bernhardoj
Copy link
Contributor

Requested in ND.

@rayane-d
Copy link
Contributor

BugZero Checklist:

  • Classify the bug:

    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: https://github.com/Expensify/App/pull/49984/files#r1863672328

  • If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [@isabelastisser] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

#### Precondition:

- N/A

#### Test:

1. Click the Search icon at the top to open the search modal.
2. Use the keyboard's down arrow key to navigate and highlight the recent search items.
3. Verify that the highlighted or focused items have rounded edges.

Do we agree 👍 or 👎

Copy link

melvin-bot bot commented Dec 2, 2024

@luacmartins, @isabelastisser, @bernhardoj, @rayane-djouah Eep! 4 days overdue now. Issues have feelings too...

@isabelastisser
Copy link
Contributor

I was OOO last week; I will complete this today.

@melvin-bot melvin-bot bot removed the Overdue label Dec 2, 2024
@isabelastisser
Copy link
Contributor

Payment summary:

@bernhardoj requires payment through NewDot Manual Requests PENDING $250
@rayane-djouah paid in Upwork: automatic offer (Reviewer) $250

@isabelastisser
Copy link
Contributor

All set!

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants