ONEARMY / community-platform

A platform to build useful communities that aim to tackle global problems
https://platform.onearmy.earth
MIT License
1.14k stars 386 forks source link

Admin Panel: Create all Users page #1508

Closed franknoirot closed 1 year ago

franknoirot commented 2 years ago

Description

Part of the larger effort to create an Admin Panel to allow admin users to manage content from within the platform itself. Overarching issue to come.

Fill the /admin/users page's content and style it to match the designs.

Acceptance Criteria Checklist:

Mockups

Visit the Figma space where the mockups are hosted to fully inspect them. Comments and questions about them can be added by pressing C and clicking where you want to pin a discussion, tag @franknoirot or @davehakkens within.

Here is the relevant desktop design as of 28/02/22. The browse all Users page, with one of the filter menus expanded: Users Browse

Build Recommendations

Kiebert commented 1 year ago

Hi @franknoirot. Can you assign me to this story?

davehakkens commented 1 year ago

This one is already in draft PR for a while @Kiebert : https://github.com/ONEARMY/community-platform/pull/1837 It's a complex one. You want to finish it?

Kiebert commented 1 year ago

@davehakkens Good to know that there is a branch/PR already. I will have a look at the code to see if I can work with that. If it is too complex for my brain I will let you know.

Kiebert commented 1 year ago

I did a quickscan of the users overview page and code. Added a screenshot. I think most of the functionality is present. The branch needed to be updated with all the new master code. One 'TODO' added by the former developer is still open: optimalization of the users database query. I will have to try if I can make this more efficient.

For what I could spot the Figma mockup and the current styling differ on the following:

@davehakkens Do you want to keep the pagination?

And in the mockup there is a 'Status' column: in the current page this is 'Badges': do you know more about this change of plan?

Things I did on my repository:

admin_users_table

davehakkens commented 1 year ago

hey @Kiebert thanks for looking into it! A pagination element is added: I think this a good choice; Agree Color of the 'User name' is different; Not a big problem for release, but feel free to change :) Filter when activated has no 'border line'; Also not a big problem for first release.

And in the mockup there is a 'Status' column: in the current page this is 'Badges' I think this is related to align with how we call them in the backend, would keep it like this

But let me actually ask Chris if he has any comments since he worked on it, will continue here https://github.com/ONEARMY/community-platform/pull/1837#issuecomment-1274571407

Kiebert commented 1 year ago

Hey @davehakkens
The simple design things (color of the user name and activated filter border line) are done. And I merged the latest master version in this branch.

Currently I do not see a problem with the way the database query is done. It now loads all available users into the grid in one go. That seems to work fine with around 10.000 of users.

I assume if the users amount increases to around 100.000 users then you will probably need to chop up the data retrieval in separate chunks.

I created a PR to merge my additions to the branch 'feat/admin-users' branch: https://github.com/ONEARMY/community-platform/pull/1987

Let me know if something needs an update...