You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yj...@apache.org on 2020/10/29 05:45:05 UTC
[incubator-superset] 22/33: update chart card
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 b7e35f92b38990cd6c0da5bb0ed1e09b433024cd
Author: Phillip Kelley-Dotson <pk...@yahoo.com>
AuthorDate: Wed Oct 21 15:35:34 2020 -0700
update chart card
---
superset-frontend/src/views/CRUD/chart/ChartCard.tsx | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
index 39f94f0..05872a7 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
@@ -20,13 +20,14 @@ import React from 'react';
import { useFavoriteStatus } from 'src/views/CRUD/hooks';
import { SupersetClient, t } from '@superset-ui/core';
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
-import AvatarIcon from 'src/components/AvatarIcon';
import Icon from 'src/components/Icon';
import Chart from 'src/types/Chart';
+
import ListViewCard from 'src/components/ListViewCard';
import Label from 'src/components/Label';
import { Dropdown, Menu } from 'src/common/components';
import FaveStar from 'src/components/FaveStar';
+import FacePile from 'src/components/FacePile';
const FAVESTAR_BASE_URL = '/superset/favstar/slice';
@@ -120,16 +121,7 @@ export default function ChartCard({
imgURL={chart.thumbnail_url ?? ''}
imgFallbackURL="/static/assets/images/chart-card-fallback.png"
description={t('Last modified %s', chart.changed_on_delta_humanized)}
- coverLeft={(chart.owners || []).slice(0, 5).map(owner => (
- <AvatarIcon
- key={owner.id}
- uniqueKey={`${owner.username}-${chart.id}`}
- firstName={owner.first_name}
- lastName={owner.last_name}
- iconSize={24}
- textSize={9}
- />
- ))}
+ coverLeft={<FacePile users={chart.owners || []} />}
coverRight={
<Label bsStyle="secondary">{chart.datasource_name_text}</Label>
}