-
Notifications
You must be signed in to change notification settings - Fork 438
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
Make it possible to identify the page author's comments #844
Conversation
I'm trying to think of the best way to handle it. One way could be to just make it the job of the website owner to add their own CSS that styles the element based on the |
Related: #321, a previous attempt, sadly abandoned by the original author. |
Hi, thanks for your work. I'll review the merits of this later, just in the meantime, please try to keep the level of messages down a bit. You can edit your original message by clicking the three-dot button on the top right corner instead of writing a stream-of-consciousness barrage, which will make it quite hard for people to quickly decipher the core points later on. Your commits should be squashed (or at least split into logical units) and should also mention the name of the component they're touching. See #805 (review) or #831 (comment) |
da4a0a4
to
0b64ba1
Compare
Ok, I fixed that now, check the main description for the pull request. Also is this commit message okay?
I feel like it would be weird to split the CSS and JS changes apart since they both require eachother for the feature to work correctly. |
Re: commits and splitting:
You can split the commits, most logical would be one commit for each component or for one coherent/atomic change, e.g. the CSS modifications. What I meant is that you need to get rid of something that looks like:
This is hard to review. Especially a lot of "Fix X" and then "Fix Y" stuff. I hope you understand what I mean. For instance, you introduced a Just structure the commits like you structured the headlines in the (now edited and much more clear) original post. |
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.
Please document the new option extensively and add a well-written CHANGES
entry.
Would also be nice to have screenshots of the thing in action with the default colors, not your dark theme.
EDIT: Also, there should be an explanation how to derive the hash and what it means. Also, hash
= singular, but you make it so Isso accepts a list. Should be hashes
instead then.
77f5bd9
to
d8eacf7
Compare
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.
Thanks for tackling this again!
Just so that you don't forget: There should be an explanation how to derive the hash and what the hash means.
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.
Some small things still to fix, but all in all, looking good.
Also related: #261
- Makes it so setting the background of this element will cover the entire comment's background.
Merged. Thank you for so diligently applying my feedback, @BBaoVanC ! |
Fixes #82
TODO
Summary of changes
data-isso-page-author-hashes
field in the<script>
tag; this can include multiple hashes..isso-text-wrapper
take up the comment's size.isso-follow-up
div outside of.isso-text-wrapper
Screenshot at the bottom of this description.
Moving
.isso-follow-up
I moved the
.isso-follow-up
div to be outside of.isso-text-wrapper
(so it is instead a direct child of.isso-comment
). Then I gave the background color to the.isso-text-wrapper
. Without this change, if someone else replies to a comment by the page author, their comment still has the background. This is because the.isso-text-wrapper
div would be as big as the parent comment plus the follow-up ones, and the follow-up comments have a transparent background (instead of explicitly setting one).I couldn't think of any better solution.
Luckily this change only required changing a couple lines in
isso.js
so it would properly match the new location.Configuring
Configure by setting the
data-isso-page-author-hashes
variable to the hash of the user (or a list of them) that should be highlighted. If providing multiple, separate them with a comma, space, or both.For example, these all work (I made up the hashes though):
data-isso-page-author-hashes="86g7n8g67nm,8m787mg8"
data-isso-page-author-hashes="86g7n8g67nm 8m787mg8"
data-isso-page-author-hashes="86g7n8g67nm, 8m787mg8"
This is parsed using code from this article.
Screenshot with the theming shown in docs: