From 46fa5c4b3da673b9a17969f6ae363df95a3dbb50 Mon Sep 17 00:00:00 2001 From: Charlie Date: Tue, 19 Nov 2024 12:05:02 -0800 Subject: [PATCH] use xcode theme for light and add more coloring --- package.json | 1 + .../components/QueryEditor/QueryEditor.tsx | 8 +++++-- .../webapp/components/QueryEditor/monokai.ts | 7 ------ .../webapp/components/QueryEditor/themes.ts | 22 +++++++++++++++++++ .../lib/codemirror/codemirror-language.ts | 6 ++--- yarn.lock | 7 ++++++ 6 files changed, 39 insertions(+), 12 deletions(-) delete mode 100644 querybook/webapp/components/QueryEditor/monokai.ts create mode 100644 querybook/webapp/components/QueryEditor/themes.ts diff --git a/package.json b/package.json index 03ba9e16e..b12bc9117 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "@types/diff": "^5.0.2", "@uiw/codemirror-extensions-events": "^4.23.6", "@uiw/codemirror-theme-monokai": "^4.23.6", + "@uiw/codemirror-theme-xcode": "^4.23.6", "@uiw/codemirror-themes": "^4.23.5", "@uiw/react-codemirror": "^4.23.5", "@welldone-software/why-did-you-render": "^6.1.1", diff --git a/querybook/webapp/components/QueryEditor/QueryEditor.tsx b/querybook/webapp/components/QueryEditor/QueryEditor.tsx index 116d32313..362e43b1c 100644 --- a/querybook/webapp/components/QueryEditor/QueryEditor.tsx +++ b/querybook/webapp/components/QueryEditor/QueryEditor.tsx @@ -35,7 +35,7 @@ import { TableToken } from 'lib/sql-helper/sql-lexer'; import { navigateWithinEnv } from 'lib/utils/query-string'; import { IconButton } from 'ui/Button/IconButton'; -import { CustomMonokaiDarkTheme } from './monokai'; +import { CustomMonokaiDarkTheme, CustomXcodeTheme } from './themes'; import './QueryEditor.scss'; @@ -436,7 +436,11 @@ export const QueryEditor: React.FC< {floatButtons}