If folder node had not been loaded before the filter is used, we would get into situation that filtering manually expanding this node without children and we would loose the ability to load them by expanding by click(our main flow is to load on expand).
This fix removes the auto expanding on filtering. Now it works similarly to the main navigation tree with filters
* dbeaver/pro#4745 fix: useTreeFilter UX bug
When a user searched for a term (e.g., 're') and found a matching node in the middle of the tree, the user expected to expand that node and see all its children.
But the filter was also being applied to the children, hiding non-matching children. This created a confusing experience where expanding a found node might show empty or partially empty results
In new implementation Tree shows ALL children without filtering if parent node matches filter.
* dbeaver/pro#4745 refactor: update children prop type and usage in AuthenticationProvider
* dbeaver/pro#4745 refactor: replace Loader with Spinner in TreeNodeExpand
* dbeaver/pro#4745 refactor: update typography styles with global typography styles
* dbeaver/pro#4745 feat: add naive tree selection functionality with useTreeSelection hook
* dbeaver/pro#4745 feat: enhance tree selection with loading state management
* dbeaver/pro#4745 feat: add indeterminate selection state management in tree component
* dbeaver/pro#4745 feat: add multiple selection prop in tree component
* dbeaver/pro#4745 refactor: improve indeterminate state management in tree selection
* dbeaver/pro#4745 feat: add expandOnSelect prop to tree and selection hooks
* dbeaver/pro#4745 refactor: adjust padding in CommonDialogHeader styles and fix formatting
* dbeaver/pro#4745 refactor: implement tree selection context for improved node selection management
* dbeaver/pro#4745 style: update padding-left to use CSS variable for treeNodeNested
* dbeaver/pro#4745 refactor: remove redundant state update for empty child nodes in expandNode
It make no sense to close just expanded node if there is no children. User will lost the information about that and could try to open it again later. It's better to keep expanded state to show that this node is empty.
* dbeaver/pro#4745 style: fix lint
* dbeaver/pro#4545 fix: remove useLayoutEffect with focus in TreeNodeControl
This auto focus behavior entailed several bugs like stealing focus from filter input or breaking custom node elements like menu on hover. Decided to remove.
* dbeaver/pro#4745 refactor: make useTreeSelection hook public
* dbeaver/pro#4745 refactor: update tree selection logic and remove unused properties
* dbeaver/pro#4745 refactor: remove async
* dbeaver/pro#4745 refactor: remove duplicated typography styles
* dbeaver/pro#4745 refactor: update selection
* dbeaver/pro#4745 refactor: simplify selection state management in useTreeSelection
* dbeaver/pro#4745 refactor: optimize selection logic in useTreeSelection
* dbeaver/pro#4745 fix: revert children type
* dbeaver/pro#4745 style: lint
* dbeaver/pro#4745 refactor: expose process action from tree node context
* dbeaver/pro#4745 refactor: remove optional showInFilter property from INodeState interface
* dbeaver/pro#4745 refactor: simplify indeterminate state updates and optimize child selection handling
* dbeaver/pro#4745 fix: bug with bad selection state when select with filters
* dbeaver/pro#4745 refactor: update selection context and method names in tree selection
* dbeaver/pro#4745 feat: add disabled prop to Node component
* dbeaver/pro#4745 refactor: remove disabled prop from Node interface
clean unused TreeNodeSelect code
* dbeaver/pro#4745 add action.bound for processAction
* dbeaver/pro#4745 fix: close/deselect node if loading failed
* dbeaver/pro#4745 feat: enhance tree filter functionality with expanded state management
parent nodes are expanded if node matches with filters. When filters are cleared, the tree restores it's unfiltered expand state
* dbeaver/pro#4545 feat: integrate notification service to show errors on load
* dbeaver/pro#4745 fix: don't select empty folders
* Revert "dbeaver/pro#4545 feat: integrate notification service to show errors on load"
This reverts commit c1fd855a94.
* dbeaver/pro#4745 feat: add state transformer to tree filter for expanded state management
---------
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
* СB-6265 sets up vitest instead of jest
* CB-6265 gets back core-utils tests
* СB-6265 gets back react-testing-library tests
* СB-6265 gets back some tests from another plugins
* CB-6265 renames dist -> lib in each plugin + removes all jest from the repo
* CB-6265 disables watch mode so build can go on
* CB-6265 extends tests types for react-testing-library
* CB-6265 reverts dist->lib rename cause it contains other assets also
* CB-6265 moves setupFiles to the vitest.config.ts
* CB-6265 pr fixes
* CB-6265 fixes tests run for Windows
* CB-6265 removes global: true in config + uses jest-dom/vitest lib to have extended expect types
* CB-6565 removes unused deps
* СB-6265 improves performance of the test x10 times
* CB-6265 gets back renderInApp, fixes vitest setup reset config for mocks, cleans up
* CB-6265 reset -> restore all mocks
* CB-6265 fixes unit tests
* CB-6265 vitest.setup.ts cleanup
* CB-6265 timestamp to date shows military time both: on unix and windows (win tests fix)
* CB-6265 improves tests running (sequential run instead of parallel)
* CB-6265 cleanup
* CB-6265 eslint fix
* CB-6265 eslint fix 2
* CB-6265 reverts useCombined handler
* CB-6265 reverts some tests
* CB-6265 removes all redundant timer configs
* Merge branch 'devel' into CB-6265-return-front-unit-tests-after-migration
* CB-6265 pr fixes
* CB-6265 fixes time for windows
* CB-6265 removes default fake timers before each test
* CB-5955 adds create menu (connection, folder)
* CB-5955 hides folder creation for non authorized users
* CB-5955 fixes label
* CB-5955 disable new connection
* CB-5955 shows create actions only for folders and connections nodes
* CB-5955 cleanup
* CB-5955 Add handler to hide create menu when no items are available
* CB-5955 Refactor handler to directly bind elementsTreeActionHandler for folder creation
* CB-5955 pr fixes
* CB-5955 creates connection according to the selected in tree project + tree selection refactor
* CB-5955 reverts old behavior with Generate SQL submenu for connections
* CB-5955 cleanup
* CB-5955 adds connection via menu into any folder
* CB-5955 updates TS references
* CB-5955 cleanup
* CB-5955 pr fixes
* CB-5955 pr fixes
* CB-5955 pr fixes
* CB-5955 cleanup
* CB-5955 fixes bug with dissapeared create connection button at top bar
* CB-5955 pr fixes
---------
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
* CB-3332 refactor: data-viewer shortcuts
move them to the plugin folder, make them IKeyBinding shape to use in transformKeys
* CB-3332 refactor: change ctrl hotkey to mod
* CB-3332 refactor: use new DATA_VIEWER_SHORTCUTS, don't replace backspace
* CB-3332 refactor: remove redundant shortcuts, update naming
* CB-3332 feat: introduce new shortcuts for rows managing
In order to let mac users use shortcuts, Insert key was changed to KeyR
* CB-3332 feat: move shift key to the beginning of all shortcuts
---------
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
* Add or improve Chinese translations
* Add or improve Chinese translations
* chore: Update Chinese translations
* chore: correct some translation
* fix: add mapping for all new zh files
---------
Co-authored-by: 李飞 <lif@tongfun.com>
Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com>
* CB-5340 adds unit tests for basic hooks
* CB-5340 test: trigger github actions
* CB-5340 fixes unit tests
* CB-5340 fixes unit tests
* CB-5340 fixes unit tests
* CB-5340 adds jest moduled imports for unit tests
* CB-5340 adds jest moduled imports for unit tests
* CB-5340 revert some changes
* CB-5340 cleanup
* CB-5340 replaces global jest to moduled
* CB-5340 uncomment tests and skip it
* CB-5340 cleanup
* chore: enable jest globals
* CB-5340 fix unit tests
---------
Co-authored-by: Aleksei Potsetsuev <wrouds@gmail.com>