No extra__conn_type__ prefix required for UI behaviors #26995
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After making it so we can omit the prefix in
get_connection_form_widgets, we leftget_ui_field_behaviouralone because, even though maybe it's unlikely and probably not a great idea, it's possible that a user would want to add an extra field that shares a name with an existing conn attr and want to provide a placeholder for that field.But, after turning my attention back to this area, I think I arrived a at a reasonable way to solve this, which should make things easier for users when trying to implement extra fields for hooks.
What we do is, check the placeholders when processing the hook in the providers manager, and if there are any fields which are not conn attrs and are not prefixed already, we add the prefix. We don't need to worry about "hidden fields" or "relabeling" because these are only used with the built-in conn attrs.