forked from refined-github/refined-github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve UX of
dim-bots
by disabling the feature on click (refined-g…
- Loading branch information
Showing
5 changed files
with
52 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,46 +1,21 @@ | ||
/* | ||
READ BEFORE EDITING. Some selectors match the same items ("focused" selector vs non-focused); make sure to update them in tandem. | ||
Commits that have a long commit message will not be dimmed after the user uncollapses the `<details>` element. | ||
*/ | ||
|
||
.rgh-dim-bots--after-hover { | ||
--rgh-dim-bots-delay: 1000s; /* #5158 */ | ||
} | ||
|
||
.rgh-dim-bot:not(.rgh-tagged) .mb-1, | ||
.rgh-dim-bot:not(.rgh-tagged) .Box-row--drag-hide, /* PR row */ | ||
.rgh-dim-bot:not(.rgh-tagged) .mb-1 ~ .d-flex, | ||
.rgh-dim-bot:not(.rgh-tagged) > .d-md-block, | ||
.rgh-dim-bot:not(.rgh-tagged) .labels, /* PR labels */ | ||
.rgh-dim-bot:not(.rgh-tagged) .text-small.color-fg-muted /* PR meta */ { | ||
/* Delay the "focused" status so it's not too annoying when moving the mouse over a list of dimmed items. */ | ||
transition: 0.1s; | ||
transition-delay: 0.3s; | ||
transition-property: opacity, margin-bottom, visibility; | ||
.rgh-dim-bots > *, | ||
.rgh-dim-bots .Box-row--drag-hide { | ||
transition: 100ms opacity; /* Match `mark-merge-commits-in-list` */ | ||
} | ||
|
||
/* | ||
ALL the following rules define the non-focused state | ||
*/ | ||
|
||
.rgh-dim-bot:not(.rgh-tagged, .navigation-focus, :hover, .Details--on) .mb-1, /* Commit titles, dim */ | ||
.rgh-dim-bot:not(.rgh-tagged, .navigation-focus, :hover) .Box-row--drag-hide { /* PR row, dim */ | ||
opacity: 20%; | ||
transition-delay: 0s; | ||
.rgh-dim-bots:not(.rgh-tagged, :hover) > *, /* Commit titles, dim */ | ||
.rgh-dim-bots:not(.rgh-tagged, :hover) .Box-row--drag-hide { /* PR row, dim */ | ||
opacity: 40%; /* Match `mark-merge-commits-in-list` */ | ||
} | ||
|
||
.rgh-dim-bot:not(.rgh-tagged, .navigation-focus, :hover, .Details--on) .mb-1 ~ .d-flex, | ||
.rgh-dim-bot:not(.rgh-tagged, .navigation-focus, :hover, .Details--on) > .d-md-block { | ||
opacity: 20%; | ||
margin-bottom: -1.6em; | ||
visibility: hidden; | ||
/* Delay visibility transition for a slightly shorter time than --rgh-dim-bots-delay, to make the animation smoother */ | ||
transition-delay: 0s, var(--rgh-dim-bots-delay), calc(var(--rgh-dim-bots-delay) - 0.1s); | ||
/* Reset commit title spacing */ | ||
.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .min-width-0 .mb-1 { | ||
margin-bottom: 0 !important; | ||
} | ||
|
||
.rgh-dim-bot:not(.rgh-tagged, .navigation-focus, :hover) .labels, /* PR labels */ | ||
.rgh-dim-bot:not(.rgh-tagged, .navigation-focus, :hover) .text-small.color-fg-muted /* PR meta */ { | ||
margin-bottom: -2em; | ||
visibility: hidden; | ||
transition-delay: 0s, var(--rgh-dim-bots-delay), calc(var(--rgh-dim-bots-delay) - 0.1s); | ||
.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .mb-1 ~ *, /* Commit metadata */ | ||
.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .dropdown-signed-commit, /* Commit verified label */ | ||
.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .flex-shrink-0 .BtnGroup, /* Commit buttons on side */ | ||
.rgh-dim-bots:not(.rgh-tagged, .rgh-interacted) .min-width-0 > :is(.d-block, .d-flex) /* PR */ { | ||
display: none !important; | ||
} |
This file contains 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 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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.rgh-merge-commit > div > * { | ||
transition: 100ms opacity; /* Match `dim-bots` */ | ||
} | ||
|
||
.rgh-merge-commit:not(.navigation-focus, :hover) > div > * { | ||
opacity: 40%; | ||
opacity: 40%; /* Match `dim-bots` */ | ||
} |
This file contains 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