[6.x] Bard image button defaults #13661
Merged
+12
−1
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.
To reduce confusion around the Image button being enabled but not visible in the UI, we started requiring that an asset container be selected whenever the Image button is enabled (#12238).
However, because the Image button is enabled by default, this meant that creating a Bard field forced you to select an asset container before you could save the field.
This PR adjusts the default behavior of the buttons and container config fields based on how many asset containers you have configured.
No containers:
One container:
More than one container:
Replaces #13607 - We'd prefer to keep the image button enabled by default where possible.
Replaces #13609 - Giving the asset container fieldtype a default value means it can never be null.
This follows the approach we already take for the container config field inside the assets fieldtype.