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
pr-checks-header
- New feature
#7160
Conversation
/* Ensure the CI details dropdown always opens to the right */ | ||
.gh-header-title .commit-build-statuses .dropdown-menu { | ||
left: 100%; | ||
right: auto; | ||
margin: 24px 0 0 8px; | ||
} |
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.
Opening the dropdown on the right seems like the safer option, but it will still get clipped if the window is narrow and PR title ends all the way to the right.
Idk if GitHub has "automatic" dropdowns that open on the correct side, I haven't found anything in their style guide.
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 then it should be positioned elsewhere, not next to the title. See #4086 (comment)
/* | ||
|
||
Test URLs: |
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.
Seems useless to have to duplicate test URLs in the feature CSS file, is this intended?
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 is not enforced at the moment, the tester currently specifies *.tsx
only, so they should be dropped.
|
||
$('#partial-discussion-header')!.classList.add('rgh-pr-ci-link-added'); | ||
|
||
const ciLinkCommitSha = /[a-f\d]{40}/.exec(iconWrapper.dataset.url!)![0]; |
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.
Use the commit OID to check if the CI link needs updating. Sometimes it's an URL parameter, sometimes it's in the pathname.
include: [ | ||
pageDetect.isPR, | ||
], | ||
init: initPR, |
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's zero overlap here, worth extracting ci-link-pr
? or pr-checks-header
?
const ciLinkIsInDom = pageDetect.isPRConversation() || pageDetect.isPRCommitList(); | ||
|
||
if (ciLinkIsInDom) { | ||
observe(':is(#discussion_bucket, #commits_bucket) .commit-build-statuses summary', addPRIcon, {signal}); |
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.
Note that this will trigger for each and every check
ed-commit on the page. You might just want to use awaitDomReady
and lastElement
instead, even if it's slightly longer.
However I'd probably just skip this and always use fetchAndAddPrIcon
for simplicity.
/* | ||
|
||
Test URLs: |
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 is not enforced at the moment, the tester currently specifies *.tsx
only, so they should be dropped.
/* Ensure the CI details dropdown always opens to the right */ | ||
.gh-header-title .commit-build-statuses .dropdown-menu { | ||
left: 100%; | ||
right: auto; | ||
margin: 24px 0 0 8px; | ||
} |
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 then it should be positioned elsewhere, not next to the title. See #4086 (comment)
Resolves #4086
Test URLs
Additional tests:
Screenshots
Conversation tab
Commits tab
Files tab