Skip to content

Commit bebb374

Browse files
committed
* #RIVS-282 - [Regression] The entire db scanned tooltip is displayed for a sec when clicking on Scan more
* #RIVS-277 - [Regression] Incorrect displaying in white theme
1 parent 31af840 commit bebb374

File tree

9 files changed

+28
-15
lines changed

9 files changed

+28
-15
lines changed

src/webviews/src/components/scan-more/ScanMore.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Tooltip } from 'uiSrc/ui'
77
import styles from './styles.module.scss'
88

99
export interface Props {
10+
loading: boolean
1011
disabled: boolean
1112
text?: string
1213
loadMoreItems?: (config: any) => void
@@ -16,14 +17,15 @@ export interface Props {
1617

1718
export const ScanMore: FC<Props> = ({
1819
disabled,
20+
loading,
1921
text,
2022
loadMoreItems,
2123
}) => (
2224
<div className={styles.container}>
2325
<div className="sidebar-nesting-level" />
24-
<Tooltip content={disabled ? l10n.t('The entire database has been scanned.') : ''}>
26+
<Tooltip content={(disabled && !loading) ? l10n.t('The entire database has been scanned.') : ''}>
2527
<VSCodeButton
26-
disabled={disabled}
28+
disabled={disabled || loading}
2729
data-testid="scan-more"
2830
className={styles.btn}
2931
onClick={loadMoreItems}

src/webviews/src/components/upload-file/styles.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
}
44

55
.uploadBtn {
6-
@apply flex cursor-pointer py-1 items-center;
6+
@apply flex cursor-pointer py-1 items-center text-vscode-foreground;
77
}
88

99
.emptyBtn {

src/webviews/src/modules/add-key/components/AddKeyReJSON/AddKeyReJSON.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const AddKeyReJSON = (props: Props) => {
104104
<MonacoJson
105105
value={ReJSONValue}
106106
onChange={setReJSONValue}
107-
wrapperClassName={!isJsonLoaded ? 'h-[calc(100vh-330px)]' : 'h-[calc(100vh-300px)]'}
107+
wrapperClassName={!isJsonLoaded ? 'h-[calc(100vh-340px)]' : 'h-[calc(100vh-300px)]'}
108108
disabled={loading}
109109
data-testid="json-value"
110110
/>

src/webviews/src/modules/keys-tree/components/database-wrapper/DatabaseWrapper.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Database, checkConnectToDatabase, deleteDatabases, useSelectedKeyStore
1919
import DatabaseOfflineIconSvg from 'uiSrc/assets/database/database_icon_offline.svg?react'
2020
import DatabaseActiveIconSvg from 'uiSrc/assets/database/database_icon_active.svg?react'
2121
import { PopoverDelete } from 'uiSrc/components'
22-
import { RefreshBtn } from 'uiSrc/ui'
22+
import { RefreshBtn, Tooltip } from 'uiSrc/ui'
2323
import { useKeysApi, useKeysInContext } from '../../hooks/useKeys'
2424

2525
import styles from './styles.module.scss'
@@ -141,10 +141,17 @@ export const DatabaseWrapper = ({ children, database }: Props) => {
141141
{showTree && (<DatabaseActiveIconSvg className={styles.icon} />)}
142142
{!showTree && (<VscChevronRight className={cx(styles.icon, styles.iconNested)} />)}
143143
{!showTree && (<DatabaseOfflineIconSvg className={styles.icon} />)}
144-
<div className={styles.databaseName}>
145-
<div className="truncate">{name}</div>
146-
<div>{getDbIndex(database.db)}</div>
147-
</div>
144+
<Tooltip
145+
content={formatLongName(name, 100, 20)}
146+
position="bottom center"
147+
keepTooltipInside={false}
148+
mouseEnterDelay={1000}
149+
>
150+
<div className={styles.databaseName}>
151+
<div className="truncate">{name}</div>
152+
<div>{getDbIndex(database.db)}</div>
153+
</div>
154+
</Tooltip>
148155
</div>
149156
<div className="flex pr-3.5">
150157
{showTree && (

src/webviews/src/modules/keys-tree/components/keys-tree-filter/KeyTreeFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const KeyTreeFilter = () => {
119119
<Select
120120
options={sortOptions}
121121
idSelected={typeSelected}
122-
containerClassName="select-without-border min-w-1 w-full"
122+
containerClassName="min-w-1 w-full"
123123
onChange={onChangeType}
124124
testid="tree-view-filter-select"
125125
/>

src/webviews/src/modules/keys-tree/components/keys-tree-header/KeysTreeHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export const KeysTreeHeader = ({ database }: Props) => {
4545
/>
4646
{isShowScanMore(scanned, total, nextCursor) && (
4747
<ScanMore
48-
disabled={loading || isDisableScanMore(scanned, total, nextCursor)}
48+
loading={loading}
49+
disabled={isDisableScanMore(scanned, total, nextCursor)}
4950
loadMoreItems={loadMoreItems}
5051
text={l10n.t('({0}{1} Scanned)', notAccurateScanned, numberWithSpaces(scannedDisplay))}
5152
/>

src/webviews/src/styles/base/_select.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ vscode-dropdown {
1111
}
1212

1313
.database-form-select {
14-
@apply bg-vscode-input-background h-9;
14+
@apply h-9;
1515

1616
&__option {
17-
@apply bg-vscode-input-background h-9 pl-2 items-center text-vscode-foreground #{!important};
17+
@apply h-9 pl-2 items-center text-vscode-foreground #{!important};
1818
}
1919

2020
&::part(listbox) {

src/webviews/src/ui/select/styles.module.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
}
1616

1717
.option {
18-
@apply min-w-[80px];
18+
@apply min-w-[80px] bg-vscode-input-background;
19+
20+
&:hover {
21+
background-color: var(--vscode-sideBarTitle-background);
22+
}
1923
}
2024

2125
:global{

src/webviews/src/ui/text-area/styles.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ $inputMinWidth: 100px;
55
.input {
66
@apply bg-vscode-input-background text-vscode-input-foreground border-vscode-input-border focus:border-vscode-inputOption-activeBorder outline-none p-3 border-solid border;
77

8-
border-color: transparent;
98
border-radius: $cornerRadiusRound;
109
min-width: $inputMinWidth;
1110
}

0 commit comments

Comments
 (0)