This is an automated email from the ASF dual-hosted git repository. yjc pushed a commit to branch home-screen-mvp in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 8da172ca84f65b24b342c909414084841fc92efd Author: Phillip Kelley-Dotson <[email protected]> AuthorDate: Fri Oct 23 11:35:37 2020 -0700 more changes --- superset-frontend/src/components/ListViewCard/index.tsx | 4 ++-- superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx | 8 ++++---- superset-frontend/src/views/CRUD/welcome/ChartTable.tsx | 3 ++- superset-frontend/src/views/CRUD/welcome/EmptyState.tsx | 4 ++-- superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx | 2 -- superset-frontend/src/views/CRUD/welcome/Welcome.tsx | 8 ++++---- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/superset-frontend/src/components/ListViewCard/index.tsx b/superset-frontend/src/components/ListViewCard/index.tsx index 674985b..a974889 100644 --- a/superset-frontend/src/components/ListViewCard/index.tsx +++ b/superset-frontend/src/components/ListViewCard/index.tsx @@ -143,13 +143,13 @@ const QueryData = styled.div` display: flex; flex-direction: row; justify-content: flex-start; - border-bottom: 1px solid #e0e0e0; + border-bottom: 1px solid ${({ theme }) => theme.colors.grayscale.light2}; .title { font-weight: 500; color: #b2b2b2; } .holder { - margin: 10px 10px 10px 10px; + margin: ${({ theme }) => theme.gridUnit * 2}px; } `; diff --git a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx index bb21c58..63a1455 100644 --- a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx @@ -56,8 +56,8 @@ interface ActivityData { } const ActivityContainer = styled.div` - margin-left: 10px; - margin-top: -15px; + margin-left: ${({ theme }) => theme.gridUnit * 2}px; + margin-top: ${({ theme }) => theme.gridUnit * -4}px; display: grid; grid-template-columns: repeat(auto-fit, minmax(31%, max-content)); ${[mq[3]]} { @@ -74,8 +74,8 @@ const ActivityContainer = styled.div` padding: ${({ theme }) => theme.gridUnit * 2}px ${({ theme }) => theme.gridUnit * 4}px; .ant-card-meta-avatar { - margin-top: 10px; - margin-left: 5px; + margin-top: ${({ theme }) => theme.gridUnit * 3}px; + margin-left: ${({ theme }) => theme.gridUnit * 2}px; } .ant-card-meta-title { font-weight: ${({ theme }) => theme.typography.weights.bold}; diff --git a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx index a54d5a3..e12e204 100644 --- a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx @@ -125,7 +125,8 @@ function ChartTable({ { name: ( <IconContainer> - <Icon name="plus-small" /> Chart{' '} + <Icon name="plus-small" /> + {t('Chart')} </IconContainer> ), buttonStyle: 'tertiary', diff --git a/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx b/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx index 21a37ff..fe2d03e 100644 --- a/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx +++ b/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx @@ -60,7 +60,7 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) { : t(`${tableName.toLowerCase()}`) } yet`}</div> ); - const span = ( + const recent = ( <div className="no-recents"> {t(`Recently ${tab?.toLowerCase()} charts, dashboards, and saved queries will appear here`)} @@ -71,7 +71,7 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) { return ( <Empty image={`/static/assets/images/${tableIcon[tableName]}`} - description={tableName === 'RECENTS' ? span : mine} + description={tableName === 'RECENTS' ? recent : mine} > {tableName !== 'RECENTS' && ( <ButtonContainer> diff --git a/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx b/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx index 43646d4..563ac14 100644 --- a/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx +++ b/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx @@ -123,7 +123,6 @@ const SavedQueries = ({ {canEdit && ( <Menu.Item onClick={() => { - // @ts-ignore window.location.href = `/superset/sqllab?savedQueryId=${query.id}`; }} > @@ -201,7 +200,6 @@ const SavedQueries = ({ name: 'View All ยป', buttonStyle: 'link', onClick: () => { - // @ts-ignore window.location.href = '/savedqueryview/list'; }, }, diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx index effe8cb..f35effc 100644 --- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx +++ b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx @@ -75,17 +75,17 @@ const WelcomeContainer = styled.div` export default function Welcome({ user }: WelcomeProps) { return ( <WelcomeContainer> - <Collapse defaultActiveKey={['1']} ghost> + <Collapse defaultActiveKey={['1', '2', '3', '4']} ghost> <Panel header={t('Recents')} key="1"> <ActivityTable user={user} /> </Panel> - <Panel header={t('Dashboards')} key="1"> + <Panel header={t('Dashboards')} key="2"> <DashboardTable user={user} /> </Panel> - <Panel header={t('Saved Queries')} key="1"> + <Panel header={t('Saved Queries')} key="3"> <SavedQueries user={user} /> </Panel> - <Panel header={t('Charts')} key="1"> + <Panel header={t('Charts')} key="4"> <ChartTable user={user} /> </Panel> </Collapse>
