Skip to content

default-branch-button - Highlight non default branch button - #7804

Merged
fregante merged 5 commits into
refined-github:mainfrom
kovsu:fix-#7679
Sep 21, 2024
Merged

fregante merged 5 commits into
refined-github:mainfrom
kovsu:fix-#7679

Conversation

@kovsu

@kovsu kovsu commented Sep 12, 2024

Copy link
Copy Markdown
Member

.rgh-highlight-non-default-branch {
background-color: var(
--bgColor-accent-muted,
var(--color-accent-subtle)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think these colors have been removed or deprecated years ago, we don’t need the fallbacks. We should probably remove them from the whole repo (if I’m right) and replace them with red so that these bugs are immediately seen, reported and fixed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I mean in this PR let’s only change this file. The rest of the repo can follow separately

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great!

@fregante

Copy link
Copy Markdown
Member

No I mean literally red CSS keyword. Or fuchsia since it’s still bright and more easily greppable

@kovsu

kovsu commented Sep 18, 2024 •

Copy link
Copy Markdown
Member Author

@fregante I think --rgh-red is ok. Or you just want to use color values such as red and #cf222e
--rgh-red: var(--fgColor-danger, var(--color-danger-fg, #cf222e));

@fregante

fregante commented Sep 18, 2024 •

Copy link
Copy Markdown
Member

The purpose of this fallback color is to make bugs immediately visible by having a high contrast and not fit in. fuchsia will do that, colors from the palette won’t.

@fregante

Copy link
Copy Markdown
Member

You can see GitHub using the same strategy here in order to catch usage of certain variables:

@fregante
fregante enabled auto-merge (squash) September 21, 2024 18:47
@fregante
fregante merged commit c8de19f into refined-github:main Sep 21, 2024
@fregante

Copy link
Copy Markdown
Member

I'm not super convinced by the color, but let's try it out. It captures the attention (as desired) and hopefully it doesn't distract the user too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Highlight the non-default branch in files/folder views

2 participants