Skip to content

Commit dea8b2b

Browse files
committed
fix: ui review fixes
1 parent f6463b0 commit dea8b2b

File tree

7 files changed

+32
-10
lines changed

7 files changed

+32
-10
lines changed

playground/src/app/components/C9RComponent.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $block: '.c9r-component';
33
#{$block} {
44
width: 100%;
55
padding: 16px 12px;
6+
box-sizing: border-box;
67

78
&__header {
89
display: flex;

src/editor-v2/components/DynamicForm/FieldBase/FieldBase.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ $block: '.#{$ns}field-base';
66
#{$block} {
77
$class: &;
88
padding: 16px 12px 16px 0;
9-
border-bottom: 1px solid var(--g-color-line-generic);
109

1110
position: relative;
1211
display: flex;

src/editor-v2/components/Tabs/Tabs.scss

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ $block: '.#{$ns}tabs';
1414
font-weight: 500;
1515
letter-spacing: 0.5px;
1616
cursor: pointer;
17+
font-size: var(--g-text-code-inline-1-font-size);
18+
line-height: var(--g-text-code-inline-2-line-height);
19+
align-items: center;
1720

1821
&_active {
1922
pointer-events: none;
@@ -26,15 +29,35 @@ $block: '.#{$ns}tabs';
2629
border-bottom: 1px solid var(--g-color-line-generic);
2730
display: inline-flex;
2831
flex-direction: row;
29-
padding: 16px 4px;
32+
padding: 12px 4px;
3033
flex: 0 0 auto;
3134
box-sizing: border-box;
3235
overflow-x: auto;
36+
position: sticky;
37+
top: 0;
38+
background-color: var(--g-color-base-background);
39+
/* This ensures the background is visible when sticky */
40+
z-index: 2;
41+
/* Higher z-index for parent tabs-wrapper */
42+
}
43+
44+
/* Make sure any nested tabs component also has proper overflow behavior */
45+
#{$block} {
46+
overflow: visible;
47+
48+
/* Ensure nested tabs-wrapper elements are also sticky but positioned below parent tabs-wrapper */
49+
/* This selector specifically targets tabs-wrapper elements inside a nested tabs component */
50+
#{$block} &__tabs-wrapper {
51+
position: sticky;
52+
top: 48.5px;
53+
/* Position below parent tabs-wrapper */
54+
z-index: 1;
55+
background-color: var(--g-color-base-background);
56+
}
3357
}
3458

3559
&__body {
3660
flex: 1;
3761
min-height: 1px;
38-
overflow-y: auto;
3962
}
4063
}

src/editor-v2/containers/BlockConfigForm/BlockConfigForm.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ $padding: 12px;
99
&__title {
1010
@include text-subheader-3;
1111
padding: $padding;
12-
border-bottom: 1px solid var(--g-color-line-generic);
1312
}
1413

1514
&__form {

src/editor-v2/containers/BlocksList/BlocksList.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $block: '.#{$ns}blocks-list';
2121
justify-content: space-between;
2222
text-align: center;
2323
gap: 4px;
24+
max-width: 192px;
2425

2526
&:active {
2627
background-color: var(--g-color-base-generic-hover);
@@ -57,7 +58,7 @@ $block: '.#{$ns}blocks-list';
5758

5859
&-items {
5960
display: grid;
60-
grid-template-columns: 1fr 1fr;
61+
grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
6162
gap: 8px;
6263
}
6364
}

src/editor-v2/containers/GlobalConfig/GlobalConfig.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ $block: '.#{$ns}global-config';
88
padding: 12px;
99
margin-top: 8px;
1010
@include text-subheader-3;
11-
border-bottom: 1px solid var(--g-color-line-generic);
1211
}
1312
}

src/editor-v2/containers/ViewSwitches/ViewSwitches.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import {Display, Eye, Minus, Plus, Smartphone} from '@gravity-ui/icons';
2+
import {Display, Minus, Plus, Smartphone, SquareDashed} from '@gravity-ui/icons';
33
import {Button, Icon, SegmentedRadioGroup, Select} from '@gravity-ui/uikit';
44

55
import {ZOOM_STEPS} from '../../constants';
@@ -26,7 +26,7 @@ interface DeviceOption {
2626
* Available device viewport options
2727
* - Desktop: 100% width
2828
* - Tablet: 768px width
29-
* - Mobile: 576px width
29+
* - Mobile: 375px width
3030
*/
3131
const DEVICE_OPTIONS: DeviceOption[] = [
3232
{
@@ -41,7 +41,7 @@ const DEVICE_OPTIONS: DeviceOption[] = [
4141
},
4242
{
4343
label: <Icon width={14} data={Smartphone} />,
44-
value: '576px',
44+
value: '375px',
4545
ariaLabel: 'Mobile view',
4646
},
4747
];
@@ -101,7 +101,7 @@ const ViewSwitches: React.FC = () => {
101101
aria-label="Switch to preview mode"
102102
title="Switch to preview mode"
103103
>
104-
<Icon data={Eye} />
104+
<Icon data={SquareDashed} />
105105
</Button>
106106

107107
<div className={b('zoom')} role="group" aria-label="Zoom controls">

0 commit comments

Comments
 (0)