Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/features/align-issue-labels.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
padding-right: 4px; /* Space before the build status */
}

.rgh-align-issue-labels .js-issue-row .mt-1.text-small.text-gray { /* Issue details line */
.rgh-align-issue-labels .js-issue-row .mt-1.text-small.text-gray, /* GHE */
.rgh-align-issue-labels .js-issue-row .mt-1.text-small.color-text-secondary { /* Issue details line */
flex-basis: 100%;
}

Expand Down
4 changes: 2 additions & 2 deletions source/features/batch-open-conversations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function init(): Promise<void | false> {
);
issuesToolbar.append(
<div className="table-list-triage flex-auto js-issues-toolbar-triage">
<span className="text-gray table-list-header-toggle">
<span className="text-gray color-text-secondary table-list-header-toggle">
<span data-check-all-count="">1</span>
{' selected '}
<button type="button" className="btn-link rgh-batch-open-issues pl-3">Open selected</button>
Expand All @@ -87,7 +87,7 @@ async function init(): Promise<void | false> {
for (const conversation of select.all('.js-issue-row')) {
const number = looseParseInt(conversation.id);
conversation.firstElementChild!.prepend(
<label className="flex-shrink-0 py-2 pl-3 d-none d-md-block">
<label className="flex-shrink-0 py-2 pl-3 d-none d-md-block">
<input
data-check-all-item
type="checkbox"
Expand Down
3 changes: 2 additions & 1 deletion source/features/center-reactions-popup.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Hide reaction popover text */
.js-add-reaction-popover .text-gray,
.js-add-reaction-popover .text-gray, /* GHE */
.js-add-reaction-popover .color-text-secondary,
.js-add-reaction-popover .dropdown-divider {
display: none;
}
Expand Down
14 changes: 10 additions & 4 deletions source/features/clean-dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
* `.js-news-feed-event-group` is only for grouped events
*/

/* Hide duplicate repo name in some non-grouped events */
/* GHE */
.rgh-clean-dashboard .dashboard .watch_started .color-border-secondary.flex-items-baseline .text-bold.text-gray-dark,
.rgh-clean-dashboard .dashboard .repo .color-border-secondary.flex-items-baseline .text-bold.text-gray-dark,
.rgh-clean-dashboard .dashboard .public .color-border-secondary.flex-items-baseline .text-bold.text-gray-dark {
.rgh-clean-dashboard .dashboard .public .color-border-secondary.flex-items-baseline .text-bold.text-gray-dark,
/* Hide duplicate repo name in some non-grouped events */
.rgh-clean-dashboard .dashboard .watch_started .color-border-secondary.flex-items-baseline .text-bold.color-text-primary,
.rgh-clean-dashboard .dashboard .repo .color-border-secondary.flex-items-baseline .text-bold.color-text-primary,
.rgh-clean-dashboard .dashboard .public .color-border-secondary.flex-items-baseline .text-bold.color-text-primary {
display: none;
}

Expand Down Expand Up @@ -52,12 +56,14 @@
}

/* Hide footer date on Created Repository events */
.rgh-clean-dashboard .dashboard .repo .f6.text-gray {
.rgh-clean-dashboard .dashboard .repo .f6.text-gray, /* GHE */
.rgh-clean-dashboard .dashboard .repo .f6.color-text-secondary {
display: none;
}

/* Grouped events: Make repo name smaller */
.rgh-clean-dashboard .dashboard .Details .flex-items-baseline .text-bold.text-gray-dark {
.rgh-clean-dashboard .dashboard .Details .flex-items-baseline .text-bold.text-gray-dark, /* GHE */
.rgh-clean-dashboard .dashboard .Details .flex-items-baseline .text-bold.color-text-primary {
font-size: 1em !important;
}

Expand Down
2 changes: 1 addition & 1 deletion source/features/clean-repo-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import features from '.';

async function removeReadmeLink(): Promise<void> {
// Hide "Readme" link made unnecessary by toggle-files-button #3580
(await elementReady('.muted-link[href="#readme"]'))?.parentElement!.remove();
(await elementReady('.muted-link[href="#readme"], .Link--muted[href="#readme"]'))?.parentElement!.remove();
}

async function cleanLicenseText(): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions source/features/conversation-links-on-repo-lists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function init(): void {
// Place before the "Updated on" element
select('relative-time', repository)!.previousSibling!.before(
<a
className="muted-link mr-3"
className="muted-link Link--muted mr-3"
href={repositoryLink.href + '/issues?q=is%3Aissue+is%3Aopen'}
>
<IssueOpenedIcon/>
</a>,
<a
className="muted-link mr-3"
className="muted-link Link--muted mr-3"
href={repositoryLink.href + '/pulls?q=is%3Apr+is%3Aopen'}
>
<GitPullRequestIcon/>
Expand Down
2 changes: 1 addition & 1 deletion source/features/convert-pr-to-draft-improvements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function init(): void {

alternativeActions.classList.add('rgh-convert-pr-draft-position');
const convertToDraft = existingButton.closest('details')!.cloneNode(true);
select('.muted-link', convertToDraft)!.classList.remove('muted-link');
select('.muted-link, .Link--muted', convertToDraft)!.classList.remove('muted-link', 'Link--muted');
alternativeActions.prepend(convertToDraft);
}
});
Expand Down
10 changes: 3 additions & 7 deletions source/features/easier-pr-sha-copy.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/*
This feature has to work on:
https://github.com/sindresorhus/refined-github/pulls
*/

/* Add margin to commit SHA to reduce likelihood of selection overflow */
.repository-content .js-commit .text-right code .link-gray {
/* Add margin to commit SHA to reduce likelihood of selection overflow #2508 */
.repository-content .js-commit .text-right code .link-gray, /* GHE */
.repository-content .js-commit .text-right code .Link--secondary {
margin-right: 16px;
}
2 changes: 1 addition & 1 deletion source/features/faster-reviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function addSidebarReviewButton(): Promise<void | false> {

sidebarReviewsSection!.append(
<span style={{fontWeight: 'normal'}}>
– <a href={reviewFormUrl.href} className="btn-link muted-link" data-hotkey="v">review now</a>
– <a href={reviewFormUrl.href} className="btn-link muted-link Link--muted" data-hotkey="v">review now</a>
</span>
);
}
Expand Down
2 changes: 1 addition & 1 deletion source/features/first-published-tag-for-merged-pr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const getFirstTag = cache.function(async (commit: string): Promise<string | unde
});

async function init(): Promise<void> {
const mergeCommit = select(`.TimelineItem.js-details-container.Details a[href^="/${getRepo()!.nameWithOwner}/commit/" i] > code.link-gray-dark`)!.textContent!;
const mergeCommit = select(`.TimelineItem.js-details-container.Details a[href^="/${getRepo()!.nameWithOwner}/commit/" i] > code`)!.textContent!;
const tagName = await getFirstTag(mergeCommit);

if (!tagName) {
Expand Down
2 changes: 1 addition & 1 deletion source/features/linkify-user-edit-history-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function init(): void {
add(avatar) {
const userName = avatar.alt.slice(1);
// Linkify name first
wrap(avatar.nextElementSibling!, <a className="link-gray-dark" href={`/${userName}`}/>);
wrap(avatar.nextElementSibling!, <a className="link-gray-dark Link--primary" href={`/${userName}`}/>);

// Then linkify avatar
wrap(avatar, <a href={`/${userName}`}/>);
Expand Down
2 changes: 1 addition & 1 deletion source/features/open-issue-to-latest-comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function initDashboard(): void {
add(icon) {
const url = icon.closest('li')!.querySelector('a')!.pathname + '#partial-timeline';
icon.parentElement!.classList.remove('col-1'); // Also fix extra space added by GitHub #3174
wrapAll([icon, icon.nextSibling!], <a className="muted-link" href={url}/>);
wrapAll([icon, icon.nextSibling!], <a className="muted-link Link--muted" href={url}/>);
}
});
}
Expand Down
21 changes: 14 additions & 7 deletions source/features/parse-backticks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function init(): void {
'.BorderGrid--spacious .f4.mt-3', // `isRepoHome` repository description
'.js-commits-list-item .mb-1', // `isCommitList` commit message
'.js-commits-list-item pre', // `isCommitList` commit description
'.Details[data-issue-and-pr-hovercards-enabled] .d-none a.link-gray-dark', // `isRepoRoot` commit message
'.Details[data-issue-and-pr-hovercards-enabled] .d-none a.link-gray-dark', // `isRepoRoot` commit message (GHE)
'.Details[data-issue-and-pr-hovercards-enabled] .d-none a.Link--primary', // `isRepoRoot` commit message
'.commit-title', // `isCommit` commit message
'.commit-desc', // `isCommit` commit description
'.js-commit .pr-1 > code', // `isPRConversation` pushed commits
Expand All @@ -25,23 +26,29 @@ function init(): void {
'[id^=ref-issue-]', // `isIssue` issue and PR references
'[id^=ref-pullrequest-]', // `isPRConversation` issue and PR references
'[aria-label="Link issues"] a', // `isIssue`, `isPRConversation` linked issue and PR
'.Box-header.Details .link-gray', // `isSingleFile` commit message
'.Box-header.Details .link-gray', // `isSingleFile` commit message (GHE)
'.Box-header.Details .Link--secondary', // `isSingleFile` commit message
'.Box-header.Details pre', // `isSingleFile` commit description
'.js-pinned-issue-list-item > .d-block', // Pinned Issues
'.release-header', // `isReleasesOrTags` Headers
'.existing-pull-contents .list-group-item-link', // `isCompare` with existing PR
'#pull-requests a.link-gray-dark', // `isPulse` issue and PR title
'[id^="check_suite"] a.link-gray-dark', // `isRepositoryActions`
'#pull-requests a.link-gray-dark', // `isPulse` issue and PR title (GHE)
'#pull-requests a.Link--primary', // `isPulse` issue and PR title
'[id^="check_suite"] a.link-gray-dark', // `isRepositoryActions` (GHE)
'[id^="check_suite"] a.Link--primary', // `isRepositoryActions`
'.checks-summary-conclusion + .flex-auto .f3', // `isActions` run
'.js-wiki-sidebar-toggle-display a', // `isWiki` sidebar pages title
'.wiki-wrapper .gh-header-title', // `isWiki` page title
'.js-recent-activity-container .text-bold', // `isDashboard` "Recent activity" titles
'.issues_labeled .text-gray-dark > a', // `isDashboard` "help wanted" event titles
'.issues_labeled .text-gray-dark > a', // `isDashboard` "help wanted" event titles (GHE)
'.issues_labeled .color-text-primary > a', // `isDashboard` "help wanted" event titles
'.commits blockquote', // `isDashboard` newsfeed commits
'.notifications-list-item p.text-normal', // `isNotifications` issue and PR title
'.profile-timeline-card .text-gray-dark', // `isUserProfileMainTab` issue and PR title
'.profile-timeline-card .text-gray-dark', // `isUserProfileMainTab` issue and PR title (GHE)
'.TimelineItem-body .color-text-primary', // `isUserProfileMainTab` issue and PR title
'#user-repositories-list [itemprop="description"]', // `isUserProfileRepoTab` repository description
'.js-hovercard-content > .Popover-message .link-gray-dark', // Hovercard
'.js-hovercard-content > .Popover-message .link-gray-dark', // Hovercard (GHE)
'.js-hovercard-content > .Popover-message .Link--primary', // Hovercard
'.js-issue-title', // `isDiscussion`
'a[data-hovercard-type="discussion"]' // `isDiscussionList`
].map(selector => selector + ':not(.rgh-backticks-already-parsed)').join();
Expand Down
9 changes: 6 additions & 3 deletions source/features/pr-approvals-count.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/* Show approvals count in PR list */
.js-issue-row .text-gray [aria-label*='approval'] {
.js-issue-row .text-gray [aria-label*='approval'], /* GHE */
.js-issue-row .color-text-secondary [aria-label*='approval'] {
font-size: 0;
}

.js-issue-row .text-gray [aria-label*='approval']::before {
.js-issue-row .text-gray [aria-label*='approval']::before, /* GHE */
.js-issue-row .color-text-secondary [aria-label*='approval']::before {
all: unset;
content: attr(aria-label);
display: inline !important;
color: var(--github-green);
font-size: 12px;
}

.js-issue-row .text-gray [aria-label*='changes'] {
.js-issue-row .text-gray [aria-label*='changes'], /* GHE */
.js-issue-row .color-text-secondary [aria-label*='changes'] {
color: var(--github-red) !important;
}
2 changes: 1 addition & 1 deletion source/features/repo-age.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async function init(): Promise<void> {
sidebarAboutSection.append(
<h3 className="sr-only">Repository age</h3>,
<div className="mt-3">
<a href={firstCommitHref} className="muted-link" title={`First commit dated ${dateFormatter.format(birthday)}`}>
<a href={firstCommitHref} className="muted-link Link--muted" title={`First commit dated ${dateFormatter.format(birthday)}`}>
<RepoIcon className="mr-2"/>{age}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion source/features/show-associated-branch-prs-on-fork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function init(): Promise<void> {
<a
data-issue-and-pr-hovercards-enabled
href={prInfo.url}
className="muted-link"
className="muted-link Link--muted"
data-hovercard-type="pull_request"
data-hovercard-url={prInfo.url + '/hovercard'}
>
Expand Down
2 changes: 1 addition & 1 deletion source/features/sync-pr-commit-title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function needsSubmission(): boolean {
function getUI(): HTMLElement {
return select(`${mergeFormSelector} .rgh-sync-pr-commit-title-note`) ?? (
<p className="note rgh-sync-pr-commit-title-note">
The title of this PR will be updated to match this title. <button type="button" className="btn-link muted-link text-underline rgh-sync-pr-commit-title">Cancel</button>
The title of this PR will be updated to match this title. <button type="button" className="btn-link muted-link Link--muted text-underline rgh-sync-pr-commit-title">Cancel</button>
</p>
);
}
Expand Down
2 changes: 1 addition & 1 deletion source/features/tag-changelog-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async function init(): Promise<void> {
lastLink.after(
<li className={lastLink.className + ' rgh-changelog-link'}>
<a
className="muted-link tooltipped tooltipped-n"
className="muted-link Link--muted tooltipped tooltipped-n"
aria-label={'See changes since ' + decodeURIComponent(previousTag)}
href={buildRepoURL(`compare/${previousTag}...${allTags[index].tag}`)}
>
Expand Down
1 change: 1 addition & 0 deletions source/options-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const defaults = Object.assign({
logging: false
}, Object.fromEntries(__features__.map(id => [`feature:${id}`, true])));

// TODO[2021-10-01]: Drop classes `muted-link`, `link-gray`, `link-gray-dark`, `text-gray` and `text-gray-dark` #4021
const migrations = [
featureWasRenamed('pr-easy-toggle-files', 'easy-toggle-files'), // Merged in December
featureWasRenamed('cleanup-repo-filelist-actions', 'clean-repo-filelist-actions'), // Merged in February
Expand Down
6 changes: 4 additions & 2 deletions source/refined-github.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ highlight-collaborators-and-own-conversations
parse-backticks
pr-branches
*/
.js-issue-row .text-small.text-gray {
.js-issue-row .text-small.text-gray, /* GHE */
.js-issue-row .text-small.color-text-secondary {
line-height: 1.8;
}

/* Reset `vertical-align` for .octicons to work with above increased line-height */
.js-issue-row .text-small.text-gray .octicon {
.js-issue-row .text-small.text-gray .octicon, /* GHE */
.js-issue-row .text-small.color-text-secondary .octicon {
vertical-align: middle;
}

Expand Down