Skip to content

Fix admin privilege dialog not opening from actions menu - #5655

Merged
akolson merged 2 commits into
learningequality:unstablefrom
sharma-anushka:issue/#5645
Jan 29, 2026
Merged

Fix admin privilege dialog not opening from actions menu#5655
akolson merged 2 commits into
learningequality:unstablefrom
sharma-anushka:issue/#5645

Conversation

@sharma-anushka

Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue where the Add / Remove admin privileges dialog did not open upon clicking the Add admin privileges action inside the Users tab.

What was changed

  • Adjusted click handling so the menu interaction no longer blocks dialog rendering

  • Preserved existing behavior and API of UserActionsDropdown and UserPrivilegeModal

Why this works

The dialog state is now set at the correct time in Vue’s render cycle

Prevents the menu component from swallowing or cancelling the dialog trigger

Matches the expected UX: clicking the Add admin privilages reliably opens the confirmation dialog

Testing

Manually verified:

  • Add admin privileges dialog opens correctly
  • Remove admin privileges dialog opens correctly
    Email / Deactivate / Delete actions still behave as expected
Screen.Recording.2026-01-20.at.11.23.35.PM.mov

Related issue

Fixes#5645

@learning-equality-bot

Copy link
Copy Markdown

👋 Thanks for contributing!

We will assign a reviewer within the next two weeks. In the meantime, please ensure that:

  • You ran pre-commit locally
  • All issue requirements are satisfied
  • The contribution is aligned with our Contributing guidelines. Pay extra attention to Using generative AI. Pull requests that don't follow the guidelines will be closed.

We'll be in touch! 😊

@MisRob

Copy link
Copy Markdown
Member

Hi again @sharma-anushka, thank you. Before we assign a maintainer, I will first invite the community review.

@MisRob

Copy link
Copy Markdown
Member

📢 ✨ Community Review guidance for both authors and reviewers.

@MisRob

Copy link
Copy Markdown
Member

Hi @LightCreator1007 - I think you mentioned interest to collaborate on this issue - you're welcome to review. Thanks both.

@akolsonakolson self-assigned this Jan 27, 2026
<VListTile
v-if="user.is_admin"
data-test="removeadmin"
@mousedown.stop

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its better to use @click.stop as it offers clearer intent and better alignment with the actual behavior we are aiming to protect against. Also, the mousedown event fires much earlier compare to the click.stop that fires after the full click is realized.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it . Ill make the changes. Thankyou for letting me know in detail.

<VListTile
v-else
data-test="addadmin"
@mousedown.stop

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment here

@akolsonakolson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sharma-anushka! Great work on this and manual QA checks out. I have however left a few comments for your action. Thanks

@sharma-anushka

Copy link
Copy Markdown
ContributorAuthor

Hi @akolson , Ive made the necessary changes, you may have a look.

@akolson
akolson self-requested a review January 29, 2026 08:02

@akolsonakolson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @sharma-anushka

@akolson
akolson merged commit b26645b into learningequality:unstableJan 29, 2026
15 checks passed
@sharma-anushka
sharma-anushka deleted the issue/#5645 branch January 29, 2026 11:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some administration channel and user actions are non-functional

3 participants

@sharma-anushka@MisRob@akolson