Skip to content

Commit 6018037

Browse files
fix(UI): remaining UI fixes
1 parent 9206685 commit 6018037

File tree

8 files changed

+42
-24
lines changed

8 files changed

+42
-24
lines changed

superset-frontend/packages/superset-ui-core/src/components/TableCollection/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ const StyledTable = styled(Table)<{
105105
white-space: nowrap;
106106
}
107107
108+
.ant-table-tbody > tr > td {
109+
height: ${theme.sizeUnit * 12}px;
110+
}
111+
112+
.ant-table-tbody > tr > td.ant-table-cell:has(.ant-avatar-group) {
113+
padding-top: ${theme.sizeUnit}px;
114+
padding-bottom: ${theme.sizeUnit}px;
115+
}
116+
108117
.ant-table-placeholder .ant-table-cell {
109118
border-bottom: 0;
110119
}

superset-frontend/src/components/ListView/ListView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const ListViewStyles = styled.div`
6060
& .controls {
6161
display: flex;
6262
flex-wrap: wrap;
63-
column-gap: ${theme.sizeUnit * 6}px;
63+
column-gap: ${theme.sizeUnit * 7}px;
6464
row-gap: ${theme.sizeUnit * 4}px;
6565
}
6666
}

superset-frontend/src/components/ListView/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const RisonParam: QueryParamConfig<string, any> = {
7070
: rison.decode(dataStr),
7171
};
7272

73-
export const SELECT_WIDTH = 175;
73+
export const SELECT_WIDTH = 176;
7474
export const RANGE_WIDTH = 300;
7575
export const WIDER_DROPDOWN_WIDTH = '300px';
7676

superset-frontend/src/explore/components/ControlHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const ControlHeader: FC<ControlHeaderProps> = ({
167167
placement="top"
168168
title={validationErrors?.join(' ')}
169169
>
170-
<Icons.InfoCircleOutlined iconColor={theme.colorErrorText} />
170+
<Icons.ExclamationCircleOutlined iconColor={theme.colorError} />
171171
</Tooltip>{' '}
172172
</span>
173173
)}

superset-frontend/src/explore/components/ControlPanelsContainer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
627627
id={`${kebabCase('validation-errors')}-tooltip`}
628628
title={t('This section contains validation errors')}
629629
>
630-
<Icons.InfoCircleOutlined iconColor={theme.colorErrorText} />
630+
<Icons.ExclamationCircleOutlined iconColor={theme.colorError} />
631631
</Tooltip>
632632
)}
633633
</span>
@@ -752,9 +752,9 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
752752
placement="right"
753753
title={props.errorMessage}
754754
>
755-
<Icons.InfoCircleOutlined
755+
<Icons.ExclamationCircleOutlined
756756
data-test="query-error-tooltip-trigger"
757-
iconColor={theme.colorErrorText}
757+
iconColor={theme.colorError}
758758
iconSize="s"
759759
/>
760760
</Tooltip>
@@ -813,9 +813,9 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
813813
placement="right"
814814
title={t('This section contains validation errors')}
815815
>
816-
<Icons.InfoCircleOutlined
816+
<Icons.ExclamationCircleOutlined
817817
data-test="matrixify-validation-error-tooltip-trigger"
818-
iconColor={theme.colorErrorText}
818+
iconColor={theme.colorError}
819819
iconSize="s"
820820
/>
821821
</Tooltip>

superset-frontend/src/features/home/Menu.tsx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const StyledHeader = styled.header`
4444
${({ theme }) => css`
4545
background-color: ${theme.colorBgContainer};
4646
border-bottom: 1px solid ${theme.colorBorderSecondary};
47-
min-height: ${theme.sizeUnit * 13}px;
4847
padding: 0 ${theme.sizeUnit * 4}px;
4948
z-index: 10;
5049
@@ -116,17 +115,18 @@ const { SubMenu } = MainNav;
116115
const StyledSubMenu = styled(SubMenu)`
117116
${({ theme }) => css`
118117
&.ant-menu-submenu.ant-menu-submenu-horizontal {
119-
padding: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 4}px;
120118
display: flex;
121119
align-items: center;
122120
height: 100%;
121+
padding: 0;
123122
124123
.ant-menu-submenu-title {
125124
display: flex;
126125
gap: ${theme.sizeUnit * 2}px;
127126
flex-direction: row-reverse;
128127
align-items: center;
129-
padding: 0;
128+
height: 100%;
129+
padding: 0 ${theme.sizeUnit * 4}px;
130130
}
131131
132132
&:hover,
@@ -151,7 +151,8 @@ const StyledSubMenu = styled(SubMenu)`
151151
transition: 0.2s all ease-out;
152152
}
153153
154-
&:hover::after {
154+
&:hover::after,
155+
&.ant-menu-submenu-open::after {
155156
transform: scale(1);
156157
}
157158
}
@@ -162,6 +163,13 @@ const StyledSubMenu = styled(SubMenu)`
162163
`}
163164
`;
164165

166+
const StyledBrandWrapper = styled.div<{ margin?: string }>`
167+
${({ margin }) => css`
168+
height: ${margin ? 'auto' : '100%'};
169+
margin: ${margin ?? 0};
170+
`}
171+
`;
172+
165173
const StyledBrandLink = styled(Typography.Link)`
166174
${({ theme }) => css`
167175
align-items: center;
@@ -281,10 +289,10 @@ export function Menu({
281289
<StyledSubMenu
282290
key={label}
283291
title={label}
292+
popupOffset={[0, -8]}
284293
icon={
285294
showMenu === 'inline' ? <></> : <Icons.DownOutlined iconSize="xs" />
286295
}
287-
popupOffset={[10, 3]}
288296
>
289297
{childs?.map((child: MenuObjectChildProps | string, index1: number) => {
290298
if (typeof child === 'string' && child === '-' && label !== 'Data') {
@@ -318,14 +326,16 @@ export function Menu({
318326
let link;
319327
if (theme.brandLogoUrl) {
320328
link = (
321-
<StyledBrandLink href={theme.brandLogoHref}>
322-
<Image
323-
preview={false}
324-
src={theme.brandLogoUrl}
325-
alt={theme.brandLogoAlt || 'Apache Superset'}
326-
height={theme.brandLogoHeight}
327-
/>
328-
</StyledBrandLink>
329+
<StyledBrandWrapper margin={theme.brandLogoMargin}>
330+
<StyledBrandLink href={theme.brandLogoHref}>
331+
<Image
332+
preview={false}
333+
src={theme.brandLogoUrl}
334+
alt={theme.brandLogoAlt || 'Apache Superset'}
335+
height={theme.brandLogoHeight}
336+
/>
337+
</StyledBrandLink>
338+
</StyledBrandWrapper>
329339
);
330340
} else if (isFrontendRoute(window.location.pathname)) {
331341
// ---------------------------------------------------------------------------------

superset-frontend/src/features/home/RightMenu.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ const StyledDiv = styled.div<{ align: string }>`
6969
flex-direction: row;
7070
justify-content: ${({ align }) => align};
7171
align-items: center;
72-
margin-right: ${({ theme }) => theme.sizeUnit}px;
7372
`;
7473

7574
const StyledMenuItemWithIcon = styled.div`

superset/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ class D3TimeFormat(TypedDict, total=False):
752752
# Brand
753753
"brandLogoAlt": "Apache Superset",
754754
"brandLogoUrl": APP_ICON,
755+
"brandLogoMargin": "18px 0",
755756
"brandLogoHref": "/",
756757
"brandLogoHeight": "24px",
757758
# Spinner
@@ -1868,8 +1869,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument # noq
18681869
CONTENT_SECURITY_POLICY_WARNING = True
18691870

18701871
# Do you want Talisman enabled?
1871-
# TALISMAN_ENABLED = utils.cast_to_boolean(os.environ.get("TALISMAN_ENABLED", True))
1872-
TALISMAN_ENABLED = False
1872+
TALISMAN_ENABLED = utils.cast_to_boolean(os.environ.get("TALISMAN_ENABLED", True))
18731873

18741874
# If you want Talisman, how do you want it configured??
18751875
# For more information on setting up Talisman, please refer to

0 commit comments

Comments
 (0)