-
Notifications
You must be signed in to change notification settings - Fork 805
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
Block: Contact Form Improvements #15286
Comments
For this I was thinking we could explore keeping the base block as "Form" but we hide it form the inserter ( Alternatively, we keep |
I think the first one is best, but I don't think we can hide the generic form in the inserter until variations show up in the |
I've added support for variations to #15362 that includes a variation selection screen when the base Form block is selected, but also includes the variations in the picker. |
@mtias Do you see this as a toggle embedded within the toolbar, or a button that shows a dropdown with the toggle option? |
As a bonus, I've also added support for padding and space between fields from single controls in the parent block. |
I've removed this from the canvas and added it to the sidebar. I'm happy to add it to the toolbar, but having a dropdown with a single toggle seems odd to me. If the toggle can be embedded within the actual toolbar that seems better, but I don't think there is any precedent for this? |
Yes, I meant a toggle embedded in the toolbar directly. If there was a clear enough icon with a tooltip, it could be just a regular toolbar button action, as most icon-buttons already work as toggles (like bold) in the toolbar. |
Added this to the toolbar. It's hard to find the right icon, but I'd like all the icons I've added in the PR to get a review and update once everything is working. |
@mtias I think this could be useful for design patterns and be a toggle option in the parent block that applies to all fields? "Include labels in fields?" or something like this? Edit -- just noticed your comment right at the bottom. You mean the multi-columns and not the labels? |
I dislike the default width of the input fields set by the block for the front of the site. I find it odd :) For a stack layout like the screenshot above, I'd prefer 100% width. cc @ianstewart @alaczek (Since this came up in our chat before.) |
@iamtakashi Already done 😀 |
I agree, the icons in this block in general are not good so I'd like to review those as a whole. I think the preferred interaction is via the sidebar and that will stay as it is, the toolbar icon was added because I believe the pattern is now for primary interactions on a block to be in the block toolbar. @pablohoneyhoney Would you be willing to come up with a better icon here? |
Yes, the multi column. Like @iamtakashi mentions, I think by default it should be full-width, but it should be possible to say you want 50% on a field and they would stack in columns. (This should not be a blocker for a first pass, just something to consider later.) |
The multi-column option would open up some cool design possibilities! I saw something similar done, can't remember where exactly, for the Name field specifically. This was done with a radio toggle setting to split up the Name field into first and last name, and those two fields would be then displayed side-by-side. |
@alaczek This is how CoBlocks handles it. It's a simple way to handle splitting the name field into two columns inside of a single block using flexbox. I think we'd want to go much further than this. My first thought was to use flexbox in the same way and auto arrange field blocks into columns with a simple column count slider. It would be the most straightforward for the user, just slide the toggle to adjust column count and you're done. I think this would break down quickly though -- you would not be able to move fields, block UI would be affected, and inserting new fields in a specific location almost impossible. I think it's a non starter. I do like the idea of having a column count slider to auto arrange fields, from a UX perspective it's incredibly simple. If this could be combined with intelligently arranging blocks inside and outside of columns blocks then you could retain a simple interaction backed by the power of columns. That would allow users the ability to add, remove, and rearrange field blocks after selecting their column count. /cc @mtias |
I am not sure a column attribute would be the best — would you expect "message" to be a allocated to a column? What happens with other fields? My thinking was more like this: flex would be set by default, with the fields set to 100%; changing two subsequent ones to 50% (name and email) would yield the result above. |
My thought would be to provide an option for textarea fields to span columns (or not). Let me try working with flex using the component you mentioned. I think this is more fiddly but does give you greater control. |
I think it might also be something people access mainly through patterns rather than setting them up themselves. |
Yes agreed. I was thinking end users and simplicity, but this is about pattern building so that finer grained control makes sense here. |
If you think you can get to something that feels pretty intuitive, flexible, and easy to control, it might still be worth to explore! |
Opened a draft PR with these changes here: #15674. Will keep this separate to not block the other contact form updates from merging first. |
Current visual state:
Improvements to make for this block via @mtias
@iamtakashi @pablohoneyhoney I think we have a few examples of patterns for the contact form, if we can drop those here that would be 👍👍, thanks.
The text was updated successfully, but these errors were encountered: