mirror of https://github.com/apache/superset.git
chore: change dropdown icons from horizontal to vertical (#15958)
* change icons * add size * fix storybook * fix favstar, add new icons, and others * fix lint
This commit is contained in:
parent
c37c56c2e4
commit
5fd798afb7
|
@ -0,0 +1,21 @@
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 12C10 13.1046 10.8954 14 12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12ZM10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 17.8954 13.1046 17 12 17C10.8954 17 10 17.8954 10 19ZM10 5C10 6.10457 10.8954 7 12 7C13.1046 7 14 6.10457 14 5C14 3.89543 13.1046 3 12 3C10.8954 3 10 3.89543 10 5Z" fill="currentColor"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -66,7 +66,11 @@ const FaveStar = ({
|
||||||
data-test="fave-unfave-icon"
|
data-test="fave-unfave-icon"
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
{isStarred ? <Icons.FavoriteSelected /> : <Icons.FavoriteUnselected />}
|
{isStarred ? (
|
||||||
|
<Icons.FavoriteSelected iconSize="xxl" />
|
||||||
|
) : (
|
||||||
|
<Icons.FavoriteUnselected iconSize="xxl" />
|
||||||
|
)}
|
||||||
</StyledLink>
|
</StyledLink>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ InteractiveIcons.argTypes = {
|
||||||
},
|
},
|
||||||
iconSize: {
|
iconSize: {
|
||||||
defaultValue: 'xl',
|
defaultValue: 'xl',
|
||||||
control: { type: 'inline-radio' },
|
control: { type: 'inline-radio', options: ['s', 'l', 'm', 'xl', 'xxl'] },
|
||||||
},
|
},
|
||||||
iconColor: {
|
iconColor: {
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
|
|
|
@ -111,6 +111,7 @@ const IconFileNames = [
|
||||||
'minus',
|
'minus',
|
||||||
'minus_solid',
|
'minus_solid',
|
||||||
'more_horiz',
|
'more_horiz',
|
||||||
|
'more_vert',
|
||||||
'move',
|
'move',
|
||||||
'nav_charts',
|
'nav_charts',
|
||||||
'nav_dashboard',
|
'nav_dashboard',
|
||||||
|
|
|
@ -93,6 +93,10 @@ const TitleContainer = styled.div`
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
padding-left: ${({ theme }) => theme.gridUnit}px;
|
padding-left: ${({ theme }) => theme.gridUnit}px;
|
||||||
|
span[role='img'] {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ const Styles = styled.div`
|
||||||
span[aria-label='dataset-physical'] {
|
span[aria-label='dataset-physical'] {
|
||||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
color: ${({ theme }) => theme.colors.grayscale.base};
|
||||||
}
|
}
|
||||||
span[aria-label='more-horiz'] {
|
span[aria-label='more-vert'] {
|
||||||
color: ${({ theme }) => theme.colors.primary.base};
|
color: ${({ theme }) => theme.colors.primary.base};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -238,7 +238,7 @@ class DatasourceControl extends React.PureComponent {
|
||||||
data-test="datasource-menu"
|
data-test="datasource-menu"
|
||||||
>
|
>
|
||||||
<Tooltip title={t('More dataset related options')}>
|
<Tooltip title={t('More dataset related options')}>
|
||||||
<Icons.MoreHoriz
|
<Icons.MoreVert
|
||||||
className="datasource-modal-trigger"
|
className="datasource-modal-trigger"
|
||||||
data-test="datasource-menu-trigger"
|
data-test="datasource-menu-trigger"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -168,7 +168,7 @@ export default function ChartCard({
|
||||||
isStarred={favoriteStatus}
|
isStarred={favoriteStatus}
|
||||||
/>
|
/>
|
||||||
<Dropdown overlay={menu}>
|
<Dropdown overlay={menu}>
|
||||||
<Icons.MoreHoriz iconColor={theme.colors.grayscale.base} />
|
<Icons.MoreVert iconColor={theme.colors.grayscale.base} />
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</ListViewCard.Actions>
|
</ListViewCard.Actions>
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link, useHistory } from 'react-router-dom';
|
import { Link, useHistory } from 'react-router-dom';
|
||||||
import { t } from '@superset-ui/core';
|
import { t, useTheme } from '@superset-ui/core';
|
||||||
import { handleDashboardDelete, CardStyles } from 'src/views/CRUD/utils';
|
import { handleDashboardDelete, CardStyles } from 'src/views/CRUD/utils';
|
||||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||||
import { Dropdown, Menu } from 'src/common/components';
|
import { Dropdown, Menu } from 'src/common/components';
|
||||||
|
@ -68,6 +68,7 @@ function DashboardCard({
|
||||||
const canDelete = hasPerm('can_write');
|
const canDelete = hasPerm('can_write');
|
||||||
const canExport = hasPerm('can_read');
|
const canExport = hasPerm('can_read');
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu>
|
<Menu>
|
||||||
{canEdit && openDashboardEditModal && (
|
{canEdit && openDashboardEditModal && (
|
||||||
|
@ -173,7 +174,7 @@ function DashboardCard({
|
||||||
isStarred={favoriteStatus}
|
isStarred={favoriteStatus}
|
||||||
/>
|
/>
|
||||||
<Dropdown overlay={menu}>
|
<Dropdown overlay={menu}>
|
||||||
<Icons.MoreHoriz />
|
<Icons.MoreVert iconColor={theme.colors.grayscale.base} />
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</ListViewCard.Actions>
|
</ListViewCard.Actions>
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,7 +352,7 @@ const SavedQueries = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Dropdown overlay={renderMenu(q)}>
|
<Dropdown overlay={renderMenu(q)}>
|
||||||
<Icons.MoreHoriz
|
<Icons.MoreVert
|
||||||
iconColor={theme.colors.grayscale.base}
|
iconColor={theme.colors.grayscale.base}
|
||||||
/>
|
/>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
|
@ -80,6 +80,9 @@ const WelcomeContainer = styled.div`
|
||||||
padding: 3px 21px;
|
padding: 3px 21px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ant-card-meta-description {
|
||||||
|
margin-top: ${({ theme }) => theme.gridUnit}px;
|
||||||
|
}
|
||||||
.ant-card.ant-card-bordered {
|
.ant-card.ant-card-bordered {
|
||||||
border: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
border: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue