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

Style AppMap webviews to match the IDE's theme #862

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

jansorg
Copy link
Collaborator

@jansorg jansorg commented Feb 18, 2025

Closes #767
Closes #764

This PR provides CSS variables with colors and font properties to the AppMap webviews.
It also applies the IDE's scrollbar CSS style to the AppMap webviews, webview scrollbars should be more similar to the regular scrollbars of the IDE now.

Questions / open issues:

  • Is there a property to provide the monospace editor font, e.g. to apply it to code snippets?
  • I'm not sure how to style the white AppMap icon in the right panel ("Sequence diagrams")
  • This needs testing on a Mac with a HiDPI screen to make sure the IDE's scale factor is properly applied

I decided to not update the styling of an opened webview if the user changes the theme. This won't happen very often and I don't think we should support this at this time.

image

@jansorg jansorg requested a review from dustinbyrne February 18, 2025 13:41
@dustinbyrne
Copy link
Contributor

It looks like the AppMap icon in the right doesn't adhere to the theme. We can fix this in a future release of the frontend, unless you want to shim it in via something like:

.context__body__table-row__header svg path {
  fill: var(--appmap-color-foreground); 
}

It looks like the monospace font family is simply set to monospace - I'm not sure if JetBrains resolves that in some way or it's solely resolved by the OS.

@jansorg jansorg force-pushed the jansorg/ui-improvements branch from 0b01abc to 0cd1916 Compare February 19, 2025 14:21
@jansorg jansorg force-pushed the jansorg/ui-improvements branch from 0cd1916 to a0817e3 Compare February 19, 2025 15:20
@jansorg jansorg merged commit 8e6dca1 into develop Feb 24, 2025
4 checks passed
@jansorg jansorg deleted the jansorg/ui-improvements branch February 24, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants