korbit-ai[bot] commented on code in PR #32271:
URL: https://github.com/apache/superset/pull/32271#discussion_r1957030183
##########
superset-frontend/src/explore/components/DataTablesPane/DataTablesPane.tsx:
##########
@@ -158,12 +158,12 @@ export const DataTablesPane = ({
const CollapseButton = useMemo(() => {
const caretIcon = panelOpen ? (
- <Icons.CaretUp
+ <Icons.CaretDown
iconColor={theme.colors.grayscale.base}
aria-label={t('Collapse data panel')}
/>
) : (
- <Icons.CaretDown
+ <Icons.CaretUp
iconColor={theme.colors.grayscale.base}
aria-label={t('Expand data panel')}
/>
Review Comment:
### Counter-intuitive caret direction <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The caret icon direction is counterintuitive to the panel's state. When the
panel is open, a downward caret suggests closing, but here it's reversed.
###### Why this matters
This creates a confusing user experience as the visual cue (caret direction)
contradicts the standard UI pattern where up means expand and down means
collapse.
###### Suggested change ∙ *Feature Preview*
```typescript
const caretIcon = panelOpen ? (
<Icons.CaretUp
iconColor={theme.colors.grayscale.base}
aria-label={t('Collapse data panel')}
/>
) : (
<Icons.CaretDown
iconColor={theme.colors.grayscale.base}
aria-label={t('Expand data panel')}
/>
);
```
</details>
<sub>
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/a2dd2a58-55ef-4a12-ad96-701635833a69?suggestedFixEnabled=true)
💬 Chat with Korbit by mentioning @korbit-ai.
</sub>
<!--- korbi internal id:9980b846-5d52-46b3-aeb3-20158efd98c5 -->
--
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]