From 8c699850834118eb181c52d205523ed5da93dd55 Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Fri, 27 Mar 2026 19:04:39 +0100 Subject: [PATCH 1/2] dbeaver/pro#8518 adds message for string parameters (#4233) * dbeaver/pro#8518 adds message for string parameters * aligned message with dbeaver: "string values must be quoted" * reverts branding and uses it optionally for bind parameters popup * renames prop * makes few versions of alert * Revert "makes few versions of alert" This reverts commit 5b9f09009eca097f78867c32890290679d352fb7. * adds gray message * adds icon --------- Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/PropertiesTable/PropertiesTable.tsx | 5 +++-- webapp/packages/plugin-sql-editor/src/locales/en.ts | 1 + webapp/packages/plugin-sql-editor/src/locales/fr.ts | 1 + webapp/packages/plugin-sql-editor/src/locales/it.ts | 1 + webapp/packages/plugin-sql-editor/src/locales/ru.ts | 1 + webapp/packages/plugin-sql-editor/src/locales/vi.ts | 1 + webapp/packages/plugin-sql-editor/src/locales/zh.ts | 1 + .../src/renderQueryParamsForConfirmation.tsx | 12 +++++++++--- 8 files changed, 18 insertions(+), 5 deletions(-) diff --git a/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx b/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx index d9a158d0c9..5254af391b 100644 --- a/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx +++ b/webapp/packages/core-blocks/src/PropertiesTable/PropertiesTable.tsx @@ -37,10 +37,11 @@ interface Props { staticProperties?: boolean; filterable?: boolean; sortByName?: boolean; + disableOverflowEffect?: boolean; } export const PropertiesTable = observer(function PropertiesTable(props) { - const { className, onAdd, readOnly, propertiesState } = props; + const { className, onAdd, readOnly, propertiesState, disableOverflowEffect = false } = props; const translate = useTranslate(); const propsRef = useObjectRef({ ...props }); const style = useS(styles); @@ -165,7 +166,7 @@ export const PropertiesTable = observer(function PropertiesTable(props) { onRemove={removeProperty} /> ))} -
+ {!disableOverflowEffect &&
}
); diff --git a/webapp/packages/plugin-sql-editor/src/locales/en.ts b/webapp/packages/plugin-sql-editor/src/locales/en.ts index faed9e7eeb..5a7128a55a 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/en.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/en.ts @@ -57,4 +57,5 @@ export default [ ], ['plugin_sql_editor_settings_highlight_white_space', 'Highlight white space characters'], ['plugin_sql_editor_settings_highlight_white_space_description', 'Highlight spaces, tabs and other white space characters in the SQL editor'], + ['plugin_sql_editor_bind_parameters_dialog_alert_title', 'String values must be quoted'], ]; diff --git a/webapp/packages/plugin-sql-editor/src/locales/fr.ts b/webapp/packages/plugin-sql-editor/src/locales/fr.ts index 2d633dc962..8712de062b 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/fr.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/fr.ts @@ -61,4 +61,5 @@ export default [ 'plugin_sql_editor_settings_highlight_white_space_description', "Mettre en surbrillance les espaces, les tabulations et les autres caractères d'espace blanc dans l'éditeur SQL", ], + ['plugin_sql_editor_bind_parameters_dialog_alert_title', 'Les valeurs de type chaîne doivent être entre guillemets'], ]; diff --git a/webapp/packages/plugin-sql-editor/src/locales/it.ts b/webapp/packages/plugin-sql-editor/src/locales/it.ts index 0833b07197..3d9d8e7f89 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/it.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/it.ts @@ -53,4 +53,5 @@ export default [ 'plugin_sql_editor_settings_highlight_white_space_description', "Mettere in evidenza spazi, tabulazioni e altri caratteri di spazio bianco nell'editor SQL", ], + ['plugin_sql_editor_bind_parameters_dialog_alert_title', 'I valori stringa devono essere racchiusi tra virgolette'], ]; diff --git a/webapp/packages/plugin-sql-editor/src/locales/ru.ts b/webapp/packages/plugin-sql-editor/src/locales/ru.ts index 3fc919c7ed..ac296e672f 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/ru.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/ru.ts @@ -54,4 +54,5 @@ export default [ ], ['plugin_sql_editor_settings_highlight_white_space', 'Подсветить пробелы'], ['plugin_sql_editor_settings_highlight_white_space_description', 'Подсветить пробелы, табуляции и другие пробельные символы в редакторе SQL'], + ['plugin_sql_editor_bind_parameters_dialog_alert_title', 'Строковые значения должны быть заключены в кавычки'], ]; diff --git a/webapp/packages/plugin-sql-editor/src/locales/vi.ts b/webapp/packages/plugin-sql-editor/src/locales/vi.ts index 111b4b62b0..3701609cee 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/vi.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/vi.ts @@ -56,4 +56,5 @@ export default [ 'plugin_sql_editor_settings_highlight_white_space_description', 'Đánh dấu khoảng trắng, tab và các ký tự khoảng trắng khác trong trình soạn thảo SQL', ], + ['plugin_sql_editor_bind_parameters_dialog_alert_title', 'Giá trị chuỗi phải được đặt trong dấu ngoặc kép'], ]; diff --git a/webapp/packages/plugin-sql-editor/src/locales/zh.ts b/webapp/packages/plugin-sql-editor/src/locales/zh.ts index 4a04931be1..4cec96c9c3 100644 --- a/webapp/packages/plugin-sql-editor/src/locales/zh.ts +++ b/webapp/packages/plugin-sql-editor/src/locales/zh.ts @@ -54,4 +54,5 @@ export default [ ], ['plugin_sql_editor_settings_highlight_white_space', '高亮显示空白字符'], ['plugin_sql_editor_settings_highlight_white_space_description', '高亮显示SQL编辑器中的空格、制表符和其他空白字符'], + ['plugin_sql_editor_bind_parameters_dialog_alert_title', '字符串值必须用引号括起来'], ]; diff --git a/webapp/packages/plugin-sql-editor/src/renderQueryParamsForConfirmation.tsx b/webapp/packages/plugin-sql-editor/src/renderQueryParamsForConfirmation.tsx index aa95267670..3ca140d96f 100644 --- a/webapp/packages/plugin-sql-editor/src/renderQueryParamsForConfirmation.tsx +++ b/webapp/packages/plugin-sql-editor/src/renderQueryParamsForConfirmation.tsx @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. */ -import { PropertiesTable, useResource } from '@cloudbeaver/core-blocks'; +import { IconOrImage, PropertiesTable, useResource, useTranslate } from '@cloudbeaver/core-blocks'; import { SQLCodeEditor, useSqlDialectExtension } from '@cloudbeaver/plugin-sql-editor-codemirror'; import { useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6'; import { observer } from 'mobx-react-lite'; @@ -56,12 +56,14 @@ const RenderParametersForm = observer(function RenderParametersForm({ const connectionDialectResource = useResource(RenderParametersForm, ConnectionDialectResource, connectionKey); const sqlDialect = useSqlDialectExtension(connectionDialectResource.data); const extensions = useCodemirrorExtensions(); + const translate = useTranslate(); + if (sqlDialect) { extensions.set(...sqlDialect); } for (const [paramName, paramValue] of Object.entries(parameters)) { - const paramValueString = String(paramValue); + const paramValueString = String(paramValue); if (paramValueString) { const escapedName = escapeForRegExp(paramName); @@ -90,12 +92,16 @@ const RenderParametersForm = observer(function RenderParametersForm({ className="tw:overflow-auto" sortByName={false} staticProperties + disableOverflowEffect /> - {!sqlEditorSettingsService.disabled && ( )} +
+ + {translate('plugin_sql_editor_bind_parameters_dialog_alert_title')} +
); }); From 3dadc17ff126ff8f8e426f5b21d59c34be312173 Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Mon, 30 Mar 2026 12:20:27 +0200 Subject: [PATCH 2/2] dbeaver/pro#8644 add temp icon for base sql tab (#4243) * dbeaver/pro#8644 add temp icon for base sql tab * dbeaver/pro#8644 replace old icons --------- Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/ResourceSqlDataSource.ts | 2 +- .../public/icons/sql_script.svg | 6 +++--- .../public/icons/sql_script_m.svg | 6 +++--- .../public/icons/sql_script_sm.svg | 6 +++--- .../public/icons/sql_script_temp.svg | 17 +++++++++++++++++ .../public/icons/sql_script_temp_m.svg | 17 +++++++++++++++++ .../public/icons/sql_script_temp_sm.svg | 17 +++++++++++++++++ .../src/SqlDataSource/BaseSqlDataSource.ts | 2 +- 8 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 webapp/packages/plugin-sql-editor/public/icons/sql_script_temp.svg create mode 100644 webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_m.svg create mode 100644 webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_sm.svg diff --git a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts index b9974a8dd7..9b5825613e 100644 --- a/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor-navigation-tab-script/src/ResourceSqlDataSource.ts @@ -149,7 +149,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource { private readonly projectsService: ProjectsService, state: IResourceSqlDataSourceState, ) { - super(); + super('/icons/sql_script_m.svg'); this.bindState(state); this.lastAction = undefined; this.loaded = false; diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_script.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_script.svg index a3b8704a82..97550407bf 100644 --- a/webapp/packages/plugin-sql-editor/public/icons/sql_script.svg +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_script.svg @@ -1,9 +1,9 @@ - - + + - + diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_script_m.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_script_m.svg index a7ff2c681f..6a7e9bd7cc 100644 --- a/webapp/packages/plugin-sql-editor/public/icons/sql_script_m.svg +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_script_m.svg @@ -1,9 +1,9 @@ - - + + - + diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_script_sm.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_script_sm.svg index 81bc05d4f7..e4993172ca 100644 --- a/webapp/packages/plugin-sql-editor/public/icons/sql_script_sm.svg +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_script_sm.svg @@ -1,9 +1,9 @@ - - + + - + diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp.svg new file mode 100644 index 0000000000..837a826008 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_m.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_m.svg new file mode 100644 index 0000000000..f69af60d7f --- /dev/null +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_m.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_sm.svg b/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_sm.svg new file mode 100644 index 0000000000..0850cddac5 --- /dev/null +++ b/webapp/packages/plugin-sql-editor/public/icons/sql_script_temp_sm.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts b/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts index 2374de0317..570a6ffc14 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts +++ b/webapp/packages/plugin-sql-editor/src/SqlDataSource/BaseSqlDataSource.ts @@ -91,7 +91,7 @@ export abstract class BaseSqlDataSource