Commit Graph
13 Commits
Author SHA1 Message Date
07e0c63b6a #5362 refactor: move blob formatter to shared codebase (#3374)
* #5362 refactor: move blob formatter to shared codebase

* #5362 refactor: remove value prop from BlobFormatter

* #5362 refactor: move some of result set value checkers to common

* #5362 feat: update some result set api methods

make value type for safe using unknown instead of any,
added string fallback representation for complex values

* fix: getStringFallbackForComplexValue

* #5362 fix: getStringFallbackForComplexValue always cast to string

* #5362 fix: format

* #5362 chore: update deps

* #5362 fix: double imports

* #5362 fix: yarn lock

* chore: update yarn

* fix: reset yarn lock to devel state

* #5362 ci: change chunking

Previous implementation couldn't handle cyclic dependencies correctly. We noticed it in that ticket because we started to move some logic to common packages and changed existing packages connections. I tried many options to organize chunks from very simple(just putting everything to one bundle) to very complex(by adding helper to find circular deps between modules and putting them to one chunk) but none of them looked ideal. Complex solution is prone to errors, especially with vendor packages. I find this solution at least bearable until Vite ships Rolldown, then we can rethink it one more time.

* #5362 fix: arrow-body-style

* fix: improve chunk splitting

---------

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
Co-authored-by: Wroud <wrouds@gmail.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-04-29 16:39:06 +08:00
Alexey 08346ebc12 dbeaver/pro#5494 feat: refactor tests (#3388)
* dbeaver/pro#5494 feat: refactor tests

* chore: update yarn.lock

* chore: strict build script

* fix: review
2025-04-23 18:18:13 +08:00
08e6d9631f dbeaver/pro#5440 feat: display boolean as checkbox in grid (#3372)
* dbeaver/pro#5440 feat: display boolean as checkbox in grid

* #5440 refactor: make checkboxes disabled inside grid

It's a very strange UX when checkbox is inside a cell of a table and behaves like a real one. It's much more expected when only cell takes focus and checkbox only represents the value in a way we want without acting like a real input. Moreover, using Focusable component enables smooth toggling between all 3 states of a boolean cell from a keyboard.

* #5440 fix: remove inline padding

* #5440 feat: add hover effect for boolean formatter

* #5440 refactor: revert full width

* #5440 refactor: split onClick and onKeyDown interfaces

* #5440 fix: return onClick

---------

Co-authored-by: Andrey Sychev <nukemoore@gmail.com>
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
2025-04-14 22:42:44 +08:00
sergeyteleshev 143cbb0d88 Cb 6265 Return front unit tests after migration (#3338)
* С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
2025-04-14 18:48:33 +08:00
Alexeyandmr-anton-t 9c3cc17bd9 dbeaver/pro#5394 feat: null and boolean formatter for base grid (#3359)
* dbeaver/pro#5394 feat: null and boolean formatter for base grid

* feat: reuse base grid formatters

* chore: try to adjust workflow concurrency

* chore: trigger workflow

* chore: trigger workflow cancel

* chore: fix label styles

---------

Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-04-09 15:06:32 +08:00
164b59b37a CB 6296 Delete row shortcut not working (#3340)
* CB-6296 fix: delete keystroke marks selected row for deletion

* CB-6296 fix: focus first element on load, remove extra handler

It was noticed that just after the open, onKeyDown event doesn't reach DataGrid, because focus was not in sync with lib.
Also fixes CB-6229 since they have the same root problem with encountered bag

* CB-6286 refactor: change onCellKeyDown handler interface inside DataGridProps

* CB-6296 refactor: set initial focus differently

* CB-6296 refactor: remove manual scroll control

We use grid inner scrollToCell method and don't need additional native scrolling

* refactor: don't expose inner data-grid type

---------

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
Co-authored-by: Alexey <wrouds@gmail.com>
2025-03-28 23:01:58 +08:00
Sychev Andrey 348d6b3161 [#113] Add clsx dependency to UI kit (#3335)
* chore: add clsx dependency to ui-kit

* chore: import clsx from ui-kit

* refactor: use clsx for class management in Button

* refactor: use clsx in Checkbox

* refactor: use clsx in Input component

* feat: use clsx in radio and radiogroup

* feat: use clsx in Select component

* feat: reexport VisuallyHidden and Focus trap components from ariakit
2025-03-27 20:02:00 +08:00
Alexey 080317d710 dbeaver/dbeaver-vscode#83 refactor: data grid (#3265)
* dbeaver/dbeaver-vscode#83 refactor: data grid

* chore: try to fix build scripts

* chore: commit artifacts

* chore: update yarn.lock

* fix: adjust grid auto-sizing

* chore: fix prettier

* chore: add documentation about typescript crashes

* fix: cell menu

* fix: grid inline editor styles

* fix: cell menu styles

* fix: cell items alignment

* fix: data sync

* feat: support reactive values in grid

* chore: try to fix strange build bug

* chore: restore original file name

* fix: add specific to inline editor styles

* fix: remove delete row shortcut (not working)

* chore: enable common cache
2025-02-26 01:04:03 +08:00
a76dc9cdbf CB-6219 refactor: migrate to react 19 (#3252)
* CB-6219 refactor: migrate to react 19

* chore: tune backend build

* chore: fix loaders

---------

Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
2025-02-12 00:55:20 +08:00
2fc9c72908 dbeaver/dbeaver-vscode#77 refactor: yarn & vit migration (#3229)
* dbeaver/vscode#77 refactor: yarn & vit migration

* chore: configure eslint & typescript & prettier

* fix: chunk splitting & assets loading

* fix: enable corepack

* refactor: dev environment

* chore: remove corepack enable from build scripts

* chore: make script executable

* fix: SSL check in vite dev

* chore: update debug launch configs

---------

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-02-05 00:20:23 +08:00
Alexey 6ad148850d refactor: migrate to pure esm CB-5684 (#2929)
* refactor: migrate to pure esm

* chore: revert `useDefineForClassFields` tsconf

* chore: remove patch.js
2024-09-21 07:06:37 +03:00
b48684b65d CB-3823 refactor: introduce service provider (#2774)
* CB-3823 refactor: introduce service provider

* CB-3823 fix: tests

* CB-5361 api for db tools

* CB-3823 feat: table group

* CB-3823 feat: connection tools resource

* CB-3823 refactor: database result action

* CB-3823 feat: session manager

* CB-3823 fix: data viewer error tracking

* CB-5361 add tools for rm admin

* CB-3823 fix: review

* CB-5361 fixes after review

* CB-5361 add comment

* CB-5361 fix permissions

* CB-3823 fix: service provider

* CB-3823 fix: useController services fallback

---------

Co-authored-by: Ainur <ainur.iagudin@dbeaver.com>
Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com>
2024-07-16 17:38:00 +02:00
9e74f18be3 CB-5338 simplify data grid styling logic (#2762)
* CB-5338 simplify data grid styling logic

* CB-5338 do not inherit color scheme from react data grid

* CB-5338 remove DataGridContainer

* CB-5338 sync focus status

* CB-5338 review fixes

---------

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>
2024-07-12 16:00:43 +03:00