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

Add user list page #965

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Add user list page #965

merged 3 commits into from
Feb 6, 2025

Conversation

oliver3
Copy link
Contributor

@oliver3 oliver3 commented Feb 5, 2025

Resolves #915

  • Rename API endpoint list to user_list
  • Add mock data and handler
  • Add user list page and its test

Page can be reached from the /dev page.

@oliver3 oliver3 requested a review from a team as a code owner February 5, 2025 08:36
@oliver3 oliver3 linked an issue Feb 5, 2025 that may be closed by this pull request
@oliver3 oliver3 self-assigned this Feb 5, 2025
@oliver3 oliver3 added the frontend Issues or pull requests that relate to the frontend label Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Sigrid maintainability feedback

✅ You wrote maintainable code and achieved your objective of 3.5 stars

Show details

Sigrid compared your code against the baseline of 2025-02-06.

👍 What went well?

You fixed or improved 0 refactoring candidates.

👎 What could be better?

You did not introduce any technical debt during your changes, great job!

📚 Remaining technical debt

1 refactoring candidates didn't get better or worse, but are still present in the code you touched.

View this system in Sigrid** to explore your technical debt

⭐️ Sigrid ratings

System property System on 2025-02-06 Before changes New/changed code
Volume 5.2 N/A N/A
Duplication 4.3 5.5 5.5
Unit Size 2.4 4.1 4.1
Unit Complexity 3.4 5.4 5.5
Unit Interfacing 3.0 5.4 5.5
Module Coupling 4.0 5.5 5.5
Component Independence 2.8 N/A N/A
Component Entanglement 3.7 N/A N/A
Maintainability 3.6 5.1 5.1

💬 Did you find this feedback helpful?

We would like to know your thoughts to make Sigrid better.
Your username will remain confidential throughout the process.


View this system in Sigrid

jorisleker
jorisleker previously approved these changes Feb 5, 2025
Copy link
Contributor

@jorisleker jorisleker left a comment

Choose a reason for hiding this comment

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

List page looks good to me, with following review remarks:

  • Have not been able to test date formatting in the 'last activity' column
  • Have not been able to verify all user roles are displayed correctly (only 1 user in database)
  • The 'admin' user in the database is an anonymous account, which should be impossible
  • The button to add a user is lacking, but will probably be added when the 'add' feature is implemented?

@oliver3
Copy link
Contributor Author

oliver3 commented Feb 5, 2025

Thanks @jorisleker ! The frontend preview is also deployed and has more users.

The button will indeed be added later, and fair point about the 'admin', I'll add a fullname to make it more representable in a separate PR.

Lionqueen94
Lionqueen94 previously approved these changes Feb 5, 2025
@oliver3 oliver3 added this pull request to the merge queue Feb 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 6, 2025
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 99.01961% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.94%. Comparing base (a2ebdfe) to head (2c8ee92).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
frontend/app/module/users/UserListPage.tsx 97.22% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
+ Coverage   89.80%   89.94%   +0.13%     
==========================================
  Files         238      241       +3     
  Lines       12561    12645      +84     
  Branches     1281     1289       +8     
==========================================
+ Hits        11281    11373      +92     
+ Misses       1191     1183       -8     
  Partials       89       89              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jorisleker
Copy link
Contributor

@oliver3 approved changed test, but now thinking: we should probably say 'yesterday 13:37' if last activity was yesterday, and not the day name. Day name for anything 2-6 days ago is fine. Before that, it should be a full date.

Earlier assumption was that Abacus would only be used during a couple of days, but now we have more insights into the NPVV we know that even for GR2026 it will be used during at least 1 week (GSB and CSB seatings are about 1 week apart)

@oliver3
Copy link
Contributor Author

oliver3 commented Feb 6, 2025

we should probably say 'yesterday 13:37' if last activity was yesterday, and not the day name. Day name for anything 2-6 days ago is fine. Before that, it should be a full date.

Something like this @jorisleker ?

Merged via the queue into main with commit 05b207b Feb 6, 2025
21 checks passed
@oliver3 oliver3 deleted the 915-list-users-page branch February 6, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Issues or pull requests that relate to the frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List users page
3 participants