Skip to content

Commit 73c39e7

Browse files
bdshadowclaude
andcommitted
fix: equalize spacing between sort and trash icons
Move TranslationSortMenu outside the flex container so it doesn't create an extra gap between the sort and trash icons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 183d6d0 commit 73c39e7

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

webapp/src/views/projects/translations/TranslationHeader/TranslationControls.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export const TranslationControls: React.FC<Props> = ({ onDialogOpen }) => {
8585
};
8686

8787
return (
88+
<>
8889
<StyledContainer>
8990
<StyledSpaced>
9091
<StyledTranslationsSearchField
@@ -117,13 +118,6 @@ export const TranslationControls: React.FC<Props> = ({ onDialogOpen }) => {
117118
</Badge>
118119
</Tooltip>
119120

120-
<TranslationSortMenu
121-
anchorEl={anchorSortEl}
122-
onClose={() => setAnchorSortEl(null)}
123-
onChange={setOrder}
124-
value={order}
125-
/>
126-
127121
{trashCount > 0 && (
128122
<Tooltip title={t('translation_controls_trash_tooltip')}>
129123
<Badge color="error" variant="dot" overlap="circular">
@@ -183,5 +177,12 @@ export const TranslationControls: React.FC<Props> = ({ onDialogOpen }) => {
183177
)}
184178
</StyledSpaced>
185179
</StyledContainer>
180+
<TranslationSortMenu
181+
anchorEl={anchorSortEl}
182+
onClose={() => setAnchorSortEl(null)}
183+
onChange={setOrder}
184+
value={order}
185+
/>
186+
</>
186187
);
187188
};

webapp/src/views/projects/translations/TranslationHeader/TranslationControlsCompact.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ export const TranslationControlsCompact: React.FC<Props> = ({
155155
};
156156

157157
return (
158+
<>
159+
<TranslationSortMenu
160+
anchorEl={anchorSortEl}
161+
onClose={() => setAnchorSortEl(null)}
162+
onChange={setOrder}
163+
value={order}
164+
/>
158165
<StyledContainer>
159166
{searchOpen ? (
160167
<StyledSearchSpaced>
@@ -228,13 +235,6 @@ export const TranslationControlsCompact: React.FC<Props> = ({
228235
</Badge>
229236
</Tooltip>
230237

231-
<TranslationSortMenu
232-
anchorEl={anchorSortEl}
233-
onClose={() => setAnchorSortEl(null)}
234-
onChange={setOrder}
235-
value={order}
236-
/>
237-
238238
{trashCount > 0 && (
239239
<Tooltip title={t('translation_controls_trash_tooltip')}>
240240
<Badge color="error" variant="dot" overlap="circular">
@@ -316,5 +316,6 @@ export const TranslationControlsCompact: React.FC<Props> = ({
316316
</>
317317
)}
318318
</StyledContainer>
319+
</>
319320
);
320321
};

0 commit comments

Comments
 (0)