Skip to content
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: Subscription Form Improvements #15076

Closed
5 tasks done
apeatling opened this issue Mar 20, 2020 · 18 comments · Fixed by #15107
Closed
5 tasks done

Block: Subscription Form Improvements #15076

apeatling opened this issue Mar 20, 2020 · 18 comments · Fixed by #15107
Assignees
Labels
[Block] Subscriptions Blocks V2 [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@apeatling
Copy link
Member

apeatling commented Mar 20, 2020

Current state:

screenshot-2020-03-19-at-22 00 34

List from @mtias:

  • Improve the button design, make the button and input field look like they belong together
  • The toggle button for subscriber count should not be in the canvas, move to sidebar
  • Provide further customization options beyond the button color (outline style, radius control, font-size, layout, width, etc)
  • When toggling the “show subscriber count” it looks like three unrelated elements on the page
  • No period at the end of the subscriber count sentence

We need to be able to support a block pattern such as:

image-7

@iamtakashi @pablohoneyhoney Do we have any other block patterns using this block for reference?

@apeatling apeatling added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Block] Subscriptions Blocks V2 labels Mar 20, 2020
@pablohoneyhoney
Copy link

Some initial sketches

Subscription Form

Subscription Form-2

Subscription Form-1

Subscription Form-3

@mtias
Copy link
Member

mtias commented Mar 20, 2020

A border radius control that applies to the input and the button would make sense as a start.

@iamtakashi
Copy link
Contributor

iamtakashi commented Mar 21, 2020

I like the input field and the button to be next to each other, and that makes sense most of the time, especially the width isn't a concern. But when the available width is restricted (like a sidebar), the current pattern (the field and the button to be on its line) would leave a wider input field. It should accommodate both cases.

Screenshot 2020-03-21 at 00 19 44

@apeatling
Copy link
Member Author

Thanks for all the above, I'll start working on this today.

@obenland
Copy link
Member

Opening an English-language post containing the block in wp-admin with the user locale set to a different language, breaks the block. pbNZNv-1Q-p2
In my case user locale was German.
/cc @iamtakashi

@apeatling
Copy link
Member Author

apeatling commented Mar 25, 2020

Based on the pattern designs above, I think these are the settings that should accommodate all of them:

Screen Shot 2020-03-25 at 3 57 36 PM

The exception being the subscriber count placement, which I will handle separately.

@mtias Interested in your feedback here regardless of where these settings end up (sidebar or toolbar). Looking at the way color panels are handled it looks like it could be difficult to separate color settings out into multiple panels. I do feel as though organizing settings by what you are changing is easier to parse than trying to include multiple color settings in one panel.

@mtias
Copy link
Member

mtias commented Mar 26, 2020

Nice work, this looks good. Just a few notes:

  • The border color should probably be a single control and apply to both elements for concordance.
  • The text color on the input field seems also possibly unnecessary: does it apply to the placeholder text or what the visitor would type? In any case, it seems like something that should be set and not controlled by the user.
  • I'd simplify some of the labels: "Background Settings" -> "Background Color" and then "Email Field Background Color" to just "Email Field" and "Submit Button".
  • I like the space controls. We might be getting some better tools in the short term in Gutenberg core, but this works for now.

@apeatling
Copy link
Member Author

apeatling commented Mar 26, 2020

The border color should probably be a single control and apply to both elements for concordance.

This is fine for most of the patterns above, but these two I wondered about:

Screen Shot 2020-03-26 at 9 13 42 AM

I could see a scenario like the first one where you might want a bordered button, with a background color only textfield.

The text color on the input field seems also possibly unnecessary: does it apply to the placeholder text or what the visitor would type? In any case, it seems like something that should be set and not controlled by the user.

That seems fine to me. I was considering it controlling both placeholder (at a lower opacity) and the actual text color. Fine to leave it alone right now.

I'd simplify some of the labels: "Background Settings" -> "Background Color" and then "Email Field Background Color" to just "Email Field" and "Submit Button".

👍

I like the space controls. We might be getting some better tools in the short term in Gutenberg core, but this works for now.

That sounds great, we can always whip these out later.

@apeatling
Copy link
Member Author

Updated settings based on the above:

Screen Shot 2020-03-26 at 9 21 31 AM

@pablohoneyhoney
Copy link

Can we refrain Custom? Seems too technical.

Here it's unnecesary, as it's obvious with the first label Text size
Screen Shot 2020-03-26 at 12 25 49 PM

For color, what users do is Edit or Add color instead of Custom. More natural.
Screen Shot 2020-03-26 at 12 26 05 PM

@mtias
Copy link
Member

mtias commented Mar 26, 2020

I could see a scenario like the first one where you might want a bordered button, with a background color only textfield.

Right, perhaps we should support it but not expose it in the UI. My worry is that, while it allows some of the patterns we might want to do, it will also lead to some weird combinations by users.

@apeatling
Copy link
Member Author

@pablohoneyhoney This is a core component, so this wording is present on all blocks that use font sizing. It would be good to open a core Gutenberg ticket for the suggestion so it can change everywhere.

The PR #15107 now includes all of the settings discussed above.

@kjellr
Copy link

kjellr commented Apr 16, 2020

Just wanted to share a pattern that came up in a theme design @melchoyce is working on:

Screen Shot 2020-04-16 at 1 52 56 PM

Structurally, this is a bit similar to this pattern that @pablohoneyhoney shared above. Just with some different styles:

Screen Shot 2020-04-16 at 1 53 36 PM

In any case, it would be really cool to be able to create this today using this block. Glad to see there's work happening on this. 👍

@apeatling
Copy link
Member Author

apeatling commented Apr 16, 2020

The pattern that Pablo shared is possible. The one from Mel is a bit trickier. It could be done with control over the border thickness of each side of the button, but the space above and below the narrow border complicates it a bit.

@apeatling
Copy link
Member Author

It could be done with a "Button inside of text field" option, and then control over individual button border sides.

@kjellr
Copy link

kjellr commented Apr 16, 2020

... but the space above and below the narrow border complicates it a bit.

Yeah, in the near-term I think it's totally understandable that a little refinement like that might be omitted. 👍

@mtias
Copy link
Member

mtias commented Apr 16, 2020

Yes, I think this one falls a bit in the realm of "the theme needs to supply some custom CSS".

@jeherve
Copy link
Member

jeherve commented Apr 17, 2020

Related: #15474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Subscriptions Blocks V2 [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants