bbovenzi commented on code in PR #22742:
URL: https://github.com/apache/airflow/pull/22742#discussion_r842802555


##########
airflow/www/static/js/tree/StatusBox.jsx:
##########
@@ -46,20 +45,21 @@ export const SimpleStatus = ({ state, ...rest }) => (
 );
 
 const StatusBox = ({
-  group, instance,
+  group, instance, onSelect,
 }) => {
   const containerRef = useContainerRef();
-  const { selected, onSelect } = useSelection();
   const { runId, taskId } = instance;
   const { colors } = useTheme();
   const hoverBlue = `${colors.blue[100]}50`;
 
   // Fetch the corresponding column element and set its background color when 
hovering
   const onMouseEnter = () => {
-    if (selected.runId !== runId) {
-      [...containerRef.current.getElementsByClassName(`js-${runId}`)]
-        .forEach((e) => { e.style.backgroundColor = hoverBlue; });
-    }
+    [...containerRef.current.getElementsByClassName(`js-${runId}`)]
+      .forEach((e) => {
+        const bg = window.getComputedStyle(e).backgroundColor;
+        // Don't apply hover if it is already selected
+        if (bg !== 'rgb(190, 227, 248)') e.style.backgroundColor = hoverBlue;

Review Comment:
   Yeah, I wasnt too happy with color either. Let me do the data attribute.



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

Reply via email to