DEV: Improve method of presenting link clicks (#29453)

Currently the tracking for clicked links are injected into the HTML in a span tag. This leads to the link counter value being highlighted when copying and pasting. Additionally, any means for using CSS to hide link counters result in a gap due to it occupying a specific width.

With this change, we make link counters appear in a data attribute on the link element and visually shown with CSS `::after` element.
This commit is contained in:
Keegan George
2024-11-01 04:44:08 +09:00
committed by GitHub
parent 927054b01e
commit 71f808dea9
15 changed files with 82 additions and 59 deletions

View File

@@ -3766,6 +3766,9 @@ en:
one: "view %{count} hidden reply"
other: "view %{count} hidden replies"
sr_reply_to: "Reply to post #%{post_number} by @%{username}"
link_clicked:
one: "link clicked %{count} time"
other: "link clicked %{count} times"
notice:
new_user: "This is the first time %{user} has posted — lets welcome them to our community!"