In previous ticket CB-5555 we fixed cursor position on undo/redo actions by adding a check that if selection was not set. In that case we put the cursor to the end of inserted text. Due to previous fixes in CB-4134 we don't set a selection if cursor don't change it's position and initially it's 0. So our check from 5555 is being fired on initially opened script and cursor goes to the end.
To avoid that situation, this solution introduces a new isInitialScriptOpening flag that is used to check the first insertion.
When initially opening a script, the cursor will stay at the position where we explicitly set it (e.g., position 0).
After the first actual content change, the flag isInitialScriptOpening gets set to false.
Subsequent changes will then follow the normal cursor behavior (moving to end when there are changes but no explicit cursor position).
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
* dbeaver/pro#6472 fix: restore focus after menu actions and on syncFocus
* dbeaver/pro#6472 refactor: revert changes with using restoreFocus function from context
* dbeaver/pro#6472 fix: delete row from a context menu works as with a hotkey
set to null and revert also keep focus in place
* Revert "dbeaver/pro#6472 fix: delete row from a context menu works as with a hotkey"
This reverts commit f54abf3956.
---------
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
* dbeaver/pro#6253 fix: set disable state for checkbox respecting readonly
There was a bug in UiKitCheckbox props which rewrites disabled state using only disabled prop.
* dbeaver/pro#6253 fix: remove redundant readonly property in Options
First of all, Radio doesn't support readonly attribute. Moreover, we don't render this RadioGroup when condition in readonly prop is true.
---------
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
* dbeaver/pro#6557 refactor: remove redundant width: 100%
There are a few reasons why we don't need this property:
0. It's already present in base Select styles
1. Select component is flex container by default, i.e. takes all available place
2. No evidences that it is needed
* dbeaver/pro#6557 fix: user filters selects
Simplifies layout and set min width for selects
---------
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
* dbeaver/pro#6189 feat: group extra tools
* fix: context menu size
* fix: make context menu more compact
* fix: context menu shortcuts
* fix: change color for shortcuts in context menu
* fix: codestyle
* fix: revert more tools
* fix: submenu arrow position
* fix: show output
* fix: upload / download tooltips
---------
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
* dbeaver/pro#6283 feat: add simple Combobox implementation
It has fuzzy search inside to filter items.
* dbeaver/pro#6283 feat: implement Combobox component with search functionality and update related files
* dbeaver/pro#6283 refactor: remove unused onChange prop
* dbeaver/pro#6283 style: update imports in Combobox component
* dbeaver/pro#6283 feat: update styles, add popoverClassName prop
* dbeaver/pro#6283 refactor: keep Combobox composable for better control
* dbeaver/pro#6283 refactor: SRP in Combobox, split provider and components
* dbeaver/pro#6283 feat: implement advanced search
see AdvancedSearch example in stories
* dbeaver/pro#6283 refactor: use strict comparison
* dbeaver/pro#6283 refactor: replace fuzzy search with standard string search
* dbeaver/pro#6283 refactor: simplify Combobox component
* dbeaver/pro#6283 feat: add value formatter for ComboboxInput
It might be useful for cases when value is not in user friendly format. Combobox doesn't support such transformations from the box
Updated examples, added valueFormatter to advanced search, added MultiSelect example
* dbeaver/pro#6283 feat: sync styles with select
* dbeaver/pro#6283 fix: formatter
* dbeaver/pro#6283 fix: respect the user's reduce motion preference
* dbeaver/pro#6283 refactor: simplify component
remove search context,
use some built-in features for input value manipulations and for auto selection of the first item
* dbeaver/pro#6283 refactor: use tailwind for Field styles
* dbeaver/pro#6283 fix: should open all options on first interaction with any value
* dbeaver/pro#6283 refactor: strip Combobox component
Due to difficulties with items and search value managing in Combobox using only native combobox store, it was decided to move all that logic to CloudBeaver combobox component.
This commit removes all the logic from UIKit Combobox and partially restores it in Cloudbeaver Combobox
* dbeaver/pro#6283 feat: show no results when no items
* dbeaver/pro#6283 feat: restore input to the last valid value
* dbeaver/pro#6283 refactor: simplify restore input logic
* dbeaver/pro#6283 refactor: reset input value on blur
* dbeaver/pro#6283 refactor: don't sent input value on item click
* dbeaver/pro#6283 refactor: remove getComputed for filteredItems
getComputed will not work as expected for not primitive values( for example, for arrays)
* dbeaver/pro#6283 refactor: remove getComputed for filteredItems
* dbeaver/pro#6283 style: update z-index for ComboboxPopover component
our backdrop component has 999 z-index(weird?), we need more to show popover in modals
* dbeaver/pro#6283 feat: put CB Combobox near the component, fix layers issue
* dbeaver/pro#6283 fix: radio title wrap
* dbeaver/pro#6283 fix: use the same letter spacing as in other inputs
* dbeaver/pro#6283 fix:combobox item styles
* dbeaver/pro#6283 fix: clear value on click
this fix is for situation when user started to type a word, found an option and clicked on it. Previously we didn't clear value and just setSelectedValue on click. This fix clears value as it happens onBlur and we use the value from selectedItem.
---------
Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
* dbeaver/pro#5968 refactor: update dark theme styles
introduces new theme variable link-color which with a color which is used for coloring anchor elements in our app
adjust this color in dark theme to have better contrast with a background, use this color in secondary button for the same reasons
* dbeaver/pro#5968 fix: adjust dark theme color values for improved contrast
* dbeaver/pro#5968 fix: update negative color in dark theme
* dbeaver/pro#5968 fix: update negative color in dark theme
---------
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
* dbeaver/pro#6061 fix: remove extra comma in ru l10n
* dbeaver/pro#6061 fix: make Cell component accessible
* dbeaver/pro#6061 fix: use proper product doc page
* dbeaver/pro#6061 fix: Cell component layout
* dbeaver/pro#6061 refactor: split Cell component interface for better dx
* Revert "dbeaver/pro#6061 refactor: split Cell component interface for better dx"
This reverts commit 812414f0f1.
* Revert "dbeaver/pro#6061 fix: make Cell component accessible"
This reverts commit 09aff9b08a.
* dbeaver/pro#6061 refactor: restrict using onClick on Cell component
force to use composition instead
* dbeaver/pro#6061 feat: generate a link to specific product version docs
* dbeaver/pro#6061 fix: use arg in all l10n files
* dbeaver/pro#6061 refactor: extract version handling logic for documentation URLs
---------
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
* dbeaver/pro#6469 corrects enable https mode translation and switch position in server config form
* adds link for proxy configuration article
* fixes punctuation for ru locale
* updates description translations
* removes extra dot in ru locale
* adds advanced documentation link
---------
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
removes RadioGroupContext(radio group/radio use their own provider)
removes all the logic of state changing from Radio component since it's creating a wrong understanding of how these components should be used together with RadioGroup. Radio still can be controllable, but it should be used in most scenarios only with RadioGroup which is controlling the state.
simplify styles by removing extra class
Co-authored-by: Evgenia <139753579+EvgeniaBzzz@users.noreply.github.com>
* dbeaver/pro#2951 Emit WSUserDisabledEvent after disabling a user
* dbeaver/pro#2951 Close user sessions on WSUserDisabledEvent
* dbeaver/pro#2951 Unify session termination logic for deleted and disabled users
* dbeaver/pro#6436 initializes unit tests for common-react
* installs common-react in the scripts
* adds @dbeaver/react-tests
* setups @dbeaver/react-test into tests-runner
* implements react-testing library into @dbeaver/react-tests
* removes unused deps
* adds test for frontend build github action