Skip to content

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

FIX: Topic Notifications User Tip wasn't properly anchored (#36356)

Régis Hanol65c127841e50
diff --git a/frontend/discourse/app/components/topic-footer-buttons.gjs b/frontend/discourse/app/components/topic-footer-buttons.gjs
index 072b4161d69..aa71a25b0dc 100644
--- a/frontend/discourse/app/components/topic-footer-buttons.gjs
+++ b/frontend/discourse/app/components/topic-footer-buttons.gjs
@@ -285,7 +285,7 @@ export default class TopicFooterButtons extends Component {
{{#if this.showNotificationUserTip}}
<UserTip
@id="topic_notification_levels"
- @triggerSelector=".notifications-button-footer details"
+ @triggerSelector=".notifications-button-footer [data-identifier='notifications-tracking']"
@titleText={{i18n "user_tips.topic_notification_levels.title"}}
@contentText={{i18n "user_tips.topic_notification_levels.content"}}
@priority={{800}}
diff --git a/frontend/discourse/tests/acceptance/user-tips-test.js b/frontend/discourse/tests/acceptance/user-tips-test.js
index 9e0391524f8..a3d80fa83d7 100644
--- a/frontend/discourse/tests/acceptance/user-tips-test.js
+++ b/frontend/discourse/tests/acceptance/user-tips-test.js
@@ -70,6 +70,14 @@ acceptance("User Tips - topic_notification_levels", function (needs) {
await visit("/t/internationalization-localization/280");
+ assert
+ .dom(
+ ".notifications-button-footer [data-identifier='notifications-tracking']"
+ )
+ .exists(
+ "the notifications tracking trigger element exists for the user tip to attach to"
+ );
+
assert
.dom(".user-tip__title")
.hasText(i18n("user_tips.topic_notification_levels.title"));