Repository navigation
refactor(editor): take canvas theme colors from the theme's CSS - #3088
Merged
Merged
Conversation
canvas-view now resolves a theme's colors from the state's style modules itself. getCanvasTheme returns a function over that resolved theme and only adds what the CSS doesn't say: Acode's own scrollbars, a see-through canvas over a picture, the gutter border, and syntax colors for themes without a highlight style. The theme's CSS is the only source for the rest, so the canvas draws a theme like the DOM editor does.
Contributor
[Medium impact] The PR appears safe to merge, with the earlier non-blocking test coverage concern still open. SummaryThe PR lets
Reviews (2) · Last reviewed commit: "test(canvas): check which syntax colors ..." · Reviewed by Greptile |
A theme whose highlight style and config disagree: tokens take the highlight style's colors, and the config's are only used without one.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
|
Preview Release for this, has been built. |
Closed
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.
canvasOptions.ts;getCanvasThemenow only adds Acode's own scrollbars, the see-through canvas over a picture, the gutter border, and syntax colors for themes without a highlight style.