Skip to content

Commit 9716a69

Browse files
authored
feat!: update to uikit7 (#2544)
1 parent 7fca511 commit 9716a69

File tree

94 files changed

+820
-643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+820
-643
lines changed

package-lock.json

Lines changed: 262 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
"@bem-react/classname": "^1.6.0",
1414
"@ebay/nice-modal-react": "^1.2.13",
1515
"@gravity-ui/axios-wrapper": "^1.5.1",
16-
"@gravity-ui/chartkit": "^5.20.0",
17-
"@gravity-ui/components": "^3.13.2",
18-
"@gravity-ui/date-components": "^2.11.0",
16+
"@gravity-ui/chartkit": "^7.0.1",
17+
"@gravity-ui/components": "^4.4.0",
18+
"@gravity-ui/date-components": "^3.2.3",
1919
"@gravity-ui/date-utils": "^2.5.6",
2020
"@gravity-ui/i18n": "^1.7.0",
21-
"@gravity-ui/icons": "^2.12.0",
22-
"@gravity-ui/illustrations": "^2.0.0",
23-
"@gravity-ui/navigation": "^2.30.0",
24-
"@gravity-ui/paranoid": "^2.0.1",
21+
"@gravity-ui/icons": "^2.13.0",
22+
"@gravity-ui/illustrations": "^2.1.0",
23+
"@gravity-ui/navigation": "^3.3.9",
24+
"@gravity-ui/paranoid": "^3.0.0",
2525
"@gravity-ui/react-data-table": "^2.2.1",
26-
"@gravity-ui/table": "^1.7.0",
27-
"@gravity-ui/uikit": "^6.40.0",
26+
"@gravity-ui/table": "^1.10.1",
27+
"@gravity-ui/uikit": "^7.16.2",
2828
"@gravity-ui/unipika": "^5.2.1",
2929
"@gravity-ui/websql-autocomplete": "^13.7.0",
3030
"@hookform/resolvers": "^3.10.0",
@@ -59,7 +59,7 @@
5959
"use-query-params": "^2.2.1",
6060
"uuid": "^10.0.0",
6161
"web-vitals": "^1.1.2",
62-
"ydb-ui-components": "^4.7.0",
62+
"ydb-ui-components": "^5.0.0",
6363
"zod": "^3.24.1"
6464
},
6565
"scripts": {
@@ -117,8 +117,7 @@
117117
"testEnvironment": "jsdom",
118118
"moduleNameMapper": {
119119
"\\.(css|less|scss|sass)$": "jest-transform-css",
120-
"^axios$": "axios/dist/node/axios.cjs",
121-
"^@gravity-ui/uikit/toaster-singleton-react-18$": "@gravity-ui/uikit/build/cjs/toaster-singleton-react-18.js"
120+
"^axios$": "axios/dist/node/axios.cjs"
122121
}
123122
},
124123
"browserslist": [

playwright.config.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ const config: PlaywrightTestConfig = {
3535
projects: [
3636
{
3737
name: 'chromium',
38-
use: {...devices['Desktop Chrome']},
38+
use: {
39+
...devices['Desktop Chrome'],
40+
contextOptions: {permissions: ['clipboard-read', 'clipboard-write']},
41+
},
3942
},
4043
{
4144
name: 'safari',
42-
use: {...devices['Desktop Safari']},
45+
use: {
46+
...devices['Desktop Safari'],
47+
contextOptions: {permissions: ['clipboard-read']},
48+
},
4349
},
4450
],
4551
};

src/components/AutoRefreshControl/AutoRefreshControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function AutoRefreshControl({className, onManualRefresh}: AutoRefreshCont
2727
dispatch(api.util.invalidateTags(['All']));
2828
onManualRefresh?.();
2929
}}
30-
extraProps={{'aria-label': i18n('Refresh')}}
30+
aria-label={i18n('Refresh')}
3131
>
3232
<Button.Icon>
3333
<ArrowsRotateLeft />

src/components/CellWithPopover/CellWithPopover.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
overflow: hidden;
1313

1414
max-width: 100%;
15+
padding: var(--g-spacing-4);
1516

1617
vertical-align: middle;
1718
white-space: nowrap;
@@ -25,4 +26,7 @@
2526
width: 100%;
2627
}
2728
}
29+
&__children-wrapper {
30+
cursor: pointer;
31+
}
2832
}

src/components/CellWithPopover/CellWithPopover.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import React from 'react';
2+
13
import {Popover} from '@gravity-ui/uikit';
24
import type {PopoverProps} from '@gravity-ui/uikit';
35

