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

Improve code highlighting in web UI #4447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pat-s
Copy link
Contributor

@pat-s pat-s commented Nov 23, 2024

@woodpecker-ci/maintainers as this might be another controversial design decision, please vote on the initial post of this PR with 👍 and 👎


This introduces a custom color. However, I found no color of the current palette to be matching here and/or creating a good contrast.
In addition, I slightly tweaked the padding and rounding values.

Before

image

After

image image

@pat-s pat-s added the ui frontend related label Nov 23, 2024
@pat-s pat-s added this to the 3.0.0 milestone Nov 23, 2024
@xoxys
Copy link
Member

xoxys commented Nov 23, 2024

Im not against changing the code block color but not this way. If we want a new one we should create a new color theme with --wp-code-{100,200,300}.

@xoxys
Copy link
Member

xoxys commented Nov 23, 2024

Keep in mind its used in various other places as well.

@pat-s
Copy link
Contributor Author

pat-s commented Nov 24, 2024

I don't think we need a full palette for a single light/dark code highlighting color.

I agree the naming is not optimal and doesn't fit into the current schema. Open for suggestions.

@xoxys
Copy link
Member

xoxys commented Nov 25, 2024

We dont need a full pallete right now we only have 100 and 200 just change the color of these.

@pat-s
Copy link
Contributor Author

pat-s commented Nov 26, 2024

100 and 200 are usually shades of bigger palette with 100 being the lightest value. We don't have a "real" palette for wp-code. Yes, two values exist

  --wp-code-100: theme('colors.int-wp-secondary.300');
  --wp-code-200: theme('colors.int-wp-secondary.600');

and yes, these again refer to another palette, but these values are also somewhat arbitrary and IMO not matching well in the UI. Hence I don't think that mimicking a palette is the best way forward here.

There should only be one color for wp-code ever IMO, for both light and dark. How about consolidating the two existing ones to one definition named wp-code? The two existing ones are only used in one instance in the code, respectively.

@xoxys
Copy link
Member

xoxys commented Nov 26, 2024

We are getting lost in discussions again. At the end, I don't really care, and wp-code works for me as well.

@pat-s
Copy link
Contributor Author

pat-s commented Nov 26, 2024

Hm, I think this was just a normal discussion? You brought up some reasons, I replied and shared my thoughts. It is not even about subjective UI but code syntax, so I'd say such discussions are normal (and needed and good).

@xoxys
Copy link
Member

xoxys commented Nov 26, 2024

Sorry this was not meant to be offensive or rude :) The color is only used in one location. While I have some personal preferences, I don't care much enough to discuss further how it is done in detail. wp-code works for me we can still change it later on if there is any need for a color palette. Sorry if my last message was misleading.

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

Successfully merging this pull request may close these issues.

2 participants