codeant-ai-for-open-source[bot] commented on code in PR #42813:
URL: https://github.com/apache/superset/pull/42813#discussion_r3724035496


##########
superset-frontend/src/explore/components/controls/VizTypeControl/VizTile.tsx:
##########
@@ -97,30 +97,34 @@ export const VizTile = ({
           white-space: nowrap;
           overflow: hidden;
           max-width: fit-content;
-          ${!isActive &&
-          css`
-            flex-shrink: 0;
-            width: ${theme.sizeUnit * 6}px;
-            background-color: transparent;
-            transition: none;
-            &:hover svg path {
-              fill: ${theme.colorPrimary};
-              transition: fill ${theme.motionDurationMid} ease-out;
-            }
-          `}
+          ${
+            !isActive &&
+            css`
+              flex-shrink: 0;
+              width: ${theme.sizeUnit * 6}px;
+              background-color: transparent;
+              transition: none;
+              &:hover svg path {
+                fill: ${theme.colorPrimary};
+                transition: fill ${theme.motionDurationMid} ease-out;
+              }
+            `
+          }
 
-          ${isActive &&
-          css`
-            width: 100%;
-            background-color: ${theme.colorBgLayout};
-            transition:
-              width ${TILE_TRANSITION_TIME} ease-out,
-              background-color ${TILE_TRANSITION_TIME} ease-out;
-            cursor: default;
-            svg path {
-              fill: ${theme.colorPrimary};
-            }
-          `}
+          ${
+            isActive &&
+            css`
+              width: 100%;
+              background-color: ${theme.colorBgLayout};
+              transition:
+                width ${TILE_TRANSITION_TIME} ease-out,
+                background-color ${TILE_TRANSITION_TIME} ease-out;

Review Comment:
   **Suggestion:** Switching from an active tile to an inactive tile 
immediately changes the computed `transition` property to `none`, so the width 
change from the expanded active state to the compact inactive state cannot 
animate and will abruptly resize the tile and reposition neighboring tiles. 
Keep the width transition enabled during both state changes, or apply the 
transition independently of the active-state rule. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Explore chart-type switching has abrupt reverse layout movement.
   - ⚠️ Neighboring fast-switcher tiles reposition without animation.
   ```
   </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=1fa1921683cb463eba485fe2e6169057&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=1fa1921683cb463eba485fe2e6169057&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/explore/components/controls/VizTypeControl/VizTile.tsx
   **Line:** 101:121
   **Comment:**
        *Logic Error: Switching from an active tile to an inactive tile 
immediately changes the computed `transition` property to `none`, so the width 
change from the expanded active state to the compact inactive state cannot 
animate and will abruptly resize the tile and reposition neighboring tiles. 
Keep the width transition enabled during both state changes, or apply the 
transition independently of the active-state 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%2F42813&comment_hash=f41107a114c83e962713ee5e289a767e5071b24bfc82b595bd30ab5ccdb51c9a&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42813&comment_hash=f41107a114c83e962713ee5e289a767e5071b24bfc82b595bd30ab5ccdb51c9a&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]

Reply via email to