-
-
Notifications
You must be signed in to change notification settings - Fork 840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] [mentions] feat: tag mentions #3688
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tag.setAttribute('icon', tagModel.icon()); | ||
tag.setAttribute('color', tagModel.color()); | ||
tag.setAttribute('slug', tagModel.slug()); | ||
tag.setAttribute('class', isDark(tagModel.color()) ? 'TagMention--light' : 'TagMention--dark'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a little confusion here, it should be the contrary :)
Cf. #3653
tag.setAttribute('class', isDark(tagModel.color()) ? 'TagMention--light' : 'TagMention--dark'); | |
tag.setAttribute('class', isDark(tagModel.color()) ? 'TagMention--dark' : 'TagMention--light'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In actual usage, I've found the opposite. See my dev forum for a live version of this..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's working perfectly well, this is not a dev problem I suppose. ✌️
What I meant is just that the semantical logic of isDark
usage is (according to me) to ask is this a dark color ?
, and if it's true
, to apply the text-on-dark
rule. Adding a --light
suffix for a dark element class (or the opposite) sounds counterintuitive IMHO. This could lead to an issue of consistency about the usage of this isDark
utility across the project
But maybe there is something I don't understand in your case, I'll try to test your branch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be simpler to think about all this with #3653 merged. We could then try to find a homogeneous and common way of operating with those contrast issues :)
@@ -117,22 +117,30 @@ | |||
&, | |||
&:hover, | |||
&:active { | |||
color: @text-on-light; | |||
color: @text-on-dark; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
following my previous comment
color: @text-on-dark; | |
color: @text-on-light; |
} | ||
} | ||
|
||
&--dark { | ||
&, | ||
&:hover, | ||
&:active { | ||
color: @text-on-dark; | ||
color: @text-on-light; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and so on
color: @text-on-light; | |
color: @text-on-dark; |
See #3769 |
Implements Bounty proposal
Fixes: #3693
TODO:
[ ] #3620 Modify tag changed eventposts to mention the tags
[ ] Major cleanup
[ ] Add backend tests
Changes proposed in this pull request:
getMentionText
in favour of a newMentionTextGenerator
Reviewers should focus on:
Screenshot
![image](https://user-images.githubusercontent.com/16573496/203093292-81a7e59a-c923-4b02-8fed-fa34c76bf9a1.png)
Early version (will likely change a few times yet)
Necessity
Confirmed
composer test
).Required changes: