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>![category 
Design](https://img.shields.io/badge/Design-0d9488)</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>
   
   [![Report a problem with this 
comment](https://img.shields.io/badge/Report%20a%20problem%20with%20this%20comment-gray.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmNWVjMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10cmlhbmdsZS1hbGVydCI+PHBhdGggZD0ibTIxLjczIDE4LTgtMTRhMiAyIDAgMCAwLTMuNDggMGwtOCAxNEEyIDIgMCAwIDAgNCAyMWgxNmEyIDIgMCAwIDAgMS43My0zIi8+PHBhdGggZD0iTTEyIDl2NCIvPjxwYXRoIGQ9Ik0xMiAxN2guMDEiLz48L3N2Zz4=)](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]

Reply via email to