You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/05 16:03:34 UTC

[GitHub] [airflow] PApostol opened a new pull request #20052: Extend config window on UI

PApostol opened a new pull request #20052:
URL: https://github.com/apache/airflow/pull/20052


   Closes #17874.
   
   This PR adjusts the size of the JSON config window on the UI, better utilizing the empty space between the Trigger button and the bottom of the page.
   
   Before & after:
   ![ui](https://user-images.githubusercontent.com/50751110/144753942-ac6842db-9846-42db-b127-96b227cf09bc.JPG)
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bbovenzi merged pull request #20052: Extend config window on UI

Posted by GitBox <gi...@apache.org>.
bbovenzi merged pull request #20052:
URL: https://github.com/apache/airflow/pull/20052


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] PApostol commented on a change in pull request #20052: Extend config window on UI

Posted by GitBox <gi...@apache.org>.
PApostol commented on a change in pull request #20052:
URL: https://github.com/apache/airflow/pull/20052#discussion_r765238444



##########
File path: airflow/www/static/js/trigger.js
##########
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-/* global document, CodeMirror */
+/* global document, CodeMirror, window */
 
 const textArea = document.getElementById('json');
+const height = window.innerHeight * 0.6;

Review comment:
       Cool, I've added to the PR.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bbovenzi commented on a change in pull request #20052: Extend config window on UI

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on a change in pull request #20052:
URL: https://github.com/apache/airflow/pull/20052#discussion_r765033942



##########
File path: airflow/www/static/js/trigger.js
##########
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-/* global document, CodeMirror */
+/* global document, CodeMirror, window */
 
 const textArea = document.getElementById('json');
+const height = window.innerHeight * 0.6;

Review comment:
       ```suggestion
   const height = window.innerHeight - 450;
   ```
   Window height minus headers and footers.

##########
File path: airflow/www/static/js/trigger.js
##########
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-/* global document, CodeMirror */
+/* global document, CodeMirror, window */
 
 const textArea = document.getElementById('json');
+const height = window.innerHeight * 0.6;

Review comment:
       And we should probably do a minHeight too like `height > 300 ? height : 300`




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bbovenzi commented on a change in pull request #20052: Extend config window on UI

Posted by GitBox <gi...@apache.org>.
bbovenzi commented on a change in pull request #20052:
URL: https://github.com/apache/airflow/pull/20052#discussion_r765227747



##########
File path: airflow/www/static/js/trigger.js
##########
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-/* global document, CodeMirror */
+/* global document, CodeMirror, window */
 
 const textArea = document.getElementById('json');
+const height = window.innerHeight * 0.6;

Review comment:
       exactly




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] PApostol commented on a change in pull request #20052: Extend config window on UI

Posted by GitBox <gi...@apache.org>.
PApostol commented on a change in pull request #20052:
URL: https://github.com/apache/airflow/pull/20052#discussion_r765129326



##########
File path: airflow/www/static/js/trigger.js
##########
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-/* global document, CodeMirror */
+/* global document, CodeMirror, window */
 
 const textArea = document.getElementById('json');
+const height = window.innerHeight * 0.6;

Review comment:
       Perhaps something like the below?
   > const minHeight = 300;
   const maxHeight = window.innerHeight - 450;
   const height = maxHeight > minHeight ? maxHeight : minHeight;




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org