Skip to content
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

Lint #5902

Merged
merged 17 commits into from
Aug 19, 2022
Merged

Lint #5902

Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 5 additions & 22 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ Thanks for contributing! 🦋🙌

- [](# "clean-dashboard") 🔥 [Condenses the events to take up less space and uncollapses "User starred X repos" groups.](https://user-images.githubusercontent.com/1402241/54401114-39192780-4701-11e9-9934-7c71f01e957f.png)
- [](# "hide-own-stars") Hides "starred" events for your own repos on the newsfeed.
- [](# "hide-noisy-newsfeed-events") Hides other inutile newsfeed events (commits, forks, new followers).
- [](# "hide-newsfeed-noise") Hides other inutile newsfeed events (commits, forks, new followers).
- [](# "infinite-scroll") Automagically expands the newsfeed when you scroll down.

<!-- Refer to style guide above. Keep this message between sections. -->
Expand Down Expand Up @@ -408,28 +408,11 @@ Thanks for contributing! 🦋🙌

## Customization

Most features [can be disabled](https://github.com/refined-github/refined-github/pull/877) if they are JavaScript-based and you can override our CSS with your own in [the extension options.](https://github.com/refined-github/refined-github/pull/1193)
Most features can be disabled if they are JavaScript-based and you can override our CSS with your own in the extension options.

We're happy to receive suggestions and contributions, but be aware this is a highly opinionated project. There's [a high bar for adding features.](https://github.com/refined-github/refined-github/issues/2960) Users will always disagree with something. That being said, we're open to discussing things.

## Contribute

Read the [contribution guide](contributing.md) and join the [contributors](https://github.com/refined-github/refined-github/graphs/contributors)!
We're happy to receive suggestions and contributions, but be aware this is a highly opinionated project. There's [a high bar for adding features.](https://github.com/refined-github/refined-github/wiki/%22Can-you-add-this-feature%3F%22) Users will always disagree with something. That being said, we're open to discussing things.

## Links

- [Product Hunt submission](https://www.producthunt.com/posts/refined-github) *(2017-07-08)*

## Related

- [Awesome browser extensions for GitHub](https://github.com/stefanbuck/awesome-browser-extensions-for-github) - Awesome list
- [OctoLinker](https://github.com/OctoLinker/OctoLinker) - Navigate across files and packages
- [Notifier for GitHub](https://github.com/sindresorhus/notifier-for-github-chrome) - Shows your notification unread count
- [Mottie's Userscripts](https://github.com/Mottie/GitHub-userscripts) - Countless features to improve GitHub granularly
- [Contributors on GitHub](https://github.com/hzoo/contributors-on-github) - Shows stats about contributors
- [Hide Files on GitHub](https://github.com/sindresorhus/hide-files-on-github) - Hides dotfiles from the file browser
- [GitHub Issue Link Status](https://github.com/fregante/github-issue-link-status) - Colorize issue and PR links to see their status (open, closed, merged)
- [Notifications Preview for GitHub](https://github.com/tanmayrajani/notifications-preview-github) - See your notifications on hover on all pages
- [Show All GitHub Issues](https://github.com/sindresorhus/show-all-github-issues) - Shows both Issues and Pull Requests in the Issues tab
- [Sourcegraph](https://github.com/sourcegraph/sourcegraph/tree/main/client/browser) - Code search and navigation tool
- [PR Monitor](https://github.com/fwouts/prmonitor) - Notifies you about incoming and outgoing PRs
Comment on lines -425 to -435
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! I always find this part a little bit weird, we are not talking about two or three but (almost) a dozen 😅 .

- [More extensions](https://github.com/refined-github/refined-github/wiki/Additional-extensions)
- [Contribution guide](contributing.md)
5 changes: 3 additions & 2 deletions source/features/ci-link.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './ci-link.css';
import React from 'dom-chef';
import select from 'select-dom';
import elementReady from 'element-ready';
import * as pageDetect from 'github-url-detection';

import features from '.';
Expand Down Expand Up @@ -40,10 +40,11 @@ function getCiDetails(commit: string): HTMLElement {

async function init(): Promise<false | void> {
const head = await getHead();
const repoTitle = await elementReady('[itemprop="name"]');

attachElement({
// Append to repo title (aware of forks and private repos)
anchor: select('[itemprop="name"]')!.parentElement,
anchor: repoTitle!.parentElement,
append: () => getCiDetails(head),
});
}
Expand Down
5 changes: 5 additions & 0 deletions source/features/expand-all-hidden-comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ void features.add(import.meta.url, {
deduplicate: false,
init,
});

/*
Test URLs
https://github.com/rust-lang/rfcs/pull/2544
*/
7 changes: 1 addition & 6 deletions source/features/github-bugs.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
margin-left: 8px;
}

/* Bold username in conversation lists #4899 */
:is(.js-issue-row, .js-pinned-issue-list-item) [data-hovercard-type='user'] {
font-weight: 600;
}

#merge_title_field,
#commit-summary-input, /* Restore monospace font in commit/merge title fields #5188 */
:is(.new_public_key, .new_gpg_key) textarea { /* Monospace textareas for new SSH/GPG keys #4917 */
Expand All @@ -30,7 +25,7 @@
max-width: 780px; /* This is the limit applied on the comment thread by `.comment-holder` */
}

/* Hide trailing separator in PR/commit file diff dropdown */
/* Hide trailing separator in PR/commit file diff dropdown #5159 */
.js-file-header-dropdown .dropdown-menu > .dropdown-divider:last-child {
display: none !important;
}
Expand Down
4 changes: 2 additions & 2 deletions source/features/global-conversation-list-filters.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Decrease the padding of filter buttons to accommodate the new buttons */
.subnav-links .subnav-item {
padding: 6px 9px;
#issues_dashboard .subnav-links .subnav-item {
padding-inline: 9px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ forked a repo
followed someone
published a release
*/
.rgh-hide-noisy-newsfeed-events .news :is(.push, .fork, .delete, .follow, .release) {
.rgh-hide-newsfeed-noise .news :is(.push, .fork, .delete, .follow, .release) {
display: none !important;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './hide-noisy-newsfeed-events.css';
import './hide-newsfeed-noise.css';
import * as pageDetect from 'github-url-detection';

import features from '.';
Expand Down
3 changes: 2 additions & 1 deletion source/options-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const renamedFeatures = new Map<string, string>([
['faster-reviews', 'quick-review'],
['faster-pr-diff-options', 'quick-pr-diff-options'],
['hide-useless-comments', 'hide-low-quality-comments'],
['hide-useless-newsfeed-events', 'hide-noisy-newsfeed-events'],
['hide-useless-newsfeed-events', 'hide-newsfeed-noise'],
['hide-noisy-newsfeed-events', 'hide-newsfeed-noise'],
['no-useless-split-diff-view', 'no-unnecessary-split-diff-view'],
['unwrap-useless-dropdowns', 'unwrap-unnecessary-dropdowns'],
['tag-changelog-link', 'tag-changes-link'],
Expand Down
5 changes: 5 additions & 0 deletions source/refined-github.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ pr-branches
vertical-align: middle !important;
}

/* Bold username in conversation lists #4899 */
:is(.js-issue-row, .js-pinned-issue-list-item) [data-hovercard-type='user'] {
font-weight: 600;
}

/* Fit large images in the window when viewing single files */
div[data-target='readme-toc.content'] div.blob-wrapper img {
max-width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion source/refined-github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import './features/clean-checks-list.css';
import './features/align-issue-labels';
import './features/clean-pinned-issues';
import './features/clean-dashboard';
import './features/hide-noisy-newsfeed-events';
import './features/hide-newsfeed-noise';
import './features/minimize-upload-bar';
import './features/hide-diff-signs';
import './features/clean-rich-text-editor';
Expand Down