UX: `no-text` style being incorrectly added to tag suggester (#987)
In the tag suggester menu we use `DButton` as a wrapper element and use the `discourseTag` helper to render the text inside the element. So visually there is text content inside the button. However, since `DButton` assumes that no `label`/`translatedLabel` inside an element means `.no-text` CSS style should be applied to the button's element, it was resulting in some incorrect styling being applied to this menu. This PR resolves that by programmatically adding the tag as a `translatedLabel` and then visually hiding it with CSS.
This commit is contained in:
parent
c53363406d
commit
50ad5415ff
|
@ -198,6 +198,7 @@ export default class AiTagSuggester extends Component {
|
|||
data-name={{suggestion.name}}
|
||||
data-value={{index}}
|
||||
title={{suggestion.name}}
|
||||
@translatedLabel={{suggestion.name}}
|
||||
@disabled={{this.isDisabled suggestion}}
|
||||
@action={{fn this.applySuggestion suggestion}}
|
||||
>
|
||||
|
|
|
@ -266,6 +266,10 @@
|
|||
.discourse-tag-count {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.d-button-label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue