You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "betodealmeida (via GitHub)" <gi...@apache.org> on 2023/09/26 03:44:30 UTC

[GitHub] [superset] betodealmeida commented on a diff in pull request #25403: fix: Tags Page Polish

betodealmeida commented on code in PR #25403:
URL: https://github.com/apache/superset/pull/25403#discussion_r1336591077


##########
superset-frontend/src/features/allEntities/AllEntitiesTable.tsx:
##########
@@ -99,27 +129,71 @@ export default function AllEntitiesTable({
         columns={[
           {
             accessor: type,
-            Header: type.charAt(0).toUpperCase() + type.slice(1),
+            Header: 'Title',
+          },
+          {
+            Cell: ({
+              row: {
+                original: { tags = [] },
+              },
+            }: {
+              row: {
+                original: {
+                  tags: Tag[];
+                };
+              };
+            }) => (
+              // Only show custom type tags
+              <TagsList
+                tags={tags.filter(
+                  (tag: Tag) =>
+                    tag.type === 'TagTypes.custom' || tag.type === 1,
+                )}
+                maxTags={3}
+              />
+            ),
+            Header: t('Tags'),
+            accessor: 'tags',
+            disableSortBy: true,
+          },
+          {
+            Cell: ({
+              row: {
+                original: { owners = [] },
+              },
+            }: any) => <FacePile users={owners} />,
+            Header: t('Owners'),
+            accessor: 'owners',
+            disableSortBy: true,
+            size: 'xl',
           },
-          { accessor: 'modified', Header: 'Modified' },
         ]}
       />
     );
   };
 
-  if (objects) {
-    return (
-      <AllEntitiesTableContainer>
-        <h3>{t('Dashboards')}</h3>
-        {renderTable('dashboard')}
-        <hr />
-        <h3>{t('Charts')}</h3>
-        {renderTable('chart')}
-        <hr />
-        <h3>{t('Queries')}</h3>
-        {renderTable('query')}
-      </AllEntitiesTableContainer>
-    );
-  }
-  return <Loading />;
+  console.log(objects);

Review Comment:
   ```suggestion
   ```



##########
superset-frontend/src/features/allEntities/AllEntitiesTable.tsx:
##########
@@ -86,10 +112,14 @@ export default function AllEntitiesTable({
   }, [search]);
 
   const renderTable = (type: objectType) => {
+    console.log(objects);

Review Comment:
   ```suggestion
   ```



-- 
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