-
- {{avatar @user imageSize="large"}}
-
-
+{{#if this.includeAvatar}}
+
+
- {{/if}}
-
-
+
+{{/if}}
+
+
-
{{@user.title}}
- {{#if (has-block)}}
-
- {{yield}}
-
{{/if}}
-
-
-
+ {{#if (and @showStatus @user.status)}}
+
+ {{/if}}
-
+
+
{{@user.title}}
+ {{#if (has-block)}}
+
+ {{yield}}
+
+ {{/if}}
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/tests/integration/components/user-info-test.js b/app/assets/javascripts/discourse/tests/integration/components/user-info-test.js
index c0c0a2c4123..caaf678e009 100644
--- a/app/assets/javascripts/discourse/tests/integration/components/user-info-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/components/user-info-test.js
@@ -33,10 +33,12 @@ module("Integration | Component | user-info", function (hooks) {
);
this.set("includeLink", true);
- assert.ok(exists(`a[href="/u/${this.currentUser.username}"]`));
+ assert.ok(exists(`.name-line a[href="/u/${this.currentUser.username}"]`));
this.set("includeLink", false);
- assert.notOk(exists(`a[href="/u/${this.currentUser.username}"]`));
+ assert.notOk(
+ exists(`.name-line a[href="/u/${this.currentUser.username}"]`)
+ );
});
test("includeAvatar", async function (assert) {
diff --git a/app/assets/stylesheets/common/components/user-info.scss b/app/assets/stylesheets/common/components/user-info.scss
index 61fbf1bbc68..b86acbad83a 100644
--- a/app/assets/stylesheets/common/components/user-info.scss
+++ b/app/assets/stylesheets/common/components/user-info.scss
@@ -1,10 +1,7 @@
// Common styles for "user-info" component
.user-info {
- > a {
- display: flex;
- gap: 1em;
- min-width: 0;
- }
+ display: flex;
+ gap: 1em;
.user-image-inner {
position: relative;
@@ -13,21 +10,22 @@
.user-detail {
min-width: 0;
- @include breakpoint(tablet) {
+ @include breakpoint(mobile-medium) {
font-size: var(--font-down-1);
}
.name-line {
- display: flex;
- gap: 0.5em;
- color: var(--primary-high);
+ > a {
+ display: flex;
+ gap: 0.5em;
+ color: var(--primary-high);
+ }
.name,
.username {
@include ellipsis;
}
span:first-child {
- flex: 0 0 auto;
font-weight: bold;
}
}
@@ -40,7 +38,6 @@
}
.title {
- margin-top: 0.25em;
color: var(--primary-medium);
}
}