-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global styles interface with styling for v1 #20367
Comments
@karmatosed I'm not quite following the "Colors" bit from your screenshot. Just for clarification, in this mockup, does the user click on the color to change it? Or on the "Custom" text? Or am I thinking too far ahead here ha :) |
@richtabor in this mock they would click custom, which is the current behaviour. I would love to iterate this in later versions, for now that is the same as we have. |
I spent some time today after discussions refining what will be the v1. The following is a good distillation of options and respects what themes might already have:
Along with this for v1, there will not be the ability to click any block, whether that comes or not is a little further off to visualise in the interface right now. Here are a few versions of what that could all look like. SimplifiedThis version has a simple colors option for the link and also just has one font family. Heading and textAn iteration could be to allow a font family for header and text. Notice, this also combines the base font size and scale into one line, compacting a little the inteface. Adding line heightThere could be a case to be made to bring in line height and weights if we are adding a scale. An idea for that is: Removing sectionsAs we are starting off with smaller content, maybe we don't have sections at all. FeedbackI would love to get some feedback on what we have here and there are some discussion points:
I'd also love other input here. |
This is coming together excellently, Tammie. It definitely feels like you're zeroing in on the right ingredients. I also think it's good to focus on what may be an obvious first version — just a list of items — because it's always possible to add sections and UI categorization later on as it becomes necessary.
Yes I'd say that seems a good way to group things. The question is whether you need font controls for each heading level, and I'm leaning towards not at this time, but maybe it becomes necessary in the future. Probably a bridge to cross when we get there. Overall, I think https://user-images.githubusercontent.com/253067/76650869-59b9ce80-655b-11ea-8d41-379464b1483c.png is the one to work with. Perhaps the controls inside need a little massaging to align in a good way, right now it looks as though it says "Lineheight: bold". |
Agreed.
Labeling the font weight dropdown would probably help a lot. |
Hi Everyone, I just want to share some of my feedback which may be useful as you are working for Global Styles. I've recently created 100+ templates/patterns in Gutenberg, and here is my experience with that. What I can tell is that we have enough default blocks to create amazing designs in Gutenberg. But those blocks are missing some basic Options and therefore we have to use custom CSS for that.
If we can have a set of consistent basic styling options for the default blocks, users may be able to create pretty great & complex designs easily. I opt to use custom CSS for most of the designs I created for templates.gutenberghub.com But there is again an issue that we do not have a place to add custom CSS code which applies in Gutenberg editor. I know we can add that to the customizer, but that doesn't enqueue to the editor. |
Thanks for sharing your experience, @munirkamal. That's the spirit of the design tools label, to start gathering the main shortcoming to express visual designs better. Feel free to add examples to those so that we can look at accounting for them. Agree global styles should have access to a CSS editor, even if it's not the main suggested UI for people and can be disabled. (Same role as in the customizer, probably.) |
@jasmussen here is an iteration on the font styling: |
Nice iteration. The real estate still feels a bit out of balance. While generally Figma isn't necessarily a pattern to follow, there's something optically well balanced about their text panel:
From this it seems worth trying to:
Colors feels like it's in a good place to start from. Custom CSS is going to be a bit of a doozy. I did superfluously see the conversations about supporting this, and I'm excited about what this can do for enriching designs as we await the editor growing in features. But can you share a bit more context around what role the field will serve? My first instinct was that each block pattern could come with a chunk of CSS to support it, though I wasn't quite sure how that would work. |
All excellent questions :) I dove in a bit to experiment with what variations could look like. Base font is textBase font is meant to be where the scale moves up from. This could also be inferred to be body text. A variation of that could be this: All in a lineIf I moved style, line height and size to one line it could look like this: Note: I just did a rough idea of what a line-height icon could look like. Split linesI found the 3 in one line a bit much, so what about changing that to be on 2? I also felt lines did help visually, but we could increase spacing just as much: Custom CSSAs an 'easy option' I was just going for text input, there are a lot of options here and maybe we should just focus this issue on the styling and bring that in at a later point? The more I ponder that the more I wonder if it isn't a better case to focus our discussions. |
Remember that all controls should have labels. I'm not seeing any for the font weight or font size dropdowns in the current mockups, and I think it's important to keep those in mind when figuring out how to space out the controls. |
I have now pulled out this into individual issues so closing the overarching one. You can follow along everything block styles here: #20331 |
This issue builds on from #19255 and focuses on moving to a PR for this. As part of this I am going to list what is likely to be the defaults and for the paragraph block (as starting with that makes a lot of sense).
Plugin activation and sidebar
For v1 this is going to appear as a sidebar, activated by clicking. When this happens the sidebar becomes the global styles interface. You are now in global styles and once click again, you come out.
To style all of a type of block, you simply click that block and all 'select'. Notice, there is no toolbar as we aren't editing here. The sidebar will change to show block specific global styles.
All the way along you can 'reset', 'undo/redo' and save. Save sets any change live, it's the publish state. You can also close using 'x' or click the icon to come out of global styles.
This version has some noticeable existing styling over the iterations to color picker. This is on purpose, to focus and iterate once the experience can be used. Iterating components can and will happen in the near future.
Default global styles
By default, the following are my suggestions for being available:
Text:
Color:
Paragraph styles
As you can see in the gif posted, once you click in you get options that are just for the paragraph. Anything done here applies to all. Noticeably this includes line-height, see #20339. Also, the drop-cap wouldn't show as that really is per block, changing all paragraphs to drop-cap is a rare instance.
Next steps
Ideally, we can move into iterating the current PR work here. I am going to loop @ItsJonQ in to activate that. As far as feedback goes, that is of course welcome. The idea here though is to move this into prototype (actual interface) and then see what this feels like for everyone.
I plan to close out the long issue where the interface was explored so we can now focus. Thanks, everyone that has helped to get global styles as far as it's come. It's going to be great to experience this. The icon to activate is up for debate on this too, if anyone has ideas around that.
This is also part of the bigger checklist tasks you can find for global styles here #20331
The text was updated successfully, but these errors were encountered: