ui: do not use links for trophies without href#19335
Merged
ornicar merged 4 commits intolichess-org:masterfrom Feb 8, 2026
Merged
ui: do not use links for trophies without href#19335ornicar merged 4 commits intolichess-org:masterfrom
ornicar merged 4 commits intolichess-org:masterfrom
Conversation
Contributor
Author
|
Hmm, after looking at players profile on PROD this issue might be exaggerated locally, by seeded data. Looks like only "Verified account" trophy is a problem on actual live deployment. LMK how do you want me to proceed, I can simplify the PR and only apply the check for verified thorny inline, or just drop the idea and only retain the small SCSS change. |
Collaborator
|
from your video preview (thanks for these <3) it looks like marathon trophies are not links? but they should be https://lichess.org/@/Gakolchess765 |
Contributor
Author
|
Yup, it's the flaw of locally seeded data. Did not realized it earlier, only right after push, when I visited several profiles on PROD. |
mayLink only needs one argument, and is a one-liner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Spotted that all trophies are rendered as links (
a), but not all of them have an URL set. Having empty links causes the incorrect cursor on hover and is an a11y issue.How
Introduce
maybeLinkhelper inUserBits, alter trophies render with optional URL to use the helper instead hardcodedatag. Ensure correct cursor on hover by disabling user selection (since some trophies are custom font characters).Preview
Kapture.2026-02-06.at.18.59.12.mp4