diff --git a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 b/app/assets/javascripts/discourse/components/user-card-contents.js.es6
index a151cbea636..780ee6fb467 100644
--- a/app/assets/javascripts/discourse/components/user-card-contents.js.es6
+++ b/app/assets/javascripts/discourse/components/user-card-contents.js.es6
@@ -53,7 +53,6 @@ export default Ember.Component.extend(
showCheckEmail: Ember.computed.and("user.staged", "canCheckEmails"),
user: null,
- loading: false,
// If inside a topic
topicPostCount: null,
@@ -151,10 +150,6 @@ export default Ember.Component.extend(
},
_showCallback(username, $target) {
- this._positionCard($target);
- const currentUser = Discourse.__container__.lookup("current-user:main");
- this.setProperties({ visible: true, loading: true, user: currentUser });
-
const args = { stats: false };
args.include_post_count_for = this.get("topic.id");
User.findByUsername(username, args)
@@ -165,7 +160,8 @@ export default Ember.Component.extend(
user.topic_post_count[args.include_post_count_for]
);
}
- this.setProperties({ user, loading: false });
+ this._positionCard($target);
+ this.setProperties({ user, visible: true });
})
.catch(() => this._close())
.finally(() => this.set("loading", null));
diff --git a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
index 302eebbaebb..cf45d786968 100644
--- a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
+++ b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs
@@ -93,21 +93,6 @@
tagName=""}}
- {{#if loading}}
-
-
-
-
- {{/if}}
-
{{#if user.profile_hidden}}
@@ -160,46 +145,44 @@
{{/if}}
- {{#unless loading}}
-
- {{#unless user.profile_hidden}}
-
- {{#if user.last_posted_at}}
-
{{i18n 'last_post'}}
- {{format-date user.last_posted_at leaveAgo="true"}}
- {{/if}}
- {{i18n 'joined'}}
- {{format-date user.created_at leaveAgo="true"}}
- {{#if user.time_read}}
-
- {{i18n 'time_read'}}
- {{format-duration user.time_read}}
- {{#if showRecentTimeRead}}
- ({{i18n 'time_read_recently' time_read=recentTimeRead}})
- {{/if}}
-
- {{/if}}
- {{#if showCheckEmail}}
-
- {{d-icon "far-envelope" title="user.email.title"}}
- {{#if user.email}}
- {{user.email}}
- {{else}}
- {{d-button
- action=(action "checkEmail")
- actionParam=user
- icon="far-envelope"
- label="admin.users.check_email.text"
- class="btn-primary"}}
- {{/if}}
-
- {{/if}}
- {{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
-
- {{/unless}}
- {{plugin-outlet name="user-card-after-metadata" args=(hash user=user)}}
-
- {{/unless}}
+
+ {{#unless user.profile_hidden}}
+
+ {{#if user.last_posted_at}}
+
{{i18n 'last_post'}}
+ {{format-date user.last_posted_at leaveAgo="true"}}
+ {{/if}}
+ {{i18n 'joined'}}
+ {{format-date user.created_at leaveAgo="true"}}
+ {{#if user.time_read}}
+
+ {{i18n 'time_read'}}
+ {{format-duration user.time_read}}
+ {{#if showRecentTimeRead}}
+ ({{i18n 'time_read_recently' time_read=recentTimeRead}})
+ {{/if}}
+
+ {{/if}}
+ {{#if showCheckEmail}}
+
+ {{d-icon "far-envelope" title="user.email.title"}}
+ {{#if user.email}}
+ {{user.email}}
+ {{else}}
+ {{d-button
+ action=(action "checkEmail")
+ actionParam=user
+ icon="far-envelope"
+ label="admin.users.check_email.text"
+ class="btn-primary"}}
+ {{/if}}
+
+ {{/if}}
+ {{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
+
+ {{/unless}}
+ {{plugin-outlet name="user-card-after-metadata" args=(hash user=user)}}
+
{{#if publicUserFields}}
diff --git a/app/assets/stylesheets/common/components/user-card.scss b/app/assets/stylesheets/common/components/user-card.scss
index c1f566ab9c0..6e2a5568aaa 100644
--- a/app/assets/stylesheets/common/components/user-card.scss
+++ b/app/assets/stylesheets/common/components/user-card.scss
@@ -2,27 +2,6 @@ $card_width: 580px;
$avatar_width: 120px;
$avatar_margin: -50px; // negative margin makes avatars extend above cards
-// placeholder
-@keyframes placeHolderShimmer {
- 0% {
- background-position: -468px 0;
- }
- 100% {
- background-position: 468px 0;
- }
-}
-.animated-placeholder {
- animation-duration: 1.25s;
- animation-fill-mode: forwards;
- animation-iteration-count: infinite;
- animation-name: placeHolderShimmer;
- animation-timing-function: linear;
- background: darkgray;
- background: linear-gradient(to right, #eeeeee 10%, #dddddd 18%, #eeeeee 33%);
- height: 20px;
- position: relative;
-}
-
// shared styles for user and group cards
#user-card,
#group-card {