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 f476c02e070827485bb3982b199e960a88a80a68
Author: Evan Rusackas <[email protected]>
AuthorDate: Thu Sep 10 13:57:48 2020 -0700

    step 1: broken stuff!
---
 superset-frontend/src/components/Menu/SubMenu.tsx  |  2 +
 .../src/views/CRUD/welcome/Welcome.tsx             | 53 ++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/superset-frontend/src/components/Menu/SubMenu.tsx 
b/superset-frontend/src/components/Menu/SubMenu.tsx
index e17ce7a..df7e501 100644
--- a/superset-frontend/src/components/Menu/SubMenu.tsx
+++ b/superset-frontend/src/components/Menu/SubMenu.tsx
@@ -61,6 +61,8 @@ const StyledHeader = styled.header`
   }
 `;
 
+type MenuClickHandler = React.MouseEventHandler<MenuItem>;
+
 type MenuChild = {
   label: string;
   name: string;
diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx 
b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx
index 256fe3a..15d4928 100644
--- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx
+++ b/superset-frontend/src/views/CRUD/welcome/Welcome.tsx
@@ -33,6 +33,8 @@ import RecentActivity from 
'src/profile/components/RecentActivity';
 import Favorites from 'src/profile/components/Favorites';
 import DashboardTable from './DashboardTable';
 
+const { Panel } = Collapse;
+
 interface WelcomeProps {
   user: User;
 }
@@ -56,6 +58,10 @@ function useSyncQueryState(
   return [state, setQueryStateAndState];
 }
 
+function ding(e: any) {
+  console.log('event',e);
+}
+
 export default function Welcome({ user }: WelcomeProps) {
   const [activeTab, setActiveTab] = useSyncQueryState(
     'activeTab',
@@ -82,6 +88,52 @@ export default function Welcome({ user }: WelcomeProps) {
   }, []);
 
   return (
+    <Collapse defaultActiveKey={['1']}>
+      <Panel header={t('Recents')} key="1">
+        <SubMenu
+          activeChild="Datasets"
+          name={''}
+          children={[
+            {
+              name: 'Viewed',
+              label: t('Viewed'),
+              onClick: () => ding('hi?'),
+            },
+            {
+              name: 'Edited',
+              label: t('Edited'),
+              onClick: ding,
+            },
+            {
+              name: 'Created',
+              label: t('Created'),
+              onClick: ding,
+            },
+          ]}
+        />
+        <RecentActivity user={user} />
+      </Panel>
+
+      <Panel header={t('Dashboards')} key="2">
+        <FormControl
+          type="text"
+          bsSize="sm"
+          placeholder="Search"
+          value={searchQuery}
+          // @ts-ignore React bootstrap types aren't quite right here
+          onChange={e => setSearchQuery(e.currentTarget.value)}
+        />
+        <DashboardTable search={searchQuery} />
+      </Panel>
+
+      <Panel header={t('Saved Queries')} key="3" >
+        Stuff here!
+      </Panel>
+      <Panel header={t('Charts')} key="4" >
+        Stuff here!
+      </Panel>
+    </Collapse>
+    /*
     <div className="container welcome">
       <Tabs
         activeKey={activeTab}
@@ -139,5 +191,6 @@ export default function Welcome({ user }: WelcomeProps) {
         </Tab>
       </Tabs>
     </div>
+    */
   );
 }

Reply via email to