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

[Admin] Display last_sign_in_at in users admin, change default scope #5850

Conversation

MadelineCollier
Copy link
Contributor

Summary

These are a few smaller pieces which can be broken off of the larger work against issue: #5824

If there is a reason for why the default scope was "Customers" instead of "All" then I am happy to remove that change, but if not I think it's a good one.

Screenshots

This shows the updated "All" default scope and the new "Last active" column.

Screenshot 2024-09-09 at 5 09 30 PM Screenshot 2024-09-09 at 5 06 50 PM

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

I feel pretty strongly that the default scope should be "all" instead of
"customers". That way, when presented with a long list the first thought
is to filter it, instead of the first thought being "why is this user
missing" and then realizing that it's because it's filtering by users
with the "customer" role only.
The new users admin interface now shows the last sign in date instead of
the date the user was created. It will range between "Never", "Less than
a minute ago", "3 days ago", "2 months ago" etc. It uses the built-in
logic provided by `ActionView::Helpers::DateHelper#time_ago_in_words`.

The specs are a bit tricky and stubby due to the need to keep them
general and agnostic of whatever is being used for the
`Spree.user_class`.
@MadelineCollier MadelineCollier requested a review from a team as a code owner September 9, 2024 15:14
@github-actions github-actions bot added changelog:solidus_core Changes to the solidus_core gem changelog:solidus_admin labels Sep 9, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.17%. Comparing base (d81043a) to head (3bb092e).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5850   +/-   ##
=======================================
  Coverage   89.17%   89.17%           
=======================================
  Files         749      749           
  Lines       17395    17399    +4     
=======================================
+ Hits        15512    15516    +4     
  Misses       1883     1883           

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

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

👌

@MadelineCollier MadelineCollier merged commit a791a5f into solidusio:main Sep 10, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants