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

Fixes #5622 #5624

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

pouyakary
Copy link
Contributor

This PR adds foregrounds colors for the PR badges which fixes #5622

package.json Outdated
Comment on lines 2650 to 2653
"dark": "#FFD9FE",
"light": "#FFD9FE",
"highContrast": "editor.foreground",
"highContrastLight": "editor.foreground"
Copy link
Member

Choose a reason for hiding this comment

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

I'm happy for these to be customizable, but in general it's good to make the colors derive from an existing color. In this case, I think all 4 options here (and for the other new colors) should derive from the current color: button.foreground. This will create the least amount of disruption for users, and give an opportunity to for the color to be automatically configured to something that makes sense with their theme.

Copy link
Member

Choose a reason for hiding this comment

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

If it's better in your theme, I would also be fine with button.secondaryForeground.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review, and great point! I'll make them as such!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking, and what about using the original GitHub colors to look exactly like the website? Background colors refer to them, so why not the foregrounds?

Copy link
Member

Choose a reason for hiding this comment

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

If you're referring to the open, merged, and draft background colors then matching the website is fine if we don't already do it. I would have to double check and make sure that the colors don't look odd in the default VS Code dark and light themes.

For the foreground, I think it's just black or white on github.com, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah and I thought we could default to white/black instead of button foreground since the background color is fixed, it would be dangerous to let the foreground be what the theme says (it will break everywhere)

Copy link
Member

Choose a reason for hiding this comment

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

I see now, thanks for elaborating! Yes, this makes sense. I would suggest just one new color to use for all three status badges then: pullRequests.statusForeground.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we please have the option to customize all of them (because it would make at least my theme much more pretty) and have all of them default to this color?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, that's fine for me. Let's have pullRequests.statusOpenForeground, then have the other pullRequests.status*Foreground values default to pullRequests.statusOpenForeground.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, I'll apply it now

@pouyakary
Copy link
Contributor Author

@alexr00 I have applied the changes you requested, I hope you find them acceptable.

Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

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

@pouyakary the light/dark colors were inverted, so I've swapped them. I also saw that the color wasn't being applied and fixed that too. Looks like the color is still missing from the icon in the badge.

@pouyakary
Copy link
Contributor Author

Oh, sorry :( Let me see if I can fix it

@0214ggyy

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PR Status Badges Are Referencing Bad Foreground Color
4 participants