codeant-ai-for-open-source[bot] commented on code in PR #22604:
URL: https://github.com/apache/superset/pull/22604#discussion_r3444093586
##########
superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx:
##########
@@ -867,6 +867,27 @@ const config: ControlPanelConfig = {
},
},
],
+ [
+ {
+ name: 'url_link',
+ config: {
+ type: 'UrlLinkControl',
+ renderTrigger: true,
+ label: t('Url Link'),
+ description: t('Add a new column that can configure a link'),
+ shouldMapStateToProps() {
+ return true;
+ },
+ mapStateToProps(_explore: any, _: any, chart: any) {
Review Comment:
**Suggestion:** Replace the explicit `any` annotations in `mapStateToProps`
with concrete parameter types (for example, `ControlPanelState`,
`ControlState`, and a typed chart response shape) to comply with the no-`any`
rule. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The rule explicitly forbids new or modified TypeScript/TSX code that uses
`any`. This
line introduces three `any` annotations in a TSX file, so the suggestion
correctly
identifies a real violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=cb16f1c0800747e18e76f79e1bbb9a49&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=cb16f1c0800747e18e76f79e1bbb9a49&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/plugins/plugin-chart-table/src/controlPanel.tsx
**Line:** 881:881
**Comment:**
*Custom Rule: Replace the explicit `any` annotations in
`mapStateToProps` with concrete parameter types (for example,
`ControlPanelState`, `ControlState`, and a typed chart response shape) to
comply with the no-`any` rule.
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%2F22604&comment_hash=171a455e475f1fc043641e9d16075dcb3f0d197acff4a2220f9ffdacb037a8ad&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F22604&comment_hash=171a455e475f1fc043641e9d16075dcb3f0d197acff4a2220f9ffdacb037a8ad&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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]