Open sc-anssi opened 4 days ago
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst) Here are some useful points:
docs/
directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
This patch adds the possibility to have a multiline input (textarea) for Params of type "string" in the trigger UI form. The choice between rendering a text input (single line) or a textarea (multiline) is based on the presence of a new line character in any of the examples of the Param. For instance, the following code generates a multiline input:
I know Params of type "array" are rendered as textareas but forcing our end-users to format their multiline text into an array of strings would not be very friendly :). So it seems more practical to leave the Param as a "string" type and work on the rendering options instead.
The patch is merely a PoC to showcase what the feature would look like and by no means a definitive solution. I think that relying on the
examples
attribute is more a hack than a solution, but adding a new explicit attribute to the Param object is beyond my understanding of Airflow. So feel free to rewrite it completely if you think the feature is worth it.