Skip to content

Commit

Permalink
Let user disable 3 more CSS features (#6333)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Feb 11, 2023
1 parent a5b5e64 commit af33971
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 21 deletions.
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ Thanks for contributing! 🦋🙌
### Repositories

- [](# "ci-link") 🔥 [Adds a build/CI status icon next to the repo’s name.](https://user-images.githubusercontent.com/1402241/32562120-d65166e4-c4e8-11e7-90fb-cbaf36e2709f.png)
- [](# "hide-watch-and-fork-count") [Hides watcher counter and on smaller screens the fork counter too.](https://user-images.githubusercontent.com/1402241/53681077-f3328b80-3d1e-11e9-9e29-2cb017141769.png)
- [](# "more-dropdown-links") [Adds useful links to the repository navigation dropdown](https://user-images.githubusercontent.com/16872793/124681432-856e6f80-de96-11eb-89c9-6d78e8ae4329.png)
- [](# "default-branch-button") 🔥 [Adds a link to the default branch on directory listings and files.](https://user-images.githubusercontent.com/1402241/71886648-2891dc00-316f-11ea-98d8-c5bf6c24d85c.png)
- [](# "swap-branches-on-compare") [Adds a link to swap branches in the branch compare view.](https://user-images.githubusercontent.com/857700/42854438-821096f2-8a01-11e8-8752-76f7563b5e18.png)
Expand Down Expand Up @@ -224,7 +223,7 @@ Thanks for contributing! 🦋🙌
- [](# "preview-hidden-comments") 🔥 [Previews hidden comments inline.](https://user-images.githubusercontent.com/1402241/52545036-6e271700-2def-11e9-8c0c-b5e0fa6f37dd.png)
- [](# "highest-rated-comment") 🔥 [Highlights the most useful comment in conversations.](https://user-images.githubusercontent.com/1402241/99895146-16b50c80-2c4d-11eb-8038-210e6fd5e798.png)
- [](# "hide-low-quality-comments") [Hides reaction comments ("+1", "👍", …)](https://user-images.githubusercontent.com/1402241/45543717-d45f3c00-b847-11e8-84a5-8c439d0ad1a5.png) (except the maintainers’) [but they can still be shown.](https://user-images.githubusercontent.com/1402241/45543720-d628ff80-b847-11e8-9fb6-758a3102e3a9.png)
- [](# "scrollable-code-and-blockquote") [Limits the height of tall code blocks and quotes.](https://github.com/refined-github/refined-github/issues/1123)
- [](# "scrollable-areas") [Limits the height of tall code blocks and quotes.](https://github.com/refined-github/refined-github/issues/1123)
- [](# "quick-comment-hiding") [Simplifies the UI to hide comments.](https://user-images.githubusercontent.com/1402241/43039221-1ddc91f6-8d29-11e8-9ed4-93459191a510.gif)
- [](# "open-issue-to-latest-comment") [Makes the "comment" icon in issue lists link to the latest comment of the issue.](https://user-images.githubusercontent.com/14323370/57962709-7019de00-78e8-11e9-8398-7e617ba7a96f.png)
- [](# "expand-all-hidden-comments") [On long conversations where GitHub hides comments under a "Load more...", alt-clicking it will load up to 200 comments at once instead of 60.](https://user-images.githubusercontent.com/1402241/73838332-0c548e00-4846-11ea-935f-28d728b30ae9.png)
Expand Down Expand Up @@ -280,6 +279,7 @@ Thanks for contributing! 🦋🙌
- [](# "jump-to-change-requested-comment") [Adds a link to jump to the latest changed requested comment.](https://user-images.githubusercontent.com/19198931/98718312-418b9f00-23c9-11eb-8da2-dfb616e95eb6.gif)
- [](# "view-last-pr-deployment") [Adds a link to open the last deployment from the header of a PR.](https://user-images.githubusercontent.com/16872793/111904355-ef185a00-8a1c-11eb-97dd-aa0272547e73.png)
- [](# "no-unnecessary-split-diff-view") [Always uses unified diffs on files where split diffs aren’t useful.](https://user-images.githubusercontent.com/46634000/121495005-89af8600-c9d9-11eb-822d-77e0b987e3b1.png)
- [](# "emphasize-draft-pr-label") [Makes it easier to distinguish draft PR in lists.](https://user-images.githubusercontent.com/1402241/218252438-062a1ab3-4437-436d-9140-87bee23aaefb.png)

<!-- Refer to style guide above. Keep this message between sections. -->

Expand Down Expand Up @@ -397,6 +397,7 @@ Thanks for contributing! 🦋🙌
- [](# "prevent-pr-merge-panel-opening") Prevents the merge panel from automatically opening on every page load after it’s been opened once.
- [](# "command-palette-navigation-shortcuts") Adds keyboard shortcuts to select items in command palette using <kbd>ctrl</kbd> <kbd>n</kbd> and <kbd>ctrl</kbd> <kbd>p</kbd> (macOS only).
- [](# "submission-via-ctrl-enter-everywhere") Enables submission via <kbd>ctrl</kbd> <kbd>enter</kbd> on every page possible.
- [](# "clean-repo-header") [Reduces repository name wrapping by hiding the fork and watch count (they're still on the repository’s home page)](https://user-images.githubusercontent.com/1402241/218252904-6a31a933-41a7-452e-b841-9484e67429a8.png)

<!-- Refer to style guide above. Keep this message between sections. -->

Expand Down
12 changes: 12 additions & 0 deletions source/features/clean-repo-header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.rgh-clean-repo-header .pagehead-actions :is(#repo-network-counter, #repo-notifications-counter) {
display: none;
}

/* Hide text of "Edit Pins" dropdown button in header of organization repos https://github.com/refined-github/refined-github/pull/5612 */
.rgh-clean-repo-header .pagehead-actions pin-organization-repo summary {
font-size: 0 !important;
}

.rgh-clean-repo-header .pagehead-actions pin-organization-repo .octicon-pin {
vertical-align: middle !important;
}
5 changes: 5 additions & 0 deletions source/features/clean-repo-header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import './clean-repo-header.css';

import features from '../feature-manager';

void features.addCssFeature(import.meta.url);
7 changes: 6 additions & 1 deletion source/features/emphasize-draft-pr-label.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

/* stylelint-disable-next-line media-feature-name-no-vendor-prefix -- It's the only cross-browser media query */
@media (-webkit-min-device-pixel-ratio: 2) {
.js-issue-row [aria-label='Open draft pull request'] svg {
.rgh-emphasize-draft-pr-label .js-issue-row :is(
/* Repo PR lists */
[aria-label='Open draft pull request'],
/* Global PR lists */
[aria-label='Draft Pull Request']
) svg {
stroke: var(--color-fg-muted);
stroke-width: 1.2px;
color: var(--rgh-background) !important;
Expand Down
5 changes: 5 additions & 0 deletions source/features/emphasize-draft-pr-label.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import './emphasize-draft-pr-label.css';

import features from '../feature-manager';

void features.addCssFeature(import.meta.url);
3 changes: 0 additions & 3 deletions source/features/hide-watch-and-fork-count.css

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
:root .comment-body :is(blockquote, pre) {
.rgh-scrollable-areas .comment-body :is(blockquote, pre) {
position: relative; /* OctoLinker compat: attach the purple balls to the scroll */
max-height: 30.5em;
overflow-y: auto;
}

/* A tiny scroll bar appears when the last paragraph contains a `code` or `g-emoji` tag #3012 #4597 */
:root .comment-body blockquote {
.rgh-scrollable-areas .comment-body blockquote {
padding-bottom: 0.2em; /* Do not add to `pre` #5540 */
}

:root .comment-body :is(details, blockquote) :is(blockquote, pre) {
.rgh-scrollable-areas .comment-body :is(details, blockquote) :is(blockquote, pre) {
max-height: none;
}
5 changes: 5 additions & 0 deletions source/features/scrollable-areas.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import './scrollable-areas.css';

import features from '../feature-manager';

void features.addCssFeature(import.meta.url);
9 changes: 0 additions & 9 deletions source/refined-github.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,6 @@ pr-branches
display: none !important;
}

/* Hide text of "Edit Pins" dropdown button in header of organization repos https://github.com/refined-github/refined-github/pull/5612 */
.pagehead-actions pin-organization-repo summary {
font-size: 0 !important;
}

.pagehead-actions pin-organization-repo .octicon-pin {
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;
Expand Down
6 changes: 3 additions & 3 deletions source/refined-github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import './refined-github.css';
// CSS-only features
import './features/github-bugs.css';
import './features/tab-size.css';
import './features/scrollable-code-and-blockquote.css';
import './features/center-reactions-popup.css';
import './features/safer-destructive-actions.css';
import './features/clean-mergeability-box.css';
Expand All @@ -15,10 +14,8 @@ import './features/clean-conversations.css';
import './features/sticky-conversation-list-toolbar.css';
import './features/always-show-branch-delete-buttons.css';
import './features/repo-stats-spacing.css';
import './features/emphasize-draft-pr-label.css';
import './features/clean-notifications.css';
import './features/night-not-found.css';
import './features/hide-watch-and-fork-count.css';
import './features/clean-commit-form.css';
import './features/sticky-file-header.css';
import './features/readable-title-change-events.css';
Expand Down Expand Up @@ -218,3 +215,6 @@ import './features/jump-to-conversation-close-event';
import './features/last-notification-page-button';
import './features/rgh-linkify-yolo-issues';
import './features/quick-new-issue';
import './features/scrollable-areas';
import './features/clean-repo-header';
import './features/emphasize-draft-pr-label';

0 comments on commit af33971

Please sign in to comment.