Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

🔍 Overview

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.

📸 Screenshots

Before:

Example incorrect styling being applied

Screenshot 2024-12-02 at 09 52 30

After:

Example incorrect styling no longer being applied

Screenshot 2024-12-02 at 09 52 18

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.
@keegangeorge keegangeorge merged commit 50ad541 into main Dec 2, 2024
6 checks passed
@keegangeorge keegangeorge deleted the ux-fix-no-text branch December 2, 2024 18:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants