-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form block field layout #12200
Merged
Merged
Form block field layout #12200
Conversation
This file contains 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
…ngs are ignored unless used inside a form block
… them when editing from within a form block
…le with field configuration changes
…e into form-block-field-layout
deanhannigan
approved these changes
Oct 30, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
shogunpurple
approved these changes
Nov 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
This PR allows customisation of fields within a form block. This allows custom layouts, with a mix of 1, 2 or 3 fields per column.
Quick video of changing layout:
Screen.Recording.2023-10-27.at.15.21.25.mov
Field layout is controlled by a new setting inside the field settings modal:
The form block will automatically slot fields together, making the best possible use of space.
On mobile, all fields will stretch to take up the full width:
This new setting is only available when using a form block. The field components themselves do not expose it, as it will not work with a normal form.
Removal of left-aligned labels
The one downside of this feature is that it is incompatible with left aligned labels, so that setting is no longer available on form blocks. All form blocks will use labels above the fields.
It's not impossible in future that we could support this, but it would require a significant rewrite of the current field layout structure, as well as reverting all the recent field group component work which now provides layout settings.
Addresses:
Feature branch env
Feature Branch Link