@@ -7,9 +9,10 @@ import './CellWithPopover.scss';
79

810
const b = cn('ydb-cell-with-popover');
911

10-
interface CellWithPopoverProps extends PopoverProps {
12+
interface CellWithPopoverProps extends Omit<PopoverProps, 'children'> {
1113
wrapperClassName?: string;
1214
fullWidth?: boolean;
15+
children: React.ReactNode;
1316
}
1417

1518
const DELAY_TIMEOUT = 100;
@@ -24,12 +27,12 @@ export function CellWithPopover({
2427
return (
2528
<div className={b({'full-width': fullWidth}, wrapperClassName)}>
2629
<Popover
27-
delayClosing={DELAY_TIMEOUT}
28-
delayOpening={DELAY_TIMEOUT}
30+
openDelay={DELAY_TIMEOUT}
31+
closeDelay={DELAY_TIMEOUT}
2932
className={b('popover', {'full-width': fullWidth}, className)}
3033
{...props}
3134
>
32-
{children}
35+
<div className={b('children-wrapper')}>{children}</div>
3336
</Popover>
3437
</div>
3538
);

src/components/ConnectToDB/ConnectToDBDialog.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import NiceModal from '@ebay/nice-modal-react';
4-
import {Dialog, Tabs} from '@gravity-ui/uikit';
4+
import {Dialog, Tab, TabList, TabProvider} from '@gravity-ui/uikit';
55
import {skipToken} from '@reduxjs/toolkit/query';
66

77
import {tenantApi} from '../../store/reducers/tenant/tenant';
@@ -65,14 +65,15 @@ function ConnectToDBDialog({
6565
<Dialog.Header caption={i18n('header')} />
6666
<Dialog.Body>
6767
<div>{i18n('connection-info-message')}</div>
68-
<Tabs
69-
size="m"
70-
allowNotSelected={false}
71-
activeTab={activeTab}
72-
items={connectionTabs}
73-
onSelectTab={(tab) => setActiveTab(tab as SnippetLanguage)}
74-
className={b('dialog-tabs')}
75-
/>
68+
<TabProvider value={activeTab}>
69+
<TabList className={b('dialog-tabs')}>
70+
{connectionTabs.map(({id, title}) => (
71+
<Tab key={id} value={id} onClick={() => setActiveTab(id)}>
72+
{title}
73+
</Tab>
74+
))}
75+
</TabList>
76+
</TabProvider>
7677
<div className={b('snippet-container')}>
7778
<LoaderWrapper loading={isTenantDataLoading}>
7879
<YDBSyntaxHighlighterLazy

src/components/ContentWithPopup/ContentWithPopup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const ContentWithPopup = ({
4242
return (
4343
<React.Fragment>
4444
<Popup
45-
anchorRef={anchor}
45+
anchorElement={anchor.current}
4646
open={isPinned || isPopupVisible}
4747
placement={placement}
4848
hasArrow={hasArrow}

src/components/CopyLinkButton/CopyLinkButton.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import {Link} from '@gravity-ui/icons';
4-
import type {ButtonProps, CopyToClipboardStatus} from '@gravity-ui/uikit';
4+
import type {ButtonButtonProps, CopyToClipboardStatus} from '@gravity-ui/uikit';
55
import {ActionTooltip, Button, CopyToClipboard, Icon} from '@gravity-ui/uikit';
66

77
import {cn} from '../../utils/cn';
@@ -12,8 +12,7 @@ import './CopyLinkButton.scss';
1212

1313
const b = cn('ydb-copy-link-button');
1414

15-
interface LinkButtonComponentProps extends ButtonProps {
16-
size?: ButtonProps['size'];
15+
interface LinkButtonComponentProps extends ButtonButtonProps {
1716
hasTooltip?: boolean;
1817
status: CopyToClipboardStatus;
1918
closeDelay?: number;
@@ -43,7 +42,7 @@ const LinkButtonComponent = (props: LinkButtonComponentProps) => {
4342
);
4443
};
4544

46-
export interface CopyLinkButtonProps extends ButtonProps {
45+
export interface CopyLinkButtonProps extends ButtonButtonProps {
4746
text: string;
4847
}
4948

src/components/CriticalActionDialog/CriticalActionDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function CriticalActionDialog<T>({
161161
className={b()}
162162
size="s"
163163
onClose={onClose}
164-
onTransitionExited={handleTransitionExited}
164+
onTransitionOutComplete={handleTransitionExited}
165165
>
166166
{renderDialogContent()}
167167
</Dialog>

0 commit comments

Comments
 (0)