bito-code-review[bot] commented on code in PR #40062:
URL: https://github.com/apache/superset/pull/40062#discussion_r3230334797
##########
superset-frontend/src/explore/components/ExploreViewContainer/index.tsx:
##########
@@ -1020,10 +1020,13 @@ function ExploreViewContainer(props:
ExploreViewContainerProps) {
className="sidebar"
onClick={toggleCollapse}
data-test="open-datasource-tab"
- role="button"
- tabIndex={0}
>
- <span role="button" tabIndex={0} className="action-button">
+ <Button
+ buttonStyle="link"
+ className="action-button"
+ aria-label={t('Open Datasource tab')}
+ onClick={toggleCollapse}
+ >
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Duplicate onClick Handlers</b></div>
<div id="fix">
The div wrapper and the Button both have onClick={toggleCollapse}, which
will cause the toggle function to execute twice on button click, preventing the
collapse functionality from working. Remove the onClick from the Button element.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
<Button
buttonStyle="link"
className="action-button"
aria-label={t('Open Datasource tab')}
>
````
</div>
</details>
</div>
<small><i>Code Review Run #d45150</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]