Skip to content

Commit eac76af

Browse files
authored
feat(Healthcheck): redesign (#2348)
1 parent a8c5b11 commit eac76af

File tree

73 files changed

+2070
-661
lines changed

Some content is hidden

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

73 files changed

+2070
-661
lines changed

src/components/Drawer/Drawer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ interface DrawerPaneContentWrapperProps {
3232
detectClickOutside?: boolean;
3333
defaultWidth?: number;
3434
isPercentageWidth?: boolean;
35+
hideVeil?: boolean;
3536
}
3637

3738
const DrawerPaneContentWrapper = ({
@@ -45,6 +46,7 @@ const DrawerPaneContentWrapper = ({
4546
className,
4647
detectClickOutside = false,
4748
isPercentageWidth,
49+
hideVeil = true,
4850
}: DrawerPaneContentWrapperProps) => {
4951
const [drawerWidth, setDrawerWidth] = React.useState(() => {
5052
const savedWidth = localStorage.getItem(storageKey);
@@ -113,7 +115,7 @@ const DrawerPaneContentWrapper = ({
113115
<GravityDrawer
114116
onEscape={onClose}
115117
onVeilClick={onClose}
116-
hideVeil
118+
hideVeil={hideVeil}
117119
className={b('container', className)}
118120
>
119121
<DrawerItem
@@ -156,6 +158,7 @@ interface DrawerPaneProps {
156158
drawerControls?: DrawerControl[];
157159
title?: React.ReactNode;
158160
headerClassName?: string;
161+
hideVeil?: boolean;
159162
}
160163

161164
export const DrawerWrapper = ({
@@ -173,6 +176,7 @@ export const DrawerWrapper = ({
173176
drawerControls = [],
174177
title,
175178
headerClassName,
179+
hideVeil,
176180
}: DrawerPaneProps) => {
177181
React.useEffect(() => {
178182
return () => {
@@ -220,6 +224,7 @@ export const DrawerWrapper = ({
220224
<React.Fragment>
221225
{children}
222226
<DrawerPaneContentWrapper
227+
hideVeil={hideVeil}
223228
isVisible={isDrawerVisible}
224229
onClose={onCloseDrawer}
225230
drawerId={drawerId}

src/containers/Storage/EmptyFilter/EmptyFilter.tsx renamed to src/components/EmptyFilter/EmptyFilter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Button} from '@gravity-ui/uikit';
22

3-
import {EmptyState} from '../../../components/EmptyState';
4-
import {Illustration} from '../../../components/Illustration';
3+
import {EmptyState} from '../EmptyState';
4+
import {Illustration} from '../Illustration';
55

66
import i18n from './i18n';
77

src/containers/Storage/EmptyFilter/i18n/index.ts renamed to src/components/EmptyFilter/i18n/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {registerKeysets} from '../../../../utils/i18n';
1+
import {registerKeysets} from '../../../utils/i18n';
22

33
import en from './en.json';
44
import ru from './ru.json';

src/components/EmptyState/EmptyState.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@use '../../styles/mixins.scss';
22

33
.empty-state {
4+
$block: &;
45
padding: 20px;
56

67
&_size_m {
@@ -13,6 +14,14 @@
1314
'image title'
1415
'image description'
1516
'image actions';
17+
18+
&_size_xs {
19+
width: 321px;
20+
height: 100px;
21+
#{$block}__image {
22+
margin-right: var(--g-spacing-5);
23+
}
24+
}
1625
&_size_s {
1726
width: 460px;
1827
height: 120px;

src/components/EmptyState/EmptyState.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import './EmptyState.scss';
99
const block = cn('empty-state');
1010

1111
const sizes = {
12+
xs: 100,
1213
s: 150,
1314
m: 250,
1415
l: 350,

src/components/EnableFullscreenButton/EnableFullscreenButton.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import {SquareDashed} from '@gravity-ui/icons';
22
import type {ButtonView} from '@gravity-ui/uikit';
3-
import {Button, Icon} from '@gravity-ui/uikit';
3+
import {ActionTooltip, Button, Icon} from '@gravity-ui/uikit';
44

55
import {enableFullscreen} from '../../store/reducers/fullscreen';
66
import {useTypedDispatch} from '../../utils/hooks';
77

8+
import i18n from './i18n';
9+
810
interface EnableFullscreenButtonProps {
911
disabled?: boolean;
1012
view?: ButtonView;
@@ -16,9 +18,11 @@ function EnableFullscreenButton({disabled, view = 'flat-secondary'}: EnableFulls
1618
dispatch(enableFullscreen());
1719
};
1820
return (
19-
<Button onClick={onEnableFullscreen} view={view} disabled={disabled} title="Fullscreen">
20-
<Icon data={SquareDashed} />
21-
</Button>
21+
<ActionTooltip title={i18n('title_fullscreen')}>
22+
<Button onClick={onEnableFullscreen} view={view} disabled={disabled}>
23+
<Icon data={SquareDashed} />
24+
</Button>
25+
</ActionTooltip>
2226
);
2327
}
2428

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"title_fullscreen": "Fullscreen"
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {registerKeysets} from '../../../utils/i18n';
2+
3+
import en from './en.json';
4+
5+
const COMPONENT = 'ydb-fullscreen-button';
6+
7+
export default registerKeysets(COMPONENT, {en});

0 commit comments

Comments
 (0)