feat: home screen mvp (#11206)

* step 1: broken stuff!

* first steps

* more adding and slicing

* step 1: broken stuff!

* can now filter dashboards/charts for "Edited" tabs (filter by changed_by o_m)

* more updates

* update recent card

* add icon

* Adding Expand Icon to Collapse component

* more updates

* clean up code

* remove lock file

* remove consoles

* fixing subnav button height shift

* lil' ascii arrows

* update branch

* update test part 1

* remove consoles

* fix typescript

* add images and update emptystate

* add changes

* update chart card

* fix css issues from rebase

* add suggestions

* more changes

* update tests and clear typescript errors

* Update superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* update from comments

* more updates..

* fix rebase

* fix pesky type errors

* test fixes

* lint fix

* Update superset-frontend/spec/javascripts/views/CRUD/welcome/Welcome_spec.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/views/CRUD/welcome/EmptyState.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/components/Menu/SubMenu.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/components/ListViewCard/index.tsx

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* Update superset-frontend/src/components/ListViewCard/index.tsx

Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>

* add suggestions

* fix lint

* remove unused code

* toast getrecentActivityobjs

* add some suggestions

* remove types for now

* cypress fix

* remove unused type

Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: ʈᵃᵢ <tdupreetan@gmail.com>
This commit is contained in:
Phillip Kelley-Dotson
2020-10-29 21:59:31 -07:00
committed by GitHub
parent a8eb3fe8e7
commit f7051eaade
34 changed files with 2184 additions and 574 deletions

View File

@@ -143,15 +143,20 @@ const paragraphConfig = { rows: 1, width: 150 };
interface CardProps {
title: React.ReactNode;
url?: string;
imgURL: string;
imgFallbackURL: string;
imgURL?: string;
imgFallbackURL?: string;
imgPosition?: BackgroundPosition;
description: string;
loading: boolean;
titleRight?: React.ReactNode;
coverLeft?: React.ReactNode;
coverRight?: React.ReactNode;
actions: React.ReactNode;
actions: React.ReactNode | null;
showImg?: boolean;
rows?: number | string;
avatar?: string;
isRecent?: boolean;
renderCover?: React.ReactNode | null;
}
function ListViewCard({
@@ -162,35 +167,42 @@ function ListViewCard({
imgFallbackURL,
description,
coverLeft,
isRecent,
coverRight,
actions,
avatar,
loading,
imgPosition = 'top',
renderCover,
}: CardProps) {
return (
<StyledCard
data-test="styled-card"
cover={
<Cover>
<a href={url}>
<div className="gradient-container">
<ImageLoader
src={imgURL}
fallback={imgFallbackURL}
isLoading={loading}
position={imgPosition}
/>
</div>
</a>
<CoverFooter className="cover-footer">
{!loading && coverLeft && (
<CoverFooterLeft>{coverLeft}</CoverFooterLeft>
)}
{!loading && coverRight && (
<CoverFooterRight>{coverRight}</CoverFooterRight>
)}
</CoverFooter>
</Cover>
!isRecent
? renderCover || (
<Cover>
<a href={url}>
<div className="gradient-container">
<ImageLoader
src={imgURL || ''}
fallback={imgFallbackURL || ''}
isLoading={loading}
position={imgPosition}
/>
</div>
</a>
<CoverFooter className="cover-footer">
{!loading && coverLeft && (
<CoverFooterLeft>{coverLeft}</CoverFooterLeft>
)}
{!loading && coverRight && (
<CoverFooterRight>{coverRight}</CoverFooterRight>
)}
</CoverFooter>
</Cover>
)
: null
}
>
{loading && (
@@ -230,6 +242,8 @@ function ListViewCard({
</>
}
description={description}
// @ts-ignore
avatar={avatar ? <Icon name={avatar} /> : null}
/>
)}
</StyledCard>