Skip to content

Commit 8c4ca60

Browse files
authored
fix(styling): various minor visual tweaks and adjustments (#34031)
1 parent 90eded1 commit 8c4ca60

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ const StyledDashboardContent = styled.div<{
291291
width: 0;
292292
flex: 1;
293293
position: relative;
294-
margin-top: ${theme.sizeUnit * 6}px;
294+
margin-top: ${theme.sizeUnit * 4}px;
295295
margin-right: ${theme.sizeUnit * 8}px;
296-
margin-bottom: ${theme.sizeUnit * 6}px;
296+
margin-bottom: ${theme.sizeUnit * 4}px;
297297
margin-left: ${marginLeft}px;
298298
299299
${editMode &&

superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const VerticalDotsTrigger = () => {
8888
cursor: pointer;
8989
}
9090
`}
91-
iconSize="xxl"
91+
iconSize="xl"
9292
iconColor={theme.colorTextLabel}
9393
className="dot"
9494
/>
@@ -522,6 +522,7 @@ const SliceHeaderControls = (
522522
aria-haspopup="true"
523523
css={theme => css`
524524
padding: ${theme.sizeUnit * 2}px;
525+
padding-right: 0px;
525526
`}
526527
>
527528
<VerticalDotsTrigger />

superset-frontend/src/dashboard/components/gridComponents/Tabs.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const StyledTabsContainer = styled.div`
9696
9797
.ant-tabs-content-holder {
9898
overflow: visible;
99+
margin-top: ${theme.sizeUnit * 4}px;
99100
}
100101
}
101102

superset-frontend/src/pages/GroupsList/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
ConfirmStatusChange,
3939
DeleteModal,
4040
} from '@superset-ui/core/components';
41+
import { WIDER_DROPDOWN_WIDTH } from 'src/components/ListView/utils';
4142

4243
const PAGE_SIZE = 25;
4344

@@ -336,6 +337,7 @@ function GroupsList({ user }: GroupsListProps) {
336337
value: role.id,
337338
})),
338339
loading: loadingState.roles,
340+
dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
339341
},
340342
{
341343
Header: t('Users'),
@@ -346,6 +348,7 @@ function GroupsList({ user }: GroupsListProps) {
346348
unfilteredLabel: t('All'),
347349
fetchSelects: async (filterValue, page, pageSize) =>
348350
fetchUserOptions(filterValue, page, pageSize, addDangerToast),
351+
dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
349352
},
350353
],
351354
[loadingState.roles, roles],

superset-frontend/src/pages/RolesList/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { isUserAdmin } from 'src/dashboard/util/permissionUtils';
3939
import { Icons } from '@superset-ui/core/components/Icons';
4040
import { fetchPaginatedData } from 'src/utils/fetchOptions';
4141
import { fetchUserOptions } from 'src/features/groups/utils';
42+
import { WIDER_DROPDOWN_WIDTH } from 'src/components/ListView/utils';
4243
import { GroupObject } from '../GroupsList';
4344

4445
const PAGE_SIZE = 25;
@@ -312,6 +313,7 @@ function RolesList({ addDangerToast, addSuccessToast, user }: RolesListProps) {
312313
unfilteredLabel: t('All'),
313314
fetchSelects: async (filterValue, page, pageSize) =>
314315
fetchUserOptions(filterValue, page, pageSize, addDangerToast),
316+
dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
315317
},
316318
{
317319
Header: t('Permissions'),
@@ -325,6 +327,7 @@ function RolesList({ addDangerToast, addSuccessToast, user }: RolesListProps) {
325327
value: permission.id,
326328
})),
327329
loading: loadingState.permissions,
330+
dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
328331
},
329332
{
330333
Header: t('Groups'),
@@ -338,6 +341,7 @@ function RolesList({ addDangerToast, addSuccessToast, user }: RolesListProps) {
338341
value: group.id,
339342
})),
340343
loading: loadingState.groups,
344+
dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
341345
},
342346
],
343347
[permissions, groups, loadingState.groups, loadingState.permissions],

superset-frontend/src/pages/SavedQueryList/index.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
styled,
2424
SupersetClient,
2525
t,
26-
css,
2726
} from '@superset-ui/core';
2827
import { useCallback, useMemo, useState, MouseEvent } from 'react';
2928
import { Link, useHistory } from 'react-router-dom';
@@ -200,23 +199,16 @@ function SavedQueryList({
200199

201200
subMenuButtons.push({
202201
name: (
203-
<Link
204-
to="/sqllab?new=true"
205-
css={css`
206-
display: flex;
207-
&:hover {
208-
color: currentColor;
209-
text-decoration: none;
210-
}
211-
`}
212-
>
202+
<>
213203
<Icons.PlusOutlined iconSize="m" />
214204
{t('Query')}
215-
</Link>
205+
</>
216206
),
217207
buttonStyle: 'primary',
208+
onClick: () => {
209+
history.push('/sqllab?new=true');
210+
},
218211
});
219-
220212
if (canCreate) {
221213
subMenuButtons.push({
222214
name: (

0 commit comments

Comments
 (0)