Commit Graph
6 Commits
Author SHA1 Message Date
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
cdae6efbd2 dbeaver/pro#7081 feat: conditional formatting for data editor (#3838)
* 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

* 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-03 19:11:50 +08:00
sergeyteleshevandmr-anton-t 75e9da4705 [CB] Grid - unable to resize multiple columns in wide tables (#3783)
* dbeaver/pro#6667 patches react-data-grid columns widths on cloudbeaver side

* fixes: auto resize columns should not be resized + column resize do not triggers resize of other oversized columns

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-09-30 02:25:23 +08:00
d0e86745f1 dbeaver/pro#6520 fix: header cell layout (#3759)
* dbeaver/pro#6520 fix: header cell layout

* dbeaver/pro#6520 refactor: table cell always shows 2 rows

* dbeaver/pro#6520 fix: use two rows grid only if a table has any description

---------

Co-authored-by: sergeyteleshev <iamsergeyteleshev@gmail.com>
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
2025-09-24 16:30:59 +08:00
sergeyteleshev d4e2f2365a [CB] application freezes during loading on heavy resultsets (ORIGINAL FIX) (#3717)
* dbeaver/pro#6731 enables virtualization always

* removes default virtualization prop

* [CB] application freezes during loading on heavy resultsets (OPTIONAL FIXES) (#3715)

* dbeaver/pro#6731 adds some optimizations

* cleanup

* pr fixes

* cleanup

* removes optimizations

* linter fixes
2025-09-10 21:06:54 +08:00
Alexey Potsetsuev f41b9d24fe dbeaver/pro#6662 chore: cleanup (#3713) 2025-09-02 18:41:49 +08:00