Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Change user permission by using a new apply button #12346

Merged
merged 7 commits into from
Mar 19, 2024

Conversation

florianduros
Copy link
Contributor

@florianduros florianduros commented Mar 15, 2024

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

Closes element-hq/element-web#27083

This PR adds an Apply button for editing the power level of privileged and muted users.

Privileged and muted users have a similar behavior in the current implementation. Only the listed users are changing.
This behavior is extracted into a new component PowerLevelSelector and the apply button is added.

The button style when disabled is a bit different than the Add privileged user section. This button is using the new compound button component and the new design system style.

Before Capture d’écran 2024-03-15 à 17 47 19
After Capture d’écran 2024-03-15 à 17 46 19

It's extracting the current behavior of the privileged users and muted of `RolesRoomSettingsTab.tsx` into a dedicated component.
It's also adding a new apply button.
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

I see, this did end up as quite a big change. Great to have that logic out of the room settings tab though.

settings = await app.settings.openRoomSettings("Roles & Permissions");
});

test("should be able to change the role of an user", async ({ page, app, user }) => {
Copy link
Member

Choose a reason for hiding this comment

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

minor grammar fix

Suggested change
test("should be able to change the role of an user", async ({ page, app, user }) => {
test("should be able to change the role of a user", async ({ page, app, user }) => {

@florianduros florianduros added this pull request to the merge queue Mar 19, 2024
Merged via the queue into develop with commit ddd0ec4 Mar 19, 2024
22 checks passed
@florianduros florianduros deleted the florianduros/fix/role-permission-selection branch March 19, 2024 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Roles and permissions - saving changes should be on button click, not on combo box change
2 participants