Skip to content

UI: Open provider connection fields by default and title them by connection type - #74273

Merged
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:connection-type-fields
Oct 5, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
astronomer:connection-type-fields

Conversation

@kaxil

@kaxil kaxil commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

The fields a provider declares under conn-fields in provider.yaml were grouped in a section titled "Extra Fields" that started collapsed. When the setting that defines a connection type lives in extra (the model for Pydantic AI; account and warehouse for Snowflake), creating that connection showed only the optional host and password fields, and the ones that matter sat behind a closed accordion. 39 provider packages declare conn-fields.

That section is now titled after the connection type ("Pydantic AI Fields", "Snowflake Fields") and opens by default alongside Standard Fields. "Extra Fields JSON" keeps its name, because it is the raw extra editor.

The accordion now renders only once the connection type metadata has loaded, and it is keyed on the connection type, so the open-by-default state is applied again when the user switches type. Without that gate, an edit dialog opened right after page load would mount with the type id in the title ("pydanticai Fields"). When the metadata arrived, the section would either stay closed under its new title or, if remounted, reset the store holding the saved extras. While the metadata is pending, Standard Fields had nothing to show anyway, and the type selector already shows a spinner.

Every connection type's provider section now starts open, so the dialog is longer for types with many extras, such as Google Cloud (15 fields). Each section can still be collapsed.

The English wording changed in meaning, so it moves to a new connectionTypeFields key and the old extraFields key is removed from every locale, as the i18n README asks for rephrased strings. Other locales fall back to English until translated.

The "Extra Fields" name and the collapsed default go back to the original form in #47868. It reused FlexibleForm, which needs a section title, and named that section after where the values are stored. Only Standard Fields was listed in the accordion's defaultValue. Collapsing the provider fields was never discussed there. The Airflow 2 form rendered provider fields inline with the standard ones.

Before (new Pydantic AI connection on main):

Before: Model hidden in a collapsed Extra Fields section

After (new connection, after switching type from Snowflake to Pydantic AI):

After: Pydantic AI Fields section open with Model visible

After (editing an existing connection):

After: edit form with Pydantic AI Fields open

…ection type

Provider fields declared under conn-fields were grouped in a collapsed
"Extra Fields" section, hiding settings such as the Pydantic AI model
when creating a connection. The section is now titled after the
connection type and opens by default. The accordion renders once the
connection type metadata has loaded so the saved extras are not reset
when the title changes.
@cmarteepants

Copy link
Copy Markdown
Collaborator

I like it. I didn't even realize it was a mandatory field and was confused when I got an error message telling me to populate it. (Maybe it was only mandatory in my scenario 🤷‍♀️ But I still found it annoying that it was hidden away).

@bbovenzi

bbovenzi commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Thanks! I think I'll get rid of accordions on any form. This isn't the first time this issue has come up.

@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Oct 5, 2026
@bbovenzi
bbovenzi merged commit 2b33f02 into apache:main Oct 5, 2026
169 of 172 checks passed
@bbovenzi
bbovenzi deleted the connection-type-fields branch October 5, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants