Commit Graph
6 Commits
Author SHA1 Message Date
7a8c4a141f [CB] Ability to pin column in the Data Editor (#3794)
* dbeaver/pro#6859 adds pin/unpin methods for data grid

* resets state when pins + makes pin icon stay when pinned

* adds TableHeaderCellIcon component with new Menu

* make actions alive

* cleanup

* moves pin logic into data-viewer

* cleanup

* restructures pin logic via contexts

* cleanup

* synchronizes column ids with view ids so pining works fine

* fixes actions visibility

* fix: correct layout on editing frozen cell

* fixes layout so frozen cell box-shadow can divide pinned and unpinned columns

* fixes border and box shadow interactions for frozen and editing cell

* makes pinned columns non transparent

* makes frozen border 3px and reverts previous style changes

* styles cleanup

* adds column true and visual indexes and reuses it across the data grid features

* cleanup

* reverts removed code

* reverts hacks with ids

* 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

* pr fixes

* code style fix

* dbeaver/pro#6859 adds selectCellByKey for opening editor

* reverts styles

* adds pin/unpin icons

* Revert "reverts styles"

This reverts commit 7857ef672d.

* on add actions sets correct focus

* removes incorrect positioning when editing pinned column

* tunes dark theme colors

* adds DnD to pin/unpin feature

* pr fixes

* fixes multiple selections for pinned & unpinned columns

* refactors multiple selections for pinned & unpinned columns so it uses data-grid api of getting sorted columns

* moves pin logic to usePinnedColumns hook

* moves color styles into data grid

* fixes letter

* adds styles for pinned border only for data editor

* adds unpin all columns action

* moves pinned logic to grid view action to save pinned state between tabs

---------

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: Sychev Andrey <44414066+SychevAndrey@users.noreply.github.com>
2025-12-24 13:44:02 +01: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
sergeyteleshevandmr-anton-t e0cdf745ad [CB] Improve description for ordering icon (#3958)
* dbeaver/pro#7554 adds translation for order button

* moves translate context to render app level + adds 2 translations for the sorting with the flag

* cleanup

* linter fix

* pr fixes

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-12-12 17:53:45 +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
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
Alexey Potsetsuev f41b9d24fe dbeaver/pro#6662 chore: cleanup (#3713) 2025-09-02 18:41:49 +08:00