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

Style Book: Iterate on presentation and design #53431

Open
3 of 5 tasks
Tracked by #66499
jameskoster opened this issue Aug 8, 2023 · 19 comments
Open
3 of 5 tasks
Tracked by #66499

Style Book: Iterate on presentation and design #53431

jameskoster opened this issue Aug 8, 2023 · 19 comments
Labels
[Feature] Style Book [Status] In Progress Tracking issues with work in progress [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Aug 8, 2023

Brief

The main goal of this refresh is to better organize the blocks that make up your site into a representation of the book of style for your site. Organize into what could have been a design manual. This work includes:

Requirements

  • “Landing” tab that would serve as the landing page of the stylebook: a page displaying only blocks that more commonly and immediately are able to represent the theme.
  • Rearrange blocks into each category based on  relevancy that makes the most sense when editing a website.
  • Consider adding subcategories that would organize blocks better within each tab. For example the “Theme” tab would contain “Site Identity”, “Posts” and “Comments”.
  • Update block examples for a more cohesive connection between them.
  • Reorganize blocks into the proposed categories.

Visual

Pages

Landing page

The landing page would be useful for the current iteration of the Site View, which does not currently feature tabs. It serves as a quick glanceable "poster view" for the site style guide:

poster-view

Finally it would serve to have deep-links to the other tabs, e.g. clicking "Headings" would take you to the Text tab:

style-book-where-areas-link-to

Reorganizing blocks

To afford this structure, the new categories, Color and Theme would benefit orientation. Here is a suggestion how we could reorganize existing blocks, as well as include all the site-specific blocks in those taxonomies:

Categories

Designs in this issue are created by @beafialho. Figma.

@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Aug 8, 2023
@annezazu annezazu moved this to Needs Design in WordPress 6.4 Editor Tasks Aug 30, 2023
@bph bph moved this to Punted to 6.5 in WordPress 6.4 Editor Tasks Sep 15, 2023
@bph bph moved this to ❓ Triage in WordPress 6.5 Editor Tasks Nov 23, 2023
@annezazu annezazu moved this from ❓ Triage to 🗣️ In Discussion / Needs Decision in WordPress 6.5 Editor Tasks Jan 5, 2024
@ramonjd

This comment was marked as outdated.

@jameskoster

This comment was marked as outdated.

@annezazu

This comment was marked as outdated.

@jasmussen jasmussen moved this to Next in Design priorities Apr 15, 2024
@jasmussen jasmussen added Needs Design Feedback Needs general design feedback. and removed Needs Design Needs design efforts. labels Apr 16, 2024
@jasmussen jasmussen moved this from Next to Now in Design priorities Apr 16, 2024
@jasmussen
Copy link
Contributor

Thanks to beautiful work by @beafialho, I've updated this issue with designs attached. There's a lot to dive into, you can explore the linked Figma, but for now the main focus has been on updating the book itself, what's inside the frame. Especially on that, please share your thoughts. CC: @WordPress/gutenberg-design

@jasmussen jasmussen added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Apr 29, 2024
@jasmussen jasmussen moved this from Punted to 6.5 to Needs Dev / Todo in WordPress 6.4 Editor Tasks Apr 29, 2024
@jasmussen jasmussen moved this from Now to In Dev in Design priorities Jun 26, 2024
@jasmussen jasmussen moved this from In Dev to Needs Dev in Design priorities Jun 26, 2024
@vcanales
Copy link
Member

I've been looking into these designs and I have a few questions and thoughts:

A “Landing” tab that would serve as the landing page of the stylebook. A short page, displaying only blocks that more commonly and immediately are able to represent the theme.

How are we going to define which blocks comprise this list?
Should we build a static page that displays these blocks, or will we use block.json to feature the blocks in the Landing page somehow? Currently, the Style Book renders blocks into each tab according to the category attribute in block.json, and only if they include an example attribute as well.

  • Rearranging the order of the blocks by level of relevancy: seek out an order that makes the most sense when editing a website.

How and where are we going to define this hierarchy? Blocks in the styles book are currently rendered in the order in which they are registered, if I'm not mistaken.
I'm thinking that the Landing Page might become outdated if we rely on a static list of blocks ie. if we add future important blocks, we'd also have to update the landing page manually.

  • Adding subcategories that would organize blocks better within each tab. For example the “Theme” tab would contain “Site Identity”, “Posts” and “Comments”.

This might be an answer to the first question; we could add a subcategory which the Landing Page compiles blocks from. The keywords attribute is another candidate.

  • Updating demo content, mostly images and media maintaining a more cohesive connection between them, but also headings, paragraphs and quotes.

Demo content is mostly the placeholders for each block, currently. I think we could be taking further advantage of the example metadata attribute to create richer previews.

@jasmussen
Copy link
Contributor

Thank you for looking, @vcanales!

How are we going to define which blocks comprise this list?

We'd manually curate this list according to the suggestions in the mockups.

How and where are we going to define this hierarchy? Blocks in the styles book are currently rendered in the order in which they are registered, if I'm not mistaken.

How are we curating these?
Screenshot 2024-07-31 at 12 50 28

Essentially we only need a few of the blocks to be "prioritized" in a particular order, and after those, anything else can show up.

I'm thinking that the Landing Page might become outdated if we rely on a static list of blocks ie. if we add future important blocks, we'd also have to update the landing page manually.

The landing page should specifically have a goal of giving you a sense of the site design. To that end, this can be thought of more like a highly curated and stylized "style card", like this:

Screenshot 2024-07-31 at 12 53 48

It wouldn't need to be updated that often, in part because we don't often add new blocks, in part also because it is intentially a subset. If you want to see all the blocks, you have to dive into the tabs.

Demo content is mostly the placeholders for each block, currently. I think we could be taking further advantage of the example metadata attribute to create richer previews.

This is likely fine to separate out exactly as you suggest, and not make part of this particular task. We definitely need to enrich the demo content across the board, update the current preview images, etc.

@ramonjd
Copy link
Member

ramonjd commented Sep 9, 2024

Worth here connecting dots with #38277 (comment) that expand on what gets shown for navigation items. Notably, it explodes the navigation item into one unit for each state, hover, focus, current, etc.

Nice! Thanks for cross-linking that work.

I can work with reasonably little detail initially - I think it's a good opportunity to set the style book up for flexibility. By that I mean, create a component that can consume some sort of map or config, which folks can tweak to determine categories/blocks etc. And then concentrate more on the content.

That's the theory anyway 😄

@beafialho
Copy link

By the way, what is the Text > Custom link block? 🤔 I can't seem to find it.

@ramonjd I'm currently seeing "Custom Link" under the Design tab:

Captura de ecrã 2024-09-09, às 12 18 05

@vcanales
Copy link
Member

vcanales commented Sep 9, 2024

@ramonjd By that I mean, create a component that can consume some sort of map or config, which folks can tweak to determine categories/blocks etc. And then concentrate more on the content.

Are you thinking of including this config in the block.json definition? A not-so-flexible approach I thought of was adding a subcategory attribute, but we could also consider further categorization or customization to improve discoverability with a broader config schema. Here's the PR with the subcategory attribute suggestion, by the way.

@vcanales
Copy link
Member

vcanales commented Sep 9, 2024

@ramonjd By the way, what is the Text > Custom link block? 🤔 I can't seem to find it.

It's the navigation link block, isn't it?

@ramonjd
Copy link
Member

ramonjd commented Sep 10, 2024

not-so-flexible approach I thought of was adding a subcategory attribute

@vcanales Thanks for the suggestion.

I had the same thought, but wasn't sure if it warranted updating the block.json schema (and every block.json file) just yet when things could be hard-coded for the first iteration.

I hadn't seen your PR yet however, and I think it's a good idea to allow deeper categorization in general, for example, to make things more discoverable and sortable. I haven't looked closely yet, but do you think some of the existing Core filters and other functionality would also need to be aware of sub-categories?

It's the navigation link block, isn't it?

Oh yeah, thanks for pointing that out 🤦🏻

Custom link doesn't really mean much out of context, at least to me.

@vcanales
Copy link
Member

vcanales commented Sep 11, 2024

(and every block.json file)

We could get away with adding them incrementally; I think a potential subcategory attribute should remain optional.

I haven't looked closely yet, but do you think some of the existing Core filters and other functionality would also need to be aware of sub-categories?

Yes, in my proposal for the schema, subcategories would be children of an existing category, so we'd have to add this awareness.

Custom link doesn't really mean much out of context, at least to me.

Agreed. I don't think the block's title describes it in a way that makes it easy to find.

@ramonjd
Copy link
Member

ramonjd commented Sep 25, 2024

Related:

Proposed also a "typography" tab.

ramonjd added a commit that referenced this issue Sep 30, 2024
This commit creates a static category map based on list defined in Style Book: Iterate on presentation and design. #53431. It also:

- Sorts examples based on static categories and their subcategories
- Introduces simple layout for subcategories (under theme)
- Adds unit tests for utils
- Converts utils to TypeScript

Co-authored-by: ramonjd <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: vcanales <[email protected]>
Co-authored-by: jasmussen <[email protected]>
huubl pushed a commit to huubl/gutenberg that referenced this issue Oct 2, 2024
This commit creates a static category map based on list defined in Style Book: Iterate on presentation and design. WordPress#53431. It also:

- Sorts examples based on static categories and their subcategories
- Introduces simple layout for subcategories (under theme)
- Adds unit tests for utils
- Converts utils to TypeScript

Co-authored-by: ramonjd <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: vcanales <[email protected]>
Co-authored-by: jasmussen <[email protected]>
@andrewserong andrewserong added the [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues label Oct 15, 2024
@richtabor richtabor changed the title Style Book: Iterate on presentation and design. Style Book: Iterate on presentation and design Oct 23, 2024
@richtabor richtabor removed [Type] Enhancement A suggestion for improvement. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Oct 23, 2024
@andrewserong andrewserong moved this from Needs Dev to In Dev in Design priorities Oct 25, 2024
@andrewserong andrewserong added [Status] In Progress Tracking issues with work in progress and removed Needs Dev Ready for, and needs developer efforts labels Oct 25, 2024
@andrewserong
Copy link
Contributor

Update: work is underway on this one so I've updated this to "In Progress" from "Needs Dev". A couple of the PRs for this that have landed so far include:

Here's how the Colors tab is looking on trunk:

2024-10-25.14.15.33.mp4

Also, discussion is happening over in #66376 on where the Styles screen (and therefore Style Book) will live in the future.

@ramonjd
Copy link
Member

ramonjd commented Oct 28, 2024

I attached a sub issue for the landing page:

However given the following:

I don't really understand the case for implementing it yet.

My current impression is that we won't know until the dedicated style screen is defined. There are several open questions, namely:

  • what's on the landing page
  • how should users interact with it, particularly if it's integrated into a global styles view
  • how theme developers can customize it

@jasmussen
Copy link
Contributor

Working with @tellthemachines and @matiasbenedetto on #67541, #67546 and #66545, and especially #65619, it's become clear that a few aspects of the initial issue here are now slightly out of date, and can benefit from some clarity. So I worked to add some clarity in this Figma, to outline new categories that work well with Styles in the site view of the site editor. Mockup:

Image

A few changes here, including some small tweaks to make spacings and metrics unified.

Two heading styles: major heading (16px font size) and subheading (13px font size):

Image

Color swatch size has been clarified. On the landing page, they are small, 4 columns, 32px height:

Image

On the Colors drilldown page, they are 2 colummns and bigger (52px, should that be 64? CC: @WordPress/gutenberg-design ):

Image

Speaking of drilldowns, in order for the style book to be contextual to Global Style sections (Typography, Colors, Background, Shadows, Layout, Blocks, and individual blocks), the categories initially outlined here I've revisited. Tentatively, with this suggestion:

Main Styles section: show the Landing category:

Image

Styles → Typography: Show the Typography category:

Image

Styles → Colors: show the Colors category:

Image

Styles → Blocks: Show all remaining Style book categories in one long list, subdivided by headings:

Image

That absorbs categories Site Identity, Design, Posts, Media, Widgets, and any sections plugins add.

Styles → Blocks → Button: Show just the Buton block:

Image

Styles → Blocks → Navigation:

Image

Here are some more contextual examples:

Image

Image

Image

CC: @beafialho @ramonjd @annezazu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Style Book [Status] In Progress Tracking issues with work in progress [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues
Projects
Status: In Dev
Status: Needs Dev / Todo
Development

No branches or pull requests

9 participants