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

Members - 'Make admin' option is not displayed before refreshing the page #37748

Closed
3 of 6 tasks
kbecciv opened this issue Mar 5, 2024 · 11 comments
Closed
3 of 6 tasks
Assignees

Comments

@kbecciv
Copy link

kbecciv commented Mar 5, 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: 1.4.47-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team

Action Performed:

  1. Create a workspace if you don't have any
  2. Invite a user
  3. Before refreshing the members page, select the user
  4. Click on 'Selected dropdown' on top-right corner of the page
  5. Refresh the page > select the user > click on 'Selected dropdown'

Expected Result:

'Make admin' option should be displayed

Actual Result:

'Make admin' option is not displayed

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

Bug6402586_1709631995965.Screen_Recording_2024-03-05_at_12.18.42_in_the_afternoon.mp4

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Mar 5, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

👋 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.

Copy link

melvin-bot bot commented Mar 5, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Mar 5, 2024

We think that this bug might be related to #wave8-collect-admins
@zanyrenney

@aimane-chnaif
Copy link
Contributor

This is known - #37199 (comment)
cc: @luacmartins

@allgandalf
Copy link
Contributor

Proposal

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

'Make admin' option is not displayed before refreshing the page

What is the root cause of that problem?

We currently don't have any useEffect in WorkspaceMembersPage to update the options on addition/deletion of members

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

Create a useEffect which will keep track of policyMembers and will call the getBulkActionsButtonOptions whenever we update the members list

What alternative solutions did you explore? (Optional)

N/A

@dukenv0307
Copy link
Contributor

Proposal

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

'Make admin' option is not displayed

What is the root cause of that problem?

BE doesn't return the role of invited users after we invite them and then make admin option doesn't appear until we refresh the page to call OpenWorkspaceMembersPage API that will return the correct role of user.

Screenshot 2024-03-05 at 21 25 25

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

  1. We should update the role of invited users in optimistic data
optimisticMembersState[accountID] = {
    pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    role: CONST.POLICY.ROLE.USER
};

optimisticMembersState[accountID] = {pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE};

  1. BE should return the role of users correctly in AddMembersToWorkspace API

What alternative solutions did you explore? (Optional)

NA

@aimane-chnaif
Copy link
Contributor

This might not be External. @burczu will be handling this.
We agreed to fix this separately.

@danieldoglas
Copy link
Contributor

danieldoglas commented Mar 5, 2024

Agreed this is not external, since it is already known and agreed that it would be fixed by the original PR creator

@danieldoglas danieldoglas added Daily KSv2 and removed Hourly KSv2 labels Mar 5, 2024
@luacmartins
Copy link
Contributor

We can demote this, we're still developing this feature.

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Mar 5, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 7, 2024
Copy link

melvin-bot bot commented Mar 8, 2024

@danieldoglas Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@danieldoglas
Copy link
Contributor

The change that implements this has reached staging and has its own testing steps with original issue. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants