bbovenzi commented on code in PR #48442:
URL: https://github.com/apache/airflow/pull/48442#discussion_r2025298226


##########
airflow-core/src/airflow/ui/src/pages/Pools/Pools.tsx:
##########
@@ -60,11 +71,16 @@ export const Pools = () => {
         <AddPoolButton />
       </HStack>
       <Box mt={4}>
-        {isLoading ? (
-          <Skeleton height="100px" />
-        ) : (
-          data?.pools.map((pool) => <PoolBar key={pool.name} pool={pool} />)
-        )}
+        <DataTable

Review Comment:
   Since we don't render this as a regular table but more like a list of cards. 
I would follow what we do in for 
[AssetEvents](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/ui/src/components/Assets/AssetEvents.tsx).
 
   
   We create a `cardDef` that accepts a `PoolResponse` and renders `<PoolBar 
/>` or `<Skeleton />`. We then pass that cardDef to the DataTable here.



##########
airflow-core/src/airflow/ui/src/pages/Pools/Pools.tsx:
##########
@@ -60,11 +71,16 @@ export const Pools = () => {
         <AddPoolButton />
       </HStack>
       <Box mt={4}>
-        {isLoading ? (
-          <Skeleton height="100px" />
-        ) : (
-          data?.pools.map((pool) => <PoolBar key={pool.name} pool={pool} />)
-        )}
+        <DataTable
+          onStateChange={setTableURLState}
+          initialState={tableURLState}  
+          isLoading={isLoading ? (
+            <Skeleton height="100px" />
+          ) : (
+            data?.pools.map((pool) => <PoolBar key={pool.name} pool={pool} />)
+          )} 

Review Comment:
   ```suggestion
             isLoading={isLoading}
   ```
   
   We already pass the data below



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to