-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: use shared html resource and add checks to keep resources in sync #258
Conversation
.github/workflows/resource-check.yml
Outdated
- name: Check Static Resources | ||
run: | | ||
declare -A resources | ||
# Add each resource as a kay, value pair, mapping the local resource to the reference wile (which should be stored in the lanaguage server repository). For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: key
instead of kay
, while
instead of wile
;)
@@ -102,6 +102,7 @@ public String replaceCssVariables(String html) { | |||
htmlStyled = htmlStyled.replace("<style nonce=\"ideNonce\" data-ide-style></style>", css); | |||
htmlStyled = htmlStyled.replace("var(--default-font)", | |||
" ui-sans-serif, \"SF Pro Text\", \"Segoe UI\", \"Ubuntu\", Tahoma, Geneva, Verdana, sans-serif;"); | |||
htmlStyled = htmlStyled.replace("var(--main-font-size)", "10px"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: can this be taken from the IDE font configuration in Eclipse? See: https://www.perplexity.ai/search/how-to-access-the-eclipse-plat-kwR4S6_ESB29RHq7YGW9kw
// Language server HTML assumes a base font size of 10px. The default Eclipse font size is 17px (13pt), so we | ||
// apply a scaling factor here. This ensures that HTML fonts scale correctly if the user changes the text size. | ||
int scaledHeight = (int) (defaultHeight / 1.7); | ||
return String.valueOf(scaledHeight) + "pt"; |
Check warning
Code scanning / PMD
No need to call String.valueOf to append to a string. Warning
Description
Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.
Checklist
Screenshots / GIFs
Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!