Adaverse commented on code in PR #31581:
URL: https://github.com/apache/airflow/pull/31581#discussion_r1210622814


##########
airflow/www/static/js/dag/Main.tsx:
##########
@@ -108,15 +110,21 @@ const Main = () => {
   const resize = useCallback(
     (e: MouseEvent) => {
       const gridEl = gridRef.current;
-      if (
-        gridEl &&
-        e.x > minPanelWidth &&
-        e.x < window.innerWidth - minPanelWidth
-      ) {
-        const width = `${e.x}px`;
-        gridEl.style.width = width;
-        saveWidth(width);
+      if (gridEl) {
+        if (e.x > minPanelWidth && e.x < window.innerWidth - minPanelWidth) {
+          const width = `${e.x}px`;
+          gridEl.style.width = width;
+          saveWidth(width);
+        } else if (
+          e.x < minPanelWidth &&

Review Comment:
   Implemented the other way around as well. But have kept a heuristic where 
the user needs to cross `minPanelWidth/2` in order to collapse, since there 
would be cases where the user would reduce the size without intent to collapse. 
The intent here would be to cross the halfway mark. Let me know your opinion on 
this.



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