davsclaus commented on code in PR #26547:
URL: https://github.com/apache/camel/pull/26547#discussion_r4035908548
##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/Theme.java:
##########
@@ -296,38 +297,74 @@ private static
dev.tamboui.markdown.MarkdownStyles.Builder markdownStylesBuilder
}
/**
- * Theme-aware syntax highlighting palette for fenced code blocks in
MarkdownView. Reuses the Monokai (dark) and
- * GitHub-inspired (light) palettes from {@link SyntaxHighlighter}.
+ * Theme-aware syntax highlighting palette for fenced code blocks in
MarkdownView. Uses the same optional
+ * {@code syntax-*} stylesheet tokens as {@link SyntaxHighlighter}, so the
Source tab and markdown code blocks
+ * agree.
*/
public static SyntaxTheme syntaxTheme() {
Review Comment:
Applied in 4727b47980ee — `syntaxTheme()` is now `synchronized`, so the
composite is built under the same monitor `activate()` takes and cannot mix
colours from two themes.
For the record, the method was already un-synchronized on `main` (this PR
only changed its body) and the same shape exists for the other composites in
the class, but the fix is free so it is in.
_Claude Code on behalf of davsclaus_
##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SyntaxHighlighter.java:
##########
@@ -76,40 +76,42 @@ enum Language {
static final Color MONOKAI_TEXT = Color.rgb(248, 248, 242);
// Light color palette (readable on light backgrounds)
- private static final Color LIGHT_COMMENT = Color.rgb(106, 115, 125);
- private static final Color LIGHT_STRING = Color.rgb(3, 47, 98);
- private static final Color LIGHT_KEYWORD = Color.rgb(215, 58, 73);
- private static final Color LIGHT_FUNCTION = Color.rgb(0, 92, 197);
- private static final Color LIGHT_TYPE = Color.rgb(0, 92, 197);
- private static final Color LIGHT_CONSTANT = Color.rgb(111, 66, 193);
- private static final Color LIGHT_TEXT = Color.rgb(36, 41, 46);
-
+ static final Color LIGHT_COMMENT = Color.rgb(106, 115, 125);
+ static final Color LIGHT_STRING = Color.rgb(3, 47, 98);
+ static final Color LIGHT_KEYWORD = Color.rgb(215, 58, 73);
+ static final Color LIGHT_FUNCTION = Color.rgb(0, 92, 197);
+ static final Color LIGHT_TYPE = Color.rgb(0, 92, 197);
Review Comment:
Applied in 4727b47980ee. Guava is not on the TUI classpath and the module
has no `@VisibleForTesting` convention, so I went with the comment option: a
note above the palette blocks saying they are package-private for `ThemeTest`
and not a stable API. It covers the `MONOKAI_*` block too, which was already
package-private on `main` for the same reason without saying so.
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]