Skip to content

Unified user list#4281

Merged
mauromsl merged 16 commits into
masterfrom
4185-general-user-list
Aug 22, 2024
Merged

Unified user list#4281
mauromsl merged 16 commits into
masterfrom
4185-general-user-list

Conversation

@joemull

@joemull joemull commented Jun 17, 2024

Copy link
Copy Markdown
Member

Main issue:

Issues addressed:

This introduces a unified list of accounts that people with different permissions can search and filter at both the journal and press levels.

Journal Users

Editors will see a new option at the top of the Roles section in the manager:
image

This list gives a bird's eye view of accounts and roles:
image

They can filter by role, such as reviewer:
image

They can filter by account activation status, to help authors or reviewers who are stuck:
image

They can add roles:
image

All Users

Staff members can see an expanded version of this view at the press level.

Filtering to show all the staff accounts:
image

Adding a role from the press level:
image

What a superuser can see:
image

Mobile design

image

Deprecations and further work

I was able to unify many of the existing features of the previous user lists, with these exceptions:

Reviewer interest management

@ajrbyers did some work on this recently. To keep this work, I've added a new item to the reviewer settings called "Reviewer Interests" that loads the old reviewer list.

image

In the future, I think we could expand on this work by creating a CBV view for user interests, with similar functionality to the new user+role list.

Cross-journal management of roles by editors

An affordance of the old Enrol Users list was the ability for an editor to search outside their journal to find people that should have a role in their journal, so they can add them. I could not implement that feature in this list without introducing a lot of confusion about privileges, press vs. journal level, and hard-coded URLs. We should probably reconsider the feature and determine the best way to offer it going forward.

@ajrbyers ajrbyers 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.

I pulled this and had a play around with this and this is a massive step in the right direction. The search and filter options work really well and will help us eliminate numerous pages.

General comment:
As we discussed in the 18th June standup this page will benefit a lot from the introduction of HTMX. Perhaps the list of roles could be converted into labels (similar to active/inactive & staff/superuser) and have an HTMX rendered modal/form that would allow the user to select or unselect roles from a multi-select list rather than having to add/remove them one at a time.

Requested changes:
If we are to incorporate this into v1.7 I think we need to leave the current pages as they are and introduce this as a beta page.

  • Remove deprecation warning (not sure if when out of debug this is ignored but locally it presents a Django page
  • Remove (old) labels
  • Remove link to Reviewer Interests
  • Mark the new feature as new

@ajrbyers ajrbyers requested a review from mauromsl June 18, 2024 09:17
@ajrbyers ajrbyers assigned mauromsl and unassigned ajrbyers Jun 18, 2024
@mauromsl mauromsl assigned joemull and unassigned mauromsl Jun 26, 2024
@joemull joemull assigned ajrbyers and unassigned joemull Jun 26, 2024
@joemull joemull requested a review from ajrbyers June 26, 2024 14:17
@joemull joemull removed the request for review from ajrbyers July 3, 2024 16:39
@joemull joemull assigned mauromsl and unassigned ajrbyers Jul 3, 2024
@joemull joemull requested a review from ajrbyers July 3, 2024 16:40
@joemull joemull assigned ajrbyers and unassigned mauromsl Jul 3, 2024

@ajrbyers ajrbyers 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.

Thanks for those changes. This is looking great. I've added one request around the AccountRoleForm.

Comment thread src/core/views.py Outdated
@ajrbyers ajrbyers assigned joemull and unassigned ajrbyers Jul 11, 2024
@joemull joemull requested a review from ajrbyers July 15, 2024 08:21
@joemull joemull assigned ajrbyers and unassigned joemull Jul 15, 2024

@ajrbyers ajrbyers 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.

🎖️

@ajrbyers ajrbyers assigned mauromsl and unassigned ajrbyers Jul 23, 2024

@mauromsl mauromsl 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.

thanks @joemull, I quite like this single view. As mentioned by @ajrbyers, this view would benefit from some added interactivity with HTMX, since we are loosing some dynamic behaviour we currently have in search (datatables) and role management (ajax). Hopefully one step back and two steps forward in that regard.

Comment thread src/core/forms/forms.py Outdated
Comment thread src/core/views.py Outdated
Comment thread src/core/views.py Outdated
Comment thread src/templates/admin/core/manager/users/list.html Outdated
Comment thread src/templates/admin/elements/add_role_dropdown.html Outdated
Comment thread src/templates/admin/elements/removable_role_chips.html Outdated
@mauromsl mauromsl assigned ajrbyers and joemull and unassigned ajrbyers Aug 6, 2024
@mauromsl mauromsl removed their assignment Aug 6, 2024
@joemull joemull force-pushed the 4185-general-user-list branch from 5d933a2 to e1be350 Compare August 19, 2024 12:41
@joemull

joemull commented Aug 19, 2024

Copy link
Copy Markdown
Member Author

Thanks @mauromsl -- I've taken these comments on board.

It now looks a little different:

Editor's journal-level view
Image

Super user's press-level view
image

Mobile
image
image

@joemull joemull requested a review from mauromsl August 19, 2024 13:29
@joemull joemull assigned mauromsl and unassigned joemull Aug 19, 2024

@mauromsl mauromsl 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.

Awesome! love the new changes!

@mauromsl mauromsl merged commit d097366 into master Aug 22, 2024
@mauromsl mauromsl deleted the 4185-general-user-list branch August 22, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants