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

Allow for customizing the colors of the inline annotations #25

Open
dihmeetree opened this issue Apr 24, 2024 · 2 comments
Open

Allow for customizing the colors of the inline annotations #25

dihmeetree opened this issue Apr 24, 2024 · 2 comments
Assignees

Comments

@dihmeetree
Copy link

dihmeetree commented Apr 24, 2024

I have the One Dark Pro theme installed for VSCode. So my inline annotations look like this
image

I would love to get the background and border to match my specific theme a little bit more.

Look's like the colors at the moment are statically set here:
https://github.com/opral/monorepo/blob/da25aa19ad08643e5cb7eec940eda9ba09b5804f/inlang/source-code/ide-extension/src/decorations/messagePreview.ts#L97C1-L100C42

Would love to be able to overwrite the colors for the box (border, background, etc). I was thinking some way of overwriting the colors in my settings.json file would be great I think 👍🏻

I'm picky.. I know haha.... I have some OCD so when colors are off.. it frustrates me a little bit. 😄

Thank you!

@dihmeetree dihmeetree changed the title Allow for customizing the colors of the inline annotations? Allow for customizing the colors of the inline annotations Apr 24, 2024
Copy link
Collaborator

The default could also be out of the theming tokens to match the look.

Copy link
Contributor

Hey, I looked more closely at this and it seems we need multiple states for this inline annotation to work correctly.

3 states:

  • working/success: display the message
  • warning: display the warning with a warning color
  • error: display the error with a error color


We have to account for all of those 3 states with coloring, meaning that if we offer a way to modify them, we need a way to style 3 states instead of only 3 variables for example, resulting in 9 variables (border, background, text * 3).

---

Furthermore, these 3 states are depending on the states the lint rule system of inlang is exposing, resulting in a dependency there. This requires the states (& styling) to change if we ever decide to have more than 3 states for lint rules, or multiple types of lint rules, such as code lint rules.

I'll come up with a concept 👍
As a first step, we can specify the defaults better (theme specific) & have a minimal settings layer where current states can be styled.

something like:

"sherlock.theme.annotation": "rgba(153, 153, 153, .8)",   
"sherlock.theme.annotationBorder": "rgba(153, 153, 153, .8)",   
"sherlock.theme.annotationMissing": "#d37070",   
"sherlock.theme.annotationMissingBorder": "#d37070",

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

No branches or pull requests

3 participants