Repository navigation
[6.x] Share the blueprint and creating state with addons in the publish form - #16010
Open
marcorieser wants to merge 1 commit into
Open
marcorieser wants to merge 1 commit into
marcorieser wants to merge 1 commit into
Conversation
… the publish form
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I'm building an addon that fills in a field's default from the value of another field. In the publish form it needs to know whether the item is being created (new content gets its defaults, existing content is left alone) and which blueprint it is working with. Its setting in the field editor also needs a picker for the other fields. None of that is available to an addon today: the
publish-container-createdevent has no blueprint, nothing says whether the item is new, and config fieldtypes can't see the fields of the blueprint being edited.This adds:
isCreatingprop on the publish container. The entry, term, global, user group, page and new user forms pass it. It is provided in the container context and included in thepublish-container-createdpayload.blueprintin thepublish-container-createdpayload. It was already in the context.suggestableConditionFieldsProviderin the field settings editor, the same key the blueprint builder provides, so a config fieldtype can suggest the other fields the way the Conditions tab does.isCreatingisfalseunless a form passes it.Includes tests for the container.