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] Add new users admin order history page #5869

Merged

Conversation

MadelineCollier
Copy link
Contributor

@MadelineCollier MadelineCollier commented Oct 10, 2024

Summary

This PR is for issue #5824.

There is an extra commit from this PR: #5865 which will go away once that is merged this branch is rebased off main. Branch has been merged and rebased :)

This migrates the users/:id/orders page from the legacy soldius_backend to the new solidus_admin.

Screenshots

Legacy admin order history page from solidus_backend:

Screenshot 2024-10-09 at 4 45 54 PM Screenshot 2024-10-09 at 4 45 59 PM

New admin order history page:

Screen.Recording.2024-10-09.at.5.16.01.PM.mov

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.

@kennyadsl
Copy link
Member

Not sure if it's a bug or a feature, but on the order history page, both users and order menu items are highlighted. More likely a bug (already there).

Screenshot 2024-10-10 at 13 36 03@2x

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 94.23077% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.28%. Comparing base (489e527) to head (75aac68).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...components/solidus_admin/users/orders/component.rb 93.02% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5869      +/-   ##
==========================================
- Coverage   92.01%   89.28%   -2.74%     
==========================================
  Files          71      756     +685     
  Lines        1804    17626   +15822     
==========================================
+ Hits         1660    15737   +14077     
- Misses        144     1889    +1745     

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

@MadelineCollier
Copy link
Contributor Author

Not sure if it's a bug or a feature, but on the order history page, both users and order menu items are highlighted. More likely a bug (already there).

Screenshot 2024-10-10 at 13 36 03@2x

Oh interesting, good catch! Definitely a bug, but I'll probably have a look at that in a separate PR as I don't think this one touches the sidebar at all.

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.

Great work!

@kennyadsl
Copy link
Member

Oh interesting, good catch! Definitely a bug, but I'll probably have a look at that in a separate PR as I don't think this one touches the sidebar at all.

Deal, I think it might have to do with the nested routes, but it's perfect to fix this with another PR.

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

I think this waits for #5865 to be merged first, right?

# custom User class which may not have this attribute.
last_login_time: time_ago_in_words(user.try(:last_sign_in_at))
).capitalize
end
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to extract this into a module we can include in all user tabs components? It seems a bit repetitive to have to implement this in all user related components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah definitely, I can extract that as part of the items page if that's alright, working on that one tomorrow.

This migrates the `users/:id/orders` page from the legacy
soldius_backend to the new solidus_admin.
@MadelineCollier MadelineCollier merged commit 7593683 into solidusio:main Oct 14, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants