korbit-ai[bot] commented on code in PR #32734:
URL: https://github.com/apache/superset/pull/32734#discussion_r2001926901


##########
superset-frontend/src/features/databases/UploadDataModel/index.tsx:
##########
@@ -539,6 +540,12 @@ const UploadDataModal: 
FunctionComponent<UploadDataModalProps> = ({
     }
   }, [delimiter]);
 
+  useEffect(() => {
+    if (show) {
+      setActiveKey('general');
+    }
+  }, [show]);

Review Comment:
   ### Missing documentation for show effect <sub>![category 
Documentation](https://img.shields.io/badge/Documentation-7c3aed)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The effect lacks documentation explaining why activeKey needs to be reset 
when show changes.
   
   ###### Why this matters
   Missing context makes it harder for other developers to understand the 
purpose of this side effect.
   
   ###### Suggested change ∙ *Feature Preview*
     // Reset active panel to 'general' when modal is shown
     useEffect(() => {
       if (show) {
         setActiveKey('general');
       }
     }, [show]);
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/e5fb6bdf-89bf-4b0a-83d0-2642ab8277dd)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:d9397743-5c51-4406-9bf5-929a325f8bb1 -->
   
   [](d9397743-5c51-4406-9bf5-929a325f8bb1)



-- 
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