Repository navigation
sticky-comment-header - New feature
#8544
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
Closed
SunsetTechuila
wants to merge
24
commits into
refined-github:main
from
SunsetTechuila:sticky-comment-header
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
52b8f65
`sticky-comment-header` - New feature
SunsetTechuila f5df164
fix file extension
SunsetTechuila 8e25a41
finalize
SunsetTechuila 394dcba
Add CSS property to sticky comment header feature
SunsetTechuila 1d6708b
format with biome
SunsetTechuila aba4c85
add test url
SunsetTechuila 3b7e21d
test urls
SunsetTechuila c1331d3
add comments
SunsetTechuila 9725e44
make menu sticky with css anchor props
SunsetTechuila e68bb77
fix pr comment menus being clipped
SunsetTechuila bc5a351
format
SunsetTechuila ec2ce58
target specific menus
SunsetTechuila b4660ed
fix menus going under the next header
SunsetTechuila 1e73d1f
update issue description header selector
SunsetTechuila fc3a7e8
update issue description header selector 2
SunsetTechuila a414a49
update styles
SunsetTechuila 7b1527a
update comments for issue and PR body header selectors
SunsetTechuila 2cbc763
use `sticky-comment-header` to mark user's own comments
SunsetTechuila 5a2c824
use fuchsia as a fallback
SunsetTechuila a3b223a
remove outdated comment
SunsetTechuila 1697302
correct selector comment
SunsetTechuila 99d4289
`rgh-user-own-comment` -> `rgh-viewer-did-author`
SunsetTechuila 04b5ad6
sync feature descriptions
SunsetTechuila b041a2d
inline `background` css variable
SunsetTechuila File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| html:not([rgh-OFF-sticky-comment-header]) { | ||
| /* Issue body header */ | ||
| [class^="IssueBodyHeader-module__IssueBodyHeaderContainer"], | ||
| /* Issue comment header */ | ||
| [data-testid='comment-header'], | ||
| /* PR body/comment header */ | ||
| .timeline-comment-header { | ||
| position: sticky; | ||
| top: calc(var(--base-sticky-header-height, 0px) + 56px); | ||
| z-index: 1; | ||
| } | ||
|
|
||
| /* Added by `show-names` */ | ||
| .rgh-viewer-did-author, | ||
| .timeline-comment.current-user .timeline-comment-header, | ||
| [class*="IssueBodyHeader-module__viewerDidAuthor"] { | ||
| background: linear-gradient(var(--bgColor-accent-muted, fuchsia)), var(--rgh-background) !important; | ||
|
SunsetTechuila marked this conversation as resolved.
Resolved
|
||
| } | ||
|
|
||
| /* Show menus on top of headers */ | ||
| .js-timeline-item:has(details:open) .timeline-comment-header { | ||
| z-index: 2; | ||
| } | ||
|
SunsetTechuila marked this conversation as resolved.
Resolved
|
||
|
|
||
| [class^="IssueBodyHeader-module__IssueBodyHeaderContainer"], | ||
| [data-testid="comment-header"] { | ||
| border-radius: 0; | ||
| } | ||
|
|
||
| /* Issue body container */ | ||
| [data-testid="issue-body"] [class^="Box"]:has(> #issue-body-viewer), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kovsu it feels like we just dropped a selector just like this (box:has) because it was causing perf issues. |
||
| /* Issue comment container */ | ||
| [class^="IssueCommentViewer-module__IssueCommentContent"] { | ||
| border-radius: var(--borderRadius-medium); | ||
| overflow: clip; | ||
| } | ||
|
|
||
| @supports (anchor-name: --test) { | ||
| [app-name="issues-react"] { | ||
| [class*="ActivityHeader-module__activityHeader"] | ||
| button[aria-haspopup="true"][aria-expanded="true"] { | ||
| anchor-name: --header; | ||
| } | ||
|
|
||
| [class^="prc-Overlay-Overlay"][data-variant="anchored"]:has( | ||
| .octicon-quote, | ||
| [class*="scrollableEditHistoryList"] | ||
| ) { | ||
| position: fixed !important; | ||
| position-anchor: --header; | ||
| top: anchor(bottom) !important; | ||
| } | ||
| } | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import './sticky-comment-header.css'; | ||
|
|
||
| import features from '../feature-manager.js'; | ||
|
|
||
| void features.addCssFeature(import.meta.url); | ||
|
SunsetTechuila marked this conversation as resolved.
Resolved
|
||
|
|
||
| /* | ||
|
|
||
| Test URLs: | ||
|
|
||
| https://github.com/refined-github/sandbox/issues/117 | ||
| https://github.com/refined-github/sandbox/pull/118 | ||
|
|
||
| */ | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.