Skip to content

A platform for community discussion. Free, open, simple.

UX: Welcome topic CTA adjustments (#18168)

Jordan Vidrinea766bf88183b
diff --git a/app/assets/javascripts/discourse/app/templates/components/welcome-topic-banner.hbs b/app/assets/javascripts/discourse/app/templates/components/welcome-topic-banner.hbs
index f5a577a8663..21006247183 100644
--- a/app/assets/javascripts/discourse/app/templates/components/welcome-topic-banner.hbs
+++ b/app/assets/javascripts/discourse/app/templates/components/welcome-topic-banner.hbs
@@ -1,9 +1,7 @@
-<div class="welcome-topic-banner">
- <div class="col-text">
- <h1 class="title">{{i18n "welcome_topic_banner.title"}}</h1>
- <p class="description">{{i18n "welcome_topic_banner.description"}}</p>
- </div>
- <div class="col-button">
- <DButton @class="btn-primary welcome-topic-cta" @action={{action "editWelcomeTopic"}} @label="welcome_topic_banner.button_title" />
+<div class="welcome-cta">
+ <div class="welcome-cta__content">
+ <h1 class="welcome-cta__title">{{i18n "welcome_topic_banner.title"}}</h1>
+ <p class="welcome-cta__description">{{i18n "welcome_topic_banner.description"}}</p>
</div>
+ <DButton @class="btn-primary welcome-cta__button" @action={{action "editWelcomeTopic"}} @label="welcome_topic_banner.button_title" />
</div>
diff --git a/app/assets/javascripts/discourse/tests/acceptance/welcome-topic-banner-test.js b/app/assets/javascripts/discourse/tests/acceptance/welcome-topic-banner-test.js
index 2e7ee79a01a..273b85ecf05 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/welcome-topic-banner-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/welcome-topic-banner-test.js
@@ -8,9 +8,9 @@ acceptance("Welcome Topic Banner", function (needs) {
test("Navigation", async function (assert) {
await visit("/");
- assert.ok(exists(".welcome-topic-banner"), "has the welcome topic banner");
+ assert.ok(exists(".welcome-cta"), "has the welcome topic banner");
assert.ok(
- exists("button.welcome-topic-cta"),
+ exists("button.welcome-cta__button"),
"has the welcome topic edit button"
);
});
diff --git a/app/assets/stylesheets/desktop/topic-list.scss b/app/assets/stylesheets/desktop/topic-list.scss
index f01fc737bc9..8587b1b278c 100644
--- a/app/assets/stylesheets/desktop/topic-list.scss
+++ b/app/assets/stylesheets/desktop/topic-list.scss
@@ -250,21 +250,26 @@
}
}
-.welcome-topic-banner {
- border: 1px solid var(--primary-low);
+.container.list-container {
+ position: relative;
+}
+
+.welcome-cta {
+ background-color: var(--secondary);
+ border: 1px solid var(--primary-low-mid);
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.12);
- padding: 10px;
+ padding: 12px 20px;
display: flex;
flex-direction: row;
-
- .col-text {
+ justify-content: space-between;
+ position: absolute;
+ top: 44px;
+ width: calc(100% - 40px);
+ z-index: z("usercard");
+ &__content {
width: 70%;
}
- .col-button {
- width: 30%;
- display: flex;
+ &__button {
align-self: center;
- justify-content: flex-end;
- padding-right: 30px;
}
}