UX: fix wrapping of topic map links with counter (#31184)

Due to a change with how the link counter renders (as a pseudo element)
the grid layout in the topic map link modal regressed slightly with long
links


before: 

![image](https://github.com/user-attachments/assets/f7ea022c-62f9-44da-a575-4e7f46d31985)


after:
<img
src="https://github.com/user-attachments/assets/1c955593-beae-4795-9d90-9a50fd7646dd"
width="500">
This commit is contained in:
Kris
2025-02-05 08:28:22 -05:00
committed by GitHub
parent 5b5899b543
commit 0da3349513
2 changed files with 16 additions and 7 deletions

View File

@ -31,11 +31,13 @@ export default class TopicMapLink extends Component {
data-clicks={{@clickCount}}
aria-label={{i18n "topic_map.clicks" count=@clickCount}}
>
<span class="content">
{{#if @title}}
{{replaceEmoji this.truncatedContent}}
{{else}}
{{this.truncatedContent}}
{{/if}}
</span>
</a>
{{#if (and @title @rootDomain)}}
<span class="domain">

View File

@ -380,7 +380,7 @@ body:not(.archetype-private_message) {
grid-template-columns: auto 1fr;
grid-template-areas:
"counter link"
". domain";
"counter domain";
padding: 0.75em 1rem;
gap: 0.25em;
@ -396,11 +396,18 @@ body:not(.archetype-private_message) {
}
.topic-link {
display: contents;
.content {
grid-area: link;
}
}
.topic-link[data-clicks]::before {
@include click-counter-badge;
grid-area: counter;
align-self: start;
margin-top: 0.35em;
}
.topic-link[data-clicks]::after {