-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Restore hidden-review-comments-indicator
#5950
Restore hidden-review-comments-indicator
#5950
Conversation
@@ -30,7 +30,7 @@ | |||
|
|||
.rgh-comments-indicator button { | |||
position: absolute; | |||
right: 100%; | |||
right: 90%; |
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.
Why? Does it work with double-digit comments?
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's ok
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.
The Comments icon too close to the screen border in 1800px with 100%
imo, but let me change it :)
@@ -8,7 +8,7 @@ | |||
|
|||
.rgh-comments-indicator:is(::before, ::after) { | |||
content: '' !important; /* Needs to override .blob-num’s */ | |||
position: absolute; | |||
position: absolute !important; /* Needs to override .blob-num’s */ |
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 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.
The class is working, but I'm not so sure about the selector, let me do some testing :)
hidden-review-comments-indicator
is broken
hidden-review-comments-indicator
is brokenhidden-review-comments-indicator
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.
We try to keep the amount of code to a minimum. The previous "complex CSS" worked without changes to the DOM. I'd prefer to keep it that way |
@@ -1,4 +1,4 @@ | |||
.rgh-comments-indicator { | |||
:root .rgh-comments-indicator { |
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.
This was the only fix required to make the button visible again.
The reason why the line isn't being shown is because GitHub now uses ::before
to show the actual line, so our code fighting with GitHub’s own style.
An easier solution would be to either:
- only use ::after, which doesn't seem to be used by GitHub
- ensure that all the CSS actually applies OR figure out why it doesn't
I undid the previous changes because I don’t think they were going in the right direction for the most part. I'd be ok merging this as is for now and the line can be restored later.
Rather, this single line is good enough for now and if you can't fix the rest autonomously I'd have to fix it myself, which defeats the purpose of PRs
@@ -29,7 +22,7 @@ | |||
|
|||
.rgh-comments-indicator button { | |||
position: absolute; | |||
right: 95%; | |||
left: -40px; |
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.
left: -40px
only works for the specific icon size, font size and character count.
right: 100%
is the correct alignment and it works with any amount of text in this button.
The only problem lies in the button’s content itself, which seems to have excessive padding (which exists to expand its clickable area, but it should be counteracted by negative margins)
Also there's an additional issue with the available space overall for this piece of UI. For example if there's the new file drawer open, perhaps we cannot show a comment count at all.
hidden-review-comments-indicator
is missing the indicator line #5897Test URLs
https://github.com/refined-github/sandbox/pull/18/files
Screenshot
Description
Class
.blob-num
was overwriting plugin's css, added!important
to fix the issue.Counter was not working, it was using the wrong selector