Repository navigation
Mute visited conversation links on conversation lists - #5258
Conversation
|
Let me further explain the motivation behind this. This PR is inspired by an feature seen on v2ex.com, where links to posts have the count of comments as their hashes (e.g. a post with 42 comments will have The result is that when you visit a post, the link will be dimmed. But if there is any new comment, the comment number will change, so does the hash. The @cheap-glitch I see you voted down this. Are you concerned that more and more links will be muted as the user visits the conversations, making the feature less useful and more annoying? My intention would be that the different colors will serve as a indicator of whether you have read a conversation or not, and whether there's any new activity after you read them, without the hassle of subscriptions. I will implement the exact feature later, but here's a gist: for (const row of document.querySelectorAll('.js-issue-row')) {
const count = row.querySelector('.octicon-comment + .text-small')?.textContent
if (count) {
row.querySelector('.h4').hash = 'rgh-comment-count-' + count
}
}As for the name of the feature: |
|
Duplicate of #1206 😃 |
|
@kidonng you know your on the right track if the king tried this too 😛 |
Yes basically. But with the hash technique it might be interesting, although it still won't react to events other than comments (e.g. an approving review). Still, I'm curious to try it and see how it plays in practice. |
🤯 I DIDN'T EXPECT THAT! I feel so lashed out. But the idea is more than some simple CSS declarations, see my previous comment. The implementation will be only a few lines at most so it's not something that does little with much efforts.
I'm glad you (sort of) approve the idea at last. Technically we could put anything into the hash, including open/close state, approvals etc. |
lol slow down, it was rejected by the land owner
I don’t think it's worth it, after all you did not open that specific/important linked comment, so it's worth to follow the browser’s logic here. This PR is ok for me obviously, but let's see 😅 |
That's an artificial hash, not the actual hash to some comment (and there's no way to get that info on the conversation list, which is the only place the feature would run). |
Previous selector doesn't work on `isGlobalConversationList`
fregante
left a comment
There was a problem hiding this comment.
I still don't think the extra JS is worth it, especially because that's not the default browser behavior.
Fine, I will revert but the implementation (3925514) will stay in this PR's history, in case someone it's interested in the future. |
|
If it stays CSS-only then I'm -1 on this. I don't really see the point, it doesn't convey any meaningful information apart from "I opened this discussion at least once at some point". I may be missing something but I can't see why that'd be useful to know, except maybe when going through old conversations that aren't updated anymore. And yes, I know it can easily be disabled via custom CSS, but imho it doesn't make sense as a default in the first place. |
|
So... we both have our stands. I have been using the styles for some time, as a person who often digs into many conversations, and find it helpful while unlikely to be annoying. Don't get me wrong, I still love hash idea and will try making it a user script. It seems there's going to be a release recently so let's merge this and see. After all it's just a single CSS rule, very easy to override locally or via hotfix. |
Note: because of #4731, the override selector needs to be something like: .js-issue-row .h4.h4:visited:not(:hover) {
color: var(--color-fg-default) !important;
} |
When CSS resets became popular,
:visitedwas one of the useful browser's native styles that got doomed.This PR brings back
:visitedstyle to conversation links on conversation lists by using a muted color. It helps people recognize whether you have went through a conversation or not.Note:
:visitedstyle can already be seen on Discussions (e.g. https://github.com/fish-shell/fish-shell/discussions). Not sure if it's a feature or GitHub just forgot to style them though.Test URLs
https://github.com/fish-shell/fish-shell/pulls
Screenshot