Skip to content

Commit 044bf2f

Browse files
committed
fix: missing buttons RTL support
1 parent 429ed70 commit 044bf2f

File tree

13 files changed

+143
-36
lines changed

13 files changed

+143
-36
lines changed

src/features/dashboard/config-profiles/config-editor-actions/config-editor-actions.feature.tsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { useDownloadTemplate } from '@shared/ui/load-templates/use-download-temp
2828
import { QueryKeys, useUpdateConfigProfile } from '@shared/api/hooks'
2929
import { queryClient } from '@shared/api'
3030

31+
import classes from './config-editor-actions.module.css'
3132
import { Props } from './interfaces'
3233

3334
const MODAL_KEY = MODALS.CONFIG_PROFILE_SHOW_SNIPPETS_DRAWER
@@ -233,11 +234,8 @@ export function ConfigEditorActionsFeature(props: Props) {
233234
>
234235
<Menu.Target>
235236
<ActionIcon
237+
className={classes.actionIconLeft}
236238
size={36}
237-
style={{
238-
borderTopRightRadius: 0,
239-
borderBottomRightRadius: 0
240-
}}
241239
variant={opened ? 'outline' : 'default'}
242240
>
243241
<TbMenuDeep size={20} />
@@ -310,23 +308,16 @@ export function ConfigEditorActionsFeature(props: Props) {
310308
</Menu>
311309

312310
<Button
311+
className={classes.centeredButton}
313312
leftSection={<PiCheckSquareOffset size={16} />}
314313
onClick={formatDocument}
315-
style={{
316-
borderTopLeftRadius: 0,
317-
borderBottomLeftRadius: 0,
318-
borderTopRightRadius: 0,
319-
borderBottomRightRadius: 0,
320-
borderRight: 0,
321-
borderLeft: 0,
322-
width: '100%'
323-
}}
324314
variant="default"
325315
>
326316
{t('config-editor-actions.feature.format')}
327317
</Button>
328318

329319
<ActionIcon
320+
className={classes.actionIconRight}
330321
onClick={() => {
331322
if (isOpen) {
332323
close()
@@ -335,10 +326,6 @@ export function ConfigEditorActionsFeature(props: Props) {
335326
}
336327
}}
337328
size={36}
338-
style={{
339-
borderTopLeftRadius: 0,
340-
borderBottomLeftRadius: 0
341-
}}
342329
variant={isOpen ? 'filled' : 'default'}
343330
>
344331
<TbBraces size={20} />
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.actionIconLeft {
2+
border-top-right-radius: 0;
3+
border-bottom-right-radius: 0;
4+
5+
@mixin rtl {
6+
border-top-left-radius: 0;
7+
border-bottom-left-radius: 0;
8+
border-top-right-radius: var(--mantine-radius-default);
9+
border-bottom-right-radius: var(--mantine-radius-default);
10+
}
11+
}
12+
13+
.centeredButton {
14+
border-top-left-radius: 0;
15+
border-bottom-left-radius: 0;
16+
border-top-right-radius: 0;
17+
border-bottom-right-radius: 0;
18+
border-right: 0;
19+
border-left: 0;
20+
width: 100%;
21+
}
22+
23+
.actionIconRight {
24+
border-top-left-radius: 0;
25+
border-bottom-left-radius: 0;
26+
27+
@mixin rtl {
28+
border-top-right-radius: 0;
29+
border-bottom-right-radius: 0;
30+
border-top-left-radius: var(--mantine-radius-default);
31+
border-bottom-left-radius: var(--mantine-radius-default);
32+
}
33+
}

src/features/dashboard/subscription-templates/template-editor-actions/template-editor-actions.feature.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { useDownloadTemplate } from '@shared/ui/load-templates/use-download-temp
1919
import { QueryKeys, useUpdateSubscriptionTemplate } from '@shared/api/hooks'
2020
import { queryClient } from '@shared/api'
2121

22+
import classes from './template-editor-actions.module.css'
23+
2224
interface Props {
2325
editorRef: RefObject<editor.IStandaloneCodeEditor | null>
2426
editorType: 'json' | 'yaml'
@@ -160,11 +162,8 @@ export function TemplateEditorActionsFeature(props: Props) {
160162
>
161163
<Menu.Target>
162164
<ActionIcon
165+
className={classes.actionIconLeft}
163166
size={36}
164-
style={{
165-
borderTopRightRadius: 0,
166-
borderBottomRightRadius: 0
167-
}}
168167
variant={opened ? 'outline' : 'default'}
169168
>
170169
<TbMenuDeep size={20} />
@@ -210,14 +209,9 @@ export function TemplateEditorActionsFeature(props: Props) {
210209
</Menu>
211210

212211
<Button
212+
className={classes.centeredButton}
213213
leftSection={<PiCheckSquareOffset size={16} />}
214214
onClick={formatDocument}
215-
style={{
216-
borderTopLeftRadius: 0,
217-
borderBottomLeftRadius: 0,
218-
borderLeft: 0,
219-
width: '100%'
220-
}}
221215
variant="default"
222216
>
223217
{t('config-editor-actions.feature.format')}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.actionIconLeft {
2+
border-top-right-radius: 0;
3+
border-bottom-right-radius: 0;
4+
5+
@mixin rtl {
6+
border-top-left-radius: 0;
7+
border-bottom-left-radius: 0;
8+
border-top-right-radius: var(--mantine-radius-default);
9+
border-bottom-right-radius: var(--mantine-radius-default);
10+
}
11+
}
12+
13+
.centeredButton {
14+
border-top-left-radius: 0;
15+
border-bottom-left-radius: 0;
16+
width: 100%;
17+
18+
@mixin rtl {
19+
border-top-left-radius: var(--mantine-radius-default);
20+
border-bottom-left-radius: var(--mantine-radius-default);
21+
22+
border-top-right-radius: 0;
23+
border-bottom-right-radius: 0;
24+
}
25+
}

src/widgets/dashboard/config-profiles/config-profile-card/config-profile-card.module.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
}
142142

143143
.uuidText {
144-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Consolas', monospace;
144+
font-family: 'Fira Mono', monospace;
145145
font-size: 10px;
146146
letter-spacing: -0.2px;
147147
}
@@ -169,6 +169,13 @@
169169
border-bottom-right-radius: 0;
170170
font-weight: 600;
171171
transition: all 0.2s ease;
172+
173+
@mixin rtl {
174+
border-top-left-radius: 0;
175+
border-bottom-left-radius: 0;
176+
border-top-right-radius: var(--mantine-radius-default);
177+
border-bottom-right-radius: var(--mantine-radius-default);
178+
}
172179
}
173180

174181
.menuControl {
@@ -177,6 +184,16 @@
177184
border: 0;
178185
border-left: 2px solid var(--mantine-color-body);
179186
transition: all 0.2s ease;
187+
188+
@mixin rtl {
189+
border-left: 0;
190+
border-right: 2px solid var(--mantine-color-body);
191+
192+
border-top-right-radius: 0;
193+
border-bottom-right-radius: 0;
194+
border-top-left-radius: var(--mantine-radius-default);
195+
border-bottom-left-radius: var(--mantine-radius-default);
196+
}
180197
}
181198

182199
.menuControlIcon {

src/widgets/dashboard/config-profiles/config-profile-card/config-profile-card.widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function ConfigProfileCardWidget(props: IProps) {
197197
>
198198
{configProfile.name}
199199
</Text>
200-
<Group gap="xs" justify="left" wrap="nowrap">
200+
<Group gap="xs" wrap="nowrap">
201201
<Tooltip label={t('config-profiles-grid.widget.inbounds')}>
202202
<Badge
203203
color="blue"

src/widgets/dashboard/external-squads/external-squad-card/external-squad-card.module.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
}
142142

143143
.uuidText {
144-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Consolas', monospace;
144+
font-family: 'Fira Mono', monospace;
145145
font-size: 10px;
146146
letter-spacing: -0.2px;
147147
}
@@ -169,6 +169,13 @@
169169
border-bottom-right-radius: 0;
170170
font-weight: 600;
171171
transition: all 0.2s ease;
172+
173+
@mixin rtl {
174+
border-top-left-radius: 0;
175+
border-bottom-left-radius: 0;
176+
border-top-right-radius: var(--mantine-radius-default);
177+
border-bottom-right-radius: var(--mantine-radius-default);
178+
}
172179
}
173180

174181
.menuControl {
@@ -177,6 +184,16 @@
177184
border: 0;
178185
border-left: 2px solid var(--mantine-color-body);
179186
transition: all 0.2s ease;
187+
188+
@mixin rtl {
189+
border-left: 0;
190+
border-right: 2px solid var(--mantine-color-body);
191+
192+
border-top-right-radius: 0;
193+
border-bottom-right-radius: 0;
194+
border-top-left-radius: var(--mantine-radius-default);
195+
border-bottom-left-radius: var(--mantine-radius-default);
196+
}
180197
}
181198

182199
.menuControlIcon {

src/widgets/dashboard/external-squads/external-squad-card/external-squad-card.widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function ExternalSquadCardWidget(props: IProps) {
120120
>
121121
{externalSquad.name}
122122
</Text>
123-
<Group gap="xs" justify="left" wrap="nowrap">
123+
<Group gap="xs" wrap="nowrap">
124124
<Tooltip label={t('external-squad-card.widget.users')}>
125125
<Badge
126126
color={isActive ? 'teal' : 'gray'}

src/widgets/dashboard/external-squads/external-squads-drawer/external-squads.drawer.widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const ExternalSquadsDrawer = memo(() => {
102102
>
103103
{externalSquad.name}
104104
</Text>
105-
<Group gap="xs" justify="left" wrap="nowrap">
105+
<Group gap="xs" wrap="nowrap">
106106
<Tooltip label={t('external-squad-card.widget.users')}>
107107
<Badge
108108
color={isActive ? 'teal' : 'gray'}

src/widgets/dashboard/internal-squads/internal-squad-card/internal-squad-card.module.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
}
142142

143143
.uuidText {
144-
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Consolas', monospace;
144+
font-family: 'Fira Code', monospace;
145145
font-size: 10px;
146146
letter-spacing: -0.2px;
147147
}
@@ -169,6 +169,13 @@
169169
border-bottom-right-radius: 0;
170170
font-weight: 600;
171171
transition: all 0.2s ease;
172+
173+
@mixin rtl {
174+
border-top-left-radius: 0;
175+
border-bottom-left-radius: 0;
176+
border-top-right-radius: var(--mantine-radius-default);
177+
border-bottom-right-radius: var(--mantine-radius-default);
178+
}
172179
}
173180

174181
.menuControl {
@@ -177,6 +184,16 @@
177184
border: 0;
178185
border-left: 2px solid var(--mantine-color-body);
179186
transition: all 0.2s ease;
187+
188+
@mixin rtl {
189+
border-left: 0;
190+
border-right: 2px solid var(--mantine-color-body);
191+
192+
border-top-right-radius: 0;
193+
border-bottom-right-radius: 0;
194+
border-top-left-radius: var(--mantine-radius-default);
195+
border-bottom-left-radius: var(--mantine-radius-default);
196+
}
180197
}
181198

182199
.menuControlIcon {

0 commit comments

Comments
 (0)