feat: use shared html resource and add checks to keep resources in sync#258
Merged
andrewrobinsonhodges-snyk merged 9 commits intomainfrom Feb 10, 2025
Merged
Conversation
| - 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: |
Contributor
There was a problem hiding this comment.
nitpick: key instead of kay, while instead of wile ;)
| 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"); |
Contributor
There was a problem hiding this comment.
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
bastiandoetsch
approved these changes
Feb 6, 2025
| // 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!