You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/20 15:52:24 UTC

[GitHub] [superset] geido commented on a change in pull request #15792: feat(homepage): conditionally render viewed tab and move examples to chart and dashboard table

geido commented on a change in pull request #15792:
URL: https://github.com/apache/superset/pull/15792#discussion_r673249693



##########
File path: superset-frontend/src/views/CRUD/welcome/Welcome.tsx
##########
@@ -200,9 +197,14 @@ function Welcome({ user, addDangerToast }: WelcomeProps) {
   };
 
   useEffect(() => {
+    const defaultArr = ['2', '3'];

Review comment:
       Should we move this to the top, make it upper case and use it as a default value for `activeState` as well?

##########
File path: superset-frontend/src/views/CRUD/welcome/ChartTable.tsx
##########
@@ -76,7 +85,7 @@ function ChartTable({
     t('chart'),
     addDangerToast,
     true,
-    initialFilter === 'Favorite' ? [] : mine,
+    initialFilter === 'Mine' ? mine : filteredExamples,

Review comment:
       I think typescript can help us here to avoid using plain strings for referencing these filters




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org