You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "alexandrusoare (via GitHub)" <gi...@apache.org> on 2026/06/19 12:05:55 UTC

[PR] feat(listview): Add headerContent prop and HomeOutlined icon [superset]

alexandrusoare opened a new pull request, #41244:
URL: https://github.com/apache/superset/pull/41244

   ### SUMMARY
   
   - Add optional `headerContent` prop to `ListView` that renders between the filter bar and the table/card body
   - Add `HomeOutlined` to the antd icon registry
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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


Re: [PR] feat(listview): Add headerContent prop and HomeOutlined icon [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41244:
URL: https://github.com/apache/superset/pull/41244#issuecomment-4751374907

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


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


Re: [PR] feat(listview): Add headerContent prop and HomeOutlined icon [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41244:
URL: https://github.com/apache/superset/pull/41244#discussion_r3442352505


##########
superset-frontend/src/components/ListView/ListView.tsx:
##########
@@ -514,27 +518,25 @@ export function ListView<T extends object = any>({
                         .filter(
                           action =>
                             !action.hidden?.(
-                              selectedFlatRows.map(
-                                (r: any) => r.original,
-                              ),
+                              selectedFlatRows.map((r: any) => r.original),

Review Comment:
   **Suggestion:** Replace the `any` annotation in this row-mapping callback with a concrete row type (or a narrow reusable type) so hidden-action filtering is fully type-safe. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? πŸ€” </b></summary>
   
   The file is TypeScript/TSX, and the code explicitly annotates the callback parameter as `any`. This directly violates the rule against newly modified TypeScript code using `any`, so the suggestion is valid.
   </details>
   
   [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=5a9259e97b9844a1803250a270636a39&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=5a9259e97b9844a1803250a270636a39&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent πŸ€– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/components/ListView/ListView.tsx
   **Line:** 521:521
   **Comment:**
   	*Custom Rule: Replace the `any` annotation in this row-mapping callback with a concrete row type (or a narrow reusable type) so hidden-action filtering is fully type-safe.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41244&comment_hash=29572ec7a3a4cebf73a3ad8bcd30723381a8c5ad5f2192482ac7bd6fc783587a&reaction=like'>πŸ‘</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41244&comment_hash=29572ec7a3a4cebf73a3ad8bcd30723381a8c5ad5f2192482ac7bd6fc783587a&reaction=dislike'>πŸ‘Ž</a>



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


Re: [PR] feat(listview): Add headerContent prop and HomeOutlined icon [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41244:
URL: https://github.com/apache/superset/pull/41244#issuecomment-4751442829

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41244?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `75.00000%` with `1 line` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 64.36%. Comparing base ([`e1be76e`](https://app.codecov.io/gh/apache/superset/commit/e1be76e5faa8d150e8016df4066babb8a735f3f3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`49e3230`](https://app.codecov.io/gh/apache/superset/commit/49e3230c113c7dd1d1db8c4424f8ce71f1ea2046?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/41244?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...rset-frontend/src/components/ListView/ListView.tsx](https://app.codecov.io/gh/apache/superset/pull/41244?src=pr&el=tree&filepath=superset-frontend%2Fsrc%2Fcomponents%2FListView%2FListView.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvTGlzdFZpZXcudHN4) | 75.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/41244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #41244   +/-   ##
   =======================================
     Coverage   64.36%   64.36%           
   =======================================
     Files        2651     2651           
     Lines      144812   144812           
     Branches    33417    33417           
   =======================================
     Hits        93208    93208           
     Misses      49935    49935           
     Partials     1669     1669           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41244/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ” | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/41244/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.55% <75.00%> (ΓΈ)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41244?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


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


Re: [PR] feat(listview): Add headerContent prop and HomeOutlined icon [superset]

Posted by "alexandrusoare (via GitHub)" <gi...@apache.org>.
alexandrusoare merged PR #41244:
URL: https://github.com/apache/superset/pull/41244


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


Re: [PR] feat(listview): Add headerContent prop and HomeOutlined icon [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41244:
URL: https://github.com/apache/superset/pull/41244#issuecomment-4751385445

   <!-- Bito Reply -->
   The suggestion to replace `any` with a concrete type is valid, as it improves type safety for the row-mapping callback. You can resolve this by using the generic type `T` already defined in the `ListView` component, which represents the row data type.
   
   To implement this, update the `map` and `filter` callbacks to use `T` instead of `any`:
   
   ```typescript
   // Replace (r: any) with (r: Row<T>)
   !action.hidden?.(selectedFlatRows.map((r: Row<T>) => r.original)),
   // ...
   action.onSelect(selectedFlatRows.map((r: Row<T>) => r.original))
   ```
   
   Note: You may need to import `Row` from `react-table` if it is not already available in the scope. There are no other comments on this PR to address.
   
   **superset-frontend/src/components/ListView/ListView.tsx**
   ```
   !action.hidden?.(
     selectedFlatRows.map((r: Row<T>) => r.original),
   ),
   // ...
   onClick={() =>
     action.onSelect(
       selectedFlatRows.map((r: Row<T>) => r.original),
     )
   }
   ```


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