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 on #29080][$500] Web - Workspace - First member highlighted after inviting users #31865

Closed
6 tasks done
lanitochka17 opened this issue Nov 25, 2023 · 29 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 25, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.3-0
Reproducible in staging?: Y
Reproducible in production?: Y
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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Navigate to Settings > Workspace > New workspace
  2. Go to the Members section > Invite
  3. Select 3 users and invite them
  4. Notice after inviting the first member is highlighted
  5. Click on the back button and revisit the members page
  6. Again revisit the members page
  7. Notice the highlighting is removed

Expected Result:

Members should not be highlighted, particularly the first member, after inviting others

Actual Result:

The first member in the workspace is highlighted after inviting, and the highlighting is eventually removed after revisiting the members page twice

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6288988_1700776262152.2023-11-24_02-48-06.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0129dea2eb15178846
  • Upwork Job ID: 1728452804485468160
  • Last Price Increase: 2023-11-25
  • Automatic offers:
    • getusha | Contributor | 27866653
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 25, 2023
@melvin-bot melvin-bot bot changed the title Web - Workspace - First member highlighted after inviting users [$500] Web - Workspace - First member highlighted after inviting users Nov 25, 2023
Copy link

melvin-bot bot commented Nov 25, 2023

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Nov 25, 2023

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

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

melvin-bot bot commented Nov 25, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Nov 25, 2023

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

@bernhardoj
Copy link
Contributor

The first item on the list is highlighted whenever the list is changed. #29080 is planning to change that by only highlighting the first item if the search value changes, so I think we can hold for it.

@jgddesigns
Copy link

jgddesigns commented Nov 25, 2023

Please re-state the problem that we are trying to solve in this issue.
Workspace members are highlighted after inviting other users.

What is the root cause of that problem?
There is a styling option in BaseSelectionList.js that enables a list item to be highlighted.

What changes do you think we should make in order to solve the problem?
In BaseSelectionList.js, within the function renderItem, alter the variable 'isItemFocused' on line 295 to be equal to false. This would eliminate any list item from being highlighted in the specified manner.

Screen Shot 2023-11-25 at 9 47 44 AM

What alternative solutions did you explore? (Optional)
N/A

@jgddesigns
Copy link

Whoops, a bit late after reading the post above my proposal. If the situation changes, let me know.

@DylanDylann
Copy link
Contributor

DylanDylann commented Nov 25, 2023

Proposal

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

  • Web - Workspace - First member highlighted after inviting users

What is the root cause of that problem?

  • Generally, the first member is highlighted if the sections in

    useEffect(() => {
    // do not change focus on the first render, as it should focus on the selected item
    if (firstLayoutRef.current) {
    return;
    }
    // set the focus on the first item when the sections list is changed
    if (sections.length > 0) {
    updateAndScrollToFocusedIndex(0);
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
    }, [sections]);
    is updated (just not highlighted in the first render) - This is the feature that is handled in here.

  • After we invite any user to the workspace then go back to WorkspaceInitialPage, then we go to the WorkspaceMemberPage again, the props.policyMembers in this page is updated because of API OpenWorkspaceMembersPage is called, that leads to the sections data that is passed to BaseSeletionList is updated, so that lead to the case updateAndScrollToFocusedIndex(0) is called in the second render, that leads to the first member is highlighted.

  • Then, if we go back to WorkspaceInitialPage and then go to WorkspaceMemberPage again, the API OpenWorkspaceMembersPage is still called but the props.policyMembers is not updated because there is no member is added anymore, so the updateAndScrollToFocusedIndex(0) is not called in the second render, that leads to the behavior The first member in the workspace is highlighted after inviting, and the highlighting is eventually removed after revisiting the members page twice"

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

  • We can call the API OpenWorkspaceMembersPage right after inviting any user to make sure the props.policyMembers is up-to-date. Can do it by updating:
    useEffect(() => {
    getWorkspaceMembers();
    // eslint-disable-next-line react-hooks/exhaustive-deps
    }, []);

    to:
    const isFocused = useIsFocused();
    useEffect(() => {
        getWorkspaceMembers();
        // eslint-disable-next-line react-hooks/exhaustive-deps
    }, [isFocused]);

What alternative solutions did you explore? (Optional)

  • NA

Result

Screencast.from.26-11-2023.03.35.32.webm

@ntdiary
Copy link
Contributor

ntdiary commented Nov 28, 2023

Hi, @lschurr, I've got a lot on my plate, can you please re-assign another c+? :)

@lschurr
Copy link
Contributor

lschurr commented Nov 28, 2023

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 28, 2023
@lschurr lschurr added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 28, 2023
@Expensify Expensify deleted a comment from melvin-bot bot Nov 28, 2023
@lschurr
Copy link
Contributor

lschurr commented Nov 28, 2023

Thanks @getusha! Looks like we have a few proposals up for review.

@situchan
Copy link
Contributor

Should this be hold based on #31865 (comment)?

@melvin-bot melvin-bot bot added the Overdue label Dec 1, 2023
@lschurr
Copy link
Contributor

lschurr commented Dec 1, 2023

@getusha could you take a look at this one?

@melvin-bot melvin-bot bot removed the Overdue label Dec 1, 2023
@getusha
Copy link
Contributor

getusha commented Dec 1, 2023

@lschurr this should be held for #29080 as it could potentially change the current behavior.

@lschurr lschurr changed the title [$500] Web - Workspace - First member highlighted after inviting users [HOLD on #29080][$500] Web - Workspace - First member highlighted after inviting users Dec 1, 2023
@lschurr lschurr added the Weekly KSv2 label Dec 1, 2023
@melvin-bot melvin-bot bot added the Overdue label Jan 16, 2024
@lschurr
Copy link
Contributor

lschurr commented Jan 16, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Jan 16, 2024
@melvin-bot melvin-bot bot added the Overdue label Jan 24, 2024
@lschurr
Copy link
Contributor

lschurr commented Jan 24, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Jan 24, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 2, 2024
@lschurr
Copy link
Contributor

lschurr commented Feb 2, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Feb 2, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
@lschurr
Copy link
Contributor

lschurr commented Feb 12, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 21, 2024
@lschurr
Copy link
Contributor

lschurr commented Feb 21, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Feb 21, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 1, 2024
@lschurr
Copy link
Contributor

lschurr commented Mar 1, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Mar 1, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 11, 2024
@lschurr
Copy link
Contributor

lschurr commented Mar 11, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Mar 11, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 19, 2024
@lschurr
Copy link
Contributor

lschurr commented Mar 19, 2024

On hold.

@melvin-bot melvin-bot bot removed the Overdue label Mar 19, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@lschurr
Copy link
Contributor

lschurr commented Apr 1, 2024

The bug this was held on is fixed - #29080

@getusha are you able to reproduce this bug?

@melvin-bot melvin-bot bot removed the Overdue label Apr 1, 2024
@getusha
Copy link
Contributor

getusha commented Apr 1, 2024

@lschurr the layout is entirely changed, we no longer highlight the first member. we can close this.

Screenshot 2024-04-01 at 9 41 54 at night

@lschurr
Copy link
Contributor

lschurr commented Apr 1, 2024

Perfect, thanks!

@lschurr lschurr closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants