DEV: Fix issues with "admin guide" tip (#26520)

- Adjusts placement
- Closes the tip when the user clicks on a link in the tip description
This commit is contained in:
Penar Musaraj 2024-04-04 12:50:08 -04:00 committed by GitHub
parent 377d2ca3ad
commit e7c6100d9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -12,6 +12,7 @@
@titleText={{i18n "user_tips.admin_guide.title"}}
@contentHtml={{this.userTipContent}}
@showSkipButton={{true}}
@triggerSelector=".d-header-mode"
/>
{{/if}}
</DButton>

View File

@ -1,4 +1,5 @@
import Component from "@glimmer/component";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
@ -29,10 +30,19 @@ export default class UserTipContainer extends Component {
this.userTips.skipTips();
}
@action
onClick(e) {
if (e.target.nodeName === "A") {
// Close tip if user clicks on a link in its description
this.args.close();
}
}
<template>
<div class="user-tip__container">
<div class="user-tip__title">{{@data.titleText}}</div>
<div class="user-tip__content">
{{! template-lint-disable no-invalid-interactive }}
<div class="user-tip__content" {{on "click" this.onClick}}>
{{#if @data.contentHtml}}
{{this.safeHtmlContent}}
{{else}}