Commit Graph
14 Commits
Author SHA1 Message Date
72fcd7bfe2 [CB] Bump NPM dependencies (#4270)
* dbeaver/pro#8943 updates yarn locks

* updates vite

* updates vite-plugin-svgr

* removes CVEs

* reverts vite to update it later

* updates yarn lock

* updates yarn lock

* updates uuid

* removes axios CVE

* reverts @codemirror/search in order to fix the issue with replace 1 symbol (broken focus next)

* locks versions of other codemirror packages in order to keep versions consistent

---------

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2026-05-07 11:25:25 +02:00
Sychev AndreyandEvgenia ebda152b6b dbeaver/pro#9156 build: update packageManager version to yarn@4.14.1 … (#4309)
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
2026-05-05 16:09:30 +02:00
Sychev AndreyandEvgenia c27fca442b dbeaver/pro#8687 fix(formatNumber): fix unit selection for floats and… (#4276)
- Use Math.log10 instead of toString().length to count integer digits — toString() on a float
  like 4036.29 has length 7, which incorrectly bucketed thousands-range values into millions
- Fix exponent formula for 3n-digit numbers (e.g. 100000 gave exponent=6→M instead of 3→k)
- Apply precision param d below 1000 (was hardcoded 2); default to 2
- Add formatNumber.test.ts

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
2026-04-15 15:10:57 +02:00
1d5b475482 dbeaver/pro#8553 sql execution plan diagram (#4218)
* dbeaver/pro#8553 feat: add execution plan diagram component

* dbeaver/pro#8553 feat: enhance ExecutionPlanDiagram component with selectedNodeId prop

* dbeaver/pro#8553 feat: add flex-shrink to metric value for better layout

* dbeaver/pro#8553 refactor: remove queryString from IPlanData interface

* dbeaver/pro#8553 feat: integrate execution plan diagram component

* dbeaver/pro#8553 refactor: execution plan diagram

separate state, add l10n, make toolbar composable

* dbeaver/pro#8553 feat: implement keyboard navigation for execution plan nodes

* dbeaver/pro#8553 feat: add translation support for execution plan diagram labels

* dbeaver/pro#8553 fix: execution plan node dimensions

* dbeaver/pro#8553 refactor: move formatNumber to helpers to use it

* dbeaver/pro#8553 feat: add translation support for execution plan diagram API

* dbeaver/pro#8553 docs: add README and API documentation for execution plan diagram component

* dbeaver/pro#8553 feat: adjust cost bar height and collapse indicator position

* dbeaver/pro#8553 feat: update PRIMARY_AXIS_WEIGHT for improved directional navigation

* dbeaver/pro#8553 feat: refactor diagram actions and add collapse state management

* dbeaver/pro#8553 refactor: move execution plan diagram to separate EE plugin

* dbeaver/pro#8553 docs: remove redundant comment

* dbeaver/pro#8553 docs: update comments for source and target anchors in ILayoutEdge interface

* dbeaver/pro#8553 docs: update comment in ILayoutNode interface

* dbeaver/pro#8553 refactor: simplify heavy route computation

* dbeaver/pro#8553 refactor: optimize node handling in computePlanLayout function

* dbeaver/pro#8553 refactor: improve tree structure handling in usePlanTree and buildTree functions

* dbeaver/pro#8553 refactor: simplify usePlanTree

* dbeaver/pro#8553 refactor: extract actions from useExecutionPlanDiagramState

* dbeaver/pro#8553 refactor: improve configuration in execution plan diagram

* dbeaver/pro#8553 refactor: simplify metric rendering in PlanNode component

* dbeaver/pro#8553 feat: collapse by hotkey, not an extra element

* dbeaver/pro#8553 feat: add tooltip hints for plan node interactions

* dbeaver/pro#8553 refactor: remove high cost calculation and add node kind attribute

* dbeaver/pro#8553 style: fix formatting in index.ts for ISqlExecutionPlanViewProps export

* dbeaver/pro#8553 ci: remove unused dependency on @dbeaver/ui-kit

* dbeaver/pro#8553 refactor: remove SQL execution plan diagram translations from locale files

* dbeaver/pro#8553 refactor: update translation keys for SQL execution plan components

* dbeaver/pro#8553 refactor: rename components

* dbeaver/pro#8553 style: const

* dbeaver/pro#8553 refactor: reset execution plan diagram state properties

* dbeaver/pro#8553 refactor: update component imports and extract a component

* dbeaver/pro#8553 refactor: rename PlanNodeKind to EPlanNodeKind and update references

* dbeaver/pro#8553 feat: add zoom icons and update action references

* dbeaver/pro#8553 refactor: enhance translation functionality by adding args interpolation

* dbeaver/pro#8553 fix: Polynomial regular expression used on uncontrolled data

* dbeaver/pro#8553 refactor: update ActionsCapture to use ref for toolbar actions

* dbeaver/pro#8553 refactor: use jsx

* dbeaver/pro#8553 refactor: simplify

* dbeaver/pro#8553 refactor: replace useContext with use in DiagramContext

* dbeaver/pro#8553 refactor: convert ExecutionPlanEdge to memoized component

* dbeaver/pro#8553 refactor: convert ExecutionPlanNode to memoized component

* dbeaver/pro#8553 refactor: unify ref prop in ExecutionPlanNode and ExecutionPlanViewport

* dbeaver/pro#8553 refactor: extract ExecutionPlanViewportContent component and clean up CSS

* dbeaver/pro#8553 refactor: convert ExecutionPlanNodeMetric to memoized component

* dbeaver/pro#8553 refactor: improve usePlanLayout hook by utilizing useEffectEvent for stable callback

* dbeaver/pro#8553 refactor: simplify diagram actions handling in createExecutionPlanDiagram

* dbeaver/pro#8553 refactor:  move out execution plan diagram component from

---------

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
Co-authored-by: alex <48489896+devnaumov@users.noreply.github.com>
2026-03-27 16:07:31 +01:00
296e03ec74 7023-cb-find-and-replace-new (#4085)
* dbeaver/pro#7023 feat: add SearchPanel component and related styles to UI-kit
add chevron Icon to UI-kit (used in Search Panel)

* dbeaver/pro#7023 feat: add SearchPanel story

* dbeaver/pro#7023 feat: update SearchPanel integration in CodeMirror

* dbeaver/pro#7023 feat: add onReplaceToggle prop to SearchPanel for toggle functionality

* dbeaver/pro#7023 fix: replace-input styles

* dbeaver/pro#7023 feat: implement search functionality in DataGrid v2

* dbeaver/pro#7023 fix: update react-data-grid workspace reference in yarn.lock

* dbeaver/pro#7023 feat: don't focus cell on replace

* dbeaver/pro#7023 feat: add searchReadOnly prop to DataGrid and GridSearchPanel components

* dbeaver/pro#7023 fix: update styles for search panel

* dbeaver/pro#7023 feat: add theme variables for improved styling in storybook

* dbeaver/pro#7023 feat: update search panel styles in datagrid

* dbeaver/pro#7023 feat: improve search functionality by resetting active match index and triggering search on find actions

* dbeaver/pro#7023 refactor: useGridSearch

* dbeaver/pro#7023 fix: search panel styles

* dbeaver/pro#7023 feat: implement grid search state management

* dbeaver/pro#7023 feat: add refresh functionality to search components

* dbeaver/pro#7023 feat: add history action to refresh search results on undo/redo

* dbeaver/pro#7023 feat: add batch cell update functionality to data grid

That functionality comes in handy when we want to use Undo and Replace All functions together:
Before that commit we used to perform N operations where N is a number of replaced cells. And history would record them as atomic operations, so pressing Undo would revert only the last replace.
setMany enables batch editing and batch reverting, so now we can Replace All and then revert it by using one Undo operation

* dbeaver/pro#7023 refactor: remove unnecessary eslint disable comment in useGridSearch

* dbeaver/pro#7023 feat: select affected cell on history change

* dbeaver/pro#7023 feat: add searchReadOnly prop to DataGridTable for conditional read-only state

* dbeaver/pro#7023 refactor: simplify isReadOnly logic in GridSearchPanel

* dbeaver/pro#7023 refactor: use constants for flags

* dbeaver/pro#7023 refactor: update focus and refresh methods in GridSearchPanel

* dbeaver/pro#7023 refactor: consolidate grid search state update logic

* dbeaver/pro#7023 refactor: update scrollToCell method signature and related usages

* dbeaver/pro#7023 refactor: update handleCellChangeBatch to use ICellChange type

* dbeaver/pro#7023 refactor: remove unwanted code

* dbeaver/pro#7023 feat: refactor search functionality to use standalone functions

* dbeaver/pro#7023 feat: implement useDataGridSearch hook to avoid bloating the  DataGrid component with the search-related logic

* dbeaver/pro#7023 feat: update search functionality to use onReplace for cell value updates

* dbeaver/pro#7023 feat: use Activity component for search panel visibility in DataGrid

* dbeaver/pro#7023 refactor: use common value transformation fn in set and setMany methods

* dbeaver/pro#7023 refactor: rename methods for "unnkeyed" cache

* dbeaver/pro#7023 refactor: unify cell edit history handling and remove batch edit references

* dbeaver/pro#7023 fix: update searchReadOnly logic

* dbeaver/pro#7023 refactor: replace rowsCountRef with useState (Error: Cannot access refs during render)

* dbeaver/pro#7023 refactor: expose getCellClassName via useImperativeHandle

Replaced onCellClassNameChange prop + useEffect with useImperativeHandle as suggested in code review. Using useState setter directly as callback ref either caused infinite re-renders (without deps) or lost context synchronization entirely (with stable deps). Settled on useCallback ref that sets both useRef (for method access) and useState (for context propagation).

* dbeaver/pro#7023 fix: Cmd+F not re-focusing the search panel when already open

* dbeaver/pro#7023 refactor:  cell edit history compression

* dbeaver/pro#7023 fix: refresh search state on revert

* dbeaver/pro#7023 refactor: move focus blocking during replace into grid component

Previously DataGridTable checked isReplacing() before syncing
focus/selection, leaking grid internals
Now the grid's selectCell blocks during replacing internally and
supports deferred mode (setTimeout + rAF) for post-render focus sync.

* dbeaver/pro#7023 refactor: restructure grid search logic with useReducer and improve state management

* dbeaver/pro#7023 refactor: improve grid search

moved ref synchronization out of render,
unified search+scroll into one shared path,
added a SET_MATCHES no-op guard to reduce unnecessary updates,
removed duplicate open=false persistence from useDataGridSearch (single owner now in useGridSearch).

* dbeaver/pro#7023 refactor: update search state types

* dbeaver/pro#7023 refactor: restructure grid search state interfaces for improved clarity

* dbeaver/pro#7023 refactor: optimize match retrieval logic after removal in grid search

* dbeaver/pro#7023 refactor: sync refs and computed props in one effect

* dbeaver/pro#7023 fix: Esc double handling between SearchPanel and CaptureView hotkeys

* dbeaver/pro#7023 refactor: fix review comments in useGridSearch

* dbeaver/pro#7023 refactor: unify hotkey stop propagation via shared EventContext/EventStopPropagationFlag

* dbeaver/pro#7023 refactor: pass reactive cellText to useGridSearch

* dbeaver/pro#7023 refactor: update grid search reducer actions and navigation logic

reuse SET_ACTIVE_MATCH and computeActiveMatchIdx for consistency

* dbeaver/pro#7023 refactor: improve equality check for cell matches

* dbeaver/pro#7023 feat: implement cell change tracking subscriptions and cleanup logic

* dbeaver/pro#7023 refactor: remove redundant clearTrackedCellSubscriptions

Cleanup implemented in useTrackedGridSearchCellSubscriptions hook

* dbeaver/pro#7023 fix: cancel stale deferred selectCell to prevent infinite focus loop

When multiple rows are deleted, competing deferred selectCell timeouts
cause focusSyncRef mismatch and endless focus-change cycle.

* dbeaver/pro#7023 fix: update keyboard shortcut for search to use 'KeyF'

* dbeaver/pro#7023 feat: make search disabled by default

* dbeaver/pro#7023 fix: layout

* dbeaver/pro#7023 fix: update scrollBox selection method in Table component

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
Co-authored-by: Viktor Kirst <viktor.kirst@dbeaver.com>
Co-authored-by: sergeyteleshev <iamsergeyteleshev@gmail.com>
2026-03-17 17:28:02 +01:00
Sychev Andreyandmr-anton-t 4178826ff4 7855 cb add setting use the users os formatting for numbersdates (#4020)
* dbeaver/pro#7855 feat: Add setting to use the user's OS formatting for numbers and dates

* dbeaver/pro#7855 refactor: update OS formatting option value in DataGridSettingsService

* dbeaver/pro#7855 feat: implement OS formatting for date and time in DataGrid

* dbeaver/pro#7855 feat: implement user-specific formatting for numbers in DataGrid

* dbeaver/pro#7855 feat: add translations

* dbeaver/pro#7855 style: update date formatter

* dbeaver/pro#7855 feat: add locale-specific formatting options for DataGrid settings

* dbeaver/pro#7855 feat: add support for locale-specific formatting with regions

* dbeaver/pro#7855 refactor: move date type detection to the grid level

* dbeaver/pro#7855 refactor: simplify cell formatter selection logic

* dbeaver/pro#7855 refactor: move formatting to a separate context

* dbeaver/pro#7855 refactor: optimize extended date kind retrieval logic

* dbeaver/pro#7855 fix: tw class names

* dbeaver/pro#7855 refactor: change caching mechanism and other improvements

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2026-01-13 18:29:48 +08:00
Sychev Andrey fdb4894ae4 dbeaver/pro#7940 feat: add helper function to get localized display names (#4029) 2026-01-06 01:01:45 +08:00
sergeyteleshevandmr-anton-t 78daa21c87 [CB] update frontend deps (#3973)
* dbeaver/pro#7748 updates yarn.locks

* fixes incorrect types

* updates helper libs

* updates vitest + fixes test cases incorrect mocks

* runs tests sequentially with document and windows objects to prevent mock collisions

* Revert "runs tests sequentially with document and windows objects to prevent mock collisions"

This reverts commit f871837df3.

* skips download test

* removes export from resetDeprecatedSettings

* updates react-data-grid to beta-59 and react to 19.2

* updates storybook

* pr fixes

* updates yarn lock

* removes skip for download test

* cleanups download ts with empty body html

* updates vitest for core-connections

* updates yarn.lock

* linter fix + mocks once

* fixes hotkeys

* reverts version of react-hotkeys-hook library

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-12-18 12:49:11 +01:00
5e11a1d0b1 dbeaver/pro#6987 replace regex with js (#3954)
* dbeaver/pro#6987 replace regex with js

* dbeaver/pro#6987 update lock file

* dbeaver/pro#6987 add additional deps for testing

* dbeaver/pro#6987 use first index

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
2025-12-11 22:36:43 +08:00
24b7b6021d Add reorder option to tabs #4583 (#3872)
* dbeaver/pro#4583 feat: add tab reordering functionality in NavigationTabsService

* dbeaver/pro#4583 feat: update tab filtering to support tabs order

* dbeaver/pro#4583 feat: add tab drag-and-drop functionality and associated tests

* dbeaver/pro#4583 feat: implement tab drag-and-drop functionality

* dbeaver/pro#4583 fix: adjust tab reordering logic to handle dragged tab position correctly

since our reordering logic is duplicating in two components and, moreover, I found a bug in one of the implementations, I decided to put all the common logic to a dedicated helper with test coverage to be sure we use the right logic everywhere.

* dbeaver/pro#4583 test: remove redundant tests for onReorder in useTabDragAndDrop

* dbeaver/pro#4583 refactor: update reorderTab method to remove return value

* dbeaver/pro#4583 feat: add tab reordering functionality to SqlResultTabs component

* dbeaver/pro#4583 feat: add tabs order persistence via useUserData hook

* dbeaver/pro#4583 feat: integrate react-dnd for tab drag-and-drop functionality

* dbeaver/pro#4583 chore: update deps

* dbeaver/pro#4583 feat: integrate @dbeaver/js-helpers for array reordering in useHeaderDnD

* dbeaver/pro#4583 refactor: simplify reorderArray implementation by extracting some logic to helpers

* dbeaver/pro#4583 refactor: extracted tab reordering to a separate hook

- moved the tab order persistence logic into a new useTabOrderPersistence hook to make the flow is more obvious (we use this default persistence only with tabs container)
- introduced new reorderStateKey tab state to have an identifier for a tab panel, use it in canDrop check to prevent cross-panel DnD
-replaced reorderable prop with reorderStateKey, because without a key you can't use reordering

* dbeaver/pro#4583 refactor: add dropAllowed state to useTabDragAndDrop for improved drag-and-drop UI

* dbeaver/pro#4583 chore: add a comment about reorderStateKey

* dbeaver/pro#4583 refactor: add safe guard in SqlResultTabs.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* dbeaver/pro#4583 refactor: wrap onReorder function into useCallback for improved performance

* dbeaver/pro#4583 refactor: remove applyOrder method from ITabsContainer and update useTabOrderPersistence to not have dependencies on container

* dbeaver/pro#4583 refactor: use refactored hook in SideBarPanel and ToolsPanel

Since we are not mutating a container state anymore, we have to update sorting separately in TabList level because it reads directly from the container.

* dbeaver/pro#4583 refactor: remove fallback for stateKey

* dbeaver/pro#4583 refactor: replace hardcoded values with constants in useTabDragAndDrop

* dbeaver/pro#4583 refactor: add DragPosition type

* dbeaver/pro#4583 refactor: remove dependencies in TabsState effect

* dbeaver/pro#4583 refactor: remove stateKey from useTab hook

* dbeaver/pro#4583 feat: add panelId prop to SideBarPanel and use as persistence key

* dbeaver/pro#4583 refactor: persistence key in useTabOrderPersistence

* dbeaver/pro#4583 feat: add reorderArrayWithOrder helper and update SqlResultTabs to use it

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-11-20 19:25:04 +08:00
9593b7a6c3 dbeaver/pro#7210 feat: color palette (#3854)
* dbeaver/pro#7081 feat: conditional formatting for data editor

* feat: code cleanup after review + reworked rules management

* feat: add SVG icons for conditional formatting and update localization strings

* chore: after review

* feat: refactor conditional formatting presentation and add transition component

* refactor: reorder Props interface fields for consistency

* refactor: remove unused onAddRule prop from ColorScaleRuleForm and SingleColorRuleForm

* feat: add SVG icon for conditional formatting

* fix: charts

* feat: refactor conditional formatting utilities and improve code organization

* fix: localization

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: hide conditional formatting from UI

* dbeaver/pro#7210 feat: color palette

* chore: codestyle

* chore: pr review, use `color` library for manipulating css colors

* chore: revert panel hiding

* chore: localization

* fix: use custom row renderer with mobx observer

* fix: line hightlight style

* chore: remove unused types

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-11-05 13:52:23 +01:00
4f53ece164 dbeaver/pro#6327 refactor: sql editor & vqb (#3742)
* dbeaver/pro#6327 refactor: sql editor & vqb

* fix: state sync

* fix: segment resolution

* chore: add comment

* refactor: remove old code, add todo about problem

* fix: yarn.lock

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
2025-09-23 18:45:45 +08:00
Alexey Potsetsuevandmr-anton-t 65876e9b4e dbeaver/pro#6744 fix: elements order (#3706)
* dbeaver/pro#6744 fix: elements order

* fix: fixate position of elements

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-09-04 02:40:01 +08:00
Alexey Potsetsuev f41b9d24fe dbeaver/pro#6662 chore: cleanup (#3713) 2025-09-02 18:41:49 +08:00