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 avatar to admin site #3454

Open
wants to merge 5 commits into
base: dev
from

Conversation

Projects
None yet
2 participants
@hishamco
Copy link
Contributor

commented Apr 9, 2019

Fixes #2829

@agriffard

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

Hello @hishamco
When you change a .js or .scss file, you need to run the gulp build task (after executing a npm install at the root of the repo) in order to bundle the change in TheAdmin.js.
It might generate more files than needed but yon can discard them.

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

Ya I know that after I worked on rtl admin theme

Thanks

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

This is how it looks like:

Avatar

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

@agriffard seems the Travis failed for something related to GraphQL, so please review the PR

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

Few comments (may be for future):

  • Add Avatar property to User entity
  • Use MD5 at the server (no client-side scripts needed)
  • Cache the avatar while it's not frequently changed
  • Use TagHelper like what I did here before in My.AspNetCore.Mvc.TagHelpers repo
@agriffard

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Travis error:

[xUnit.net 00:00:14.25]     OrchardCore.Tests.Apis.GraphQL.Queries.RecentBlogPostsQueryTests.ShouldListBlogPostWhenCallingAQuery [FAIL]
Failed   OrchardCore.Tests.Apis.GraphQL.Queries.RecentBlogPostsQueryTests.ShouldListBlogPostWhenCallingAQuery
Error Message:
 Assert.Equal() Failure
Expected: 2
Actual:   1
Stack Trace:
   at OrchardCore.Tests.Apis.GraphQL.Queries.RecentBlogPostsQueryTests.ShouldListBlogPostWhenCallingAQuery() in /home/travis/build/OrchardCMS/OrchardCore/test/OrchardCore.Tests/Apis/GraphQL/Queries/RecentBlogPostsQueryTests.cs:line 45

The other PRs don't seem to have this error. We will see next time the PR is changed if it persists.

@agriffard

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

It could also be interesting to have a Liquid filter to generate a Gravatar. See #2829

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented Apr 11, 2019

It could be, but while TheAdmin theme is using Razor, it's better to use TagHelper instead

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

@agriffard where should the liquid filter located? What about my earlier comments?

@agriffard

This comment has been minimized.

Copy link
Member

commented May 2, 2019

There could be a Gravatar module with a Liquid Filter inside (not for your purpose but for another usage in a Liquid Editor) and may be other things like a display editor for a TextField that allows to render the email as its corresponding gravatar.

Can you please fix the conflict by regenerating the script.

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented May 2, 2019

Can you please fix the conflict by regenerating the script.

Sure

@hishamco

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

@agriffard I added a gravatar module, now how can I add the tag helper to the admin site? Shall I reference the module? How can I show the avatar if the module is enabled? May be there's a standard for you guys which I don't know

thanks

@hishamco hishamco force-pushed the hishamco:avatar branch from aff17db to aaddc33 May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.