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


##########
superset-frontend/src/dashboard/components/gridComponents/new/DraggableNewComponent.tsx:
##########
@@ -36,18 +37,33 @@ interface DraggableNewComponentProps {
 const NewComponent = styled.div`
   ${({ theme }) => css`
     display: flex;
-    flex-direction: row;
-    flex-wrap: nowrap;
     align-items: center;
-    padding: ${theme.sizeUnit * 4}px;
-    background: ${theme.colors.grayscale.light5};
+    justify-content: space-between;
+    padding: 0 ${theme.sizeUnit}px;
+    margin: ${theme.sizeUnit * 2}px ${theme.sizeUnit * 4}px;
+
+    // hack to make the drag preview image corners rounded
+    transform: translate(0, 0);

Review Comment:
   ### Unnecessary Compositor Layer Creation <sub>![category 
Performance](https://img.shields.io/badge/Performance-4f46e5)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Using transform: translate(0, 0) as a hack for rounded corners in drag 
preview unnecessarily creates a new compositor layer.
   
   
   ###### Why this matters
   Creating unnecessary compositor layers increases memory usage and can impact 
rendering performance, especially with many instances.
   
   ###### Suggested change ∙ *Feature Preview*
   Remove the transform hack and handle rounded corners differently, for 
example using `will-change: transform` only when dragging starts, or use a 
different approach for rounded corners in the drag preview.
   
   
   ###### 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/44007309-0c84-4d84-bd27-f199d086cb82/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/44007309-0c84-4d84-bd27-f199d086cb82?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/44007309-0c84-4d84-bd27-f199d086cb82?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/44007309-0c84-4d84-bd27-f199d086cb82?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/44007309-0c84-4d84-bd27-f199d086cb82)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:5e4bf10d-3e29-41ee-9736-e02bd0a9bba8 -->
   
   
   [](5e4bf10d-3e29-41ee-9736-e02bd0a9bba8)



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