mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
296e03ec74661e14143e98f66db7d9afa52816cf
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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 |
||
|
|
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
|
||
|
|
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> |
||
|
|
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> |
||
|
|
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> |
||
|
|
f41b9d24fe | dbeaver/pro#6662 chore: cleanup (#3713) |