Skip to content

Dedicated Styles Screen #66376

Closed
Closed

Description

@jasmussen

Brief

Global styles allows you to change the visual appearance of your whole website. It is also the visual interface to the singular theme.json file for a block theme. For the moment, global styles uses the sidebar API to make it live as a sidebar panel in the edit view of the site editor. Historically this has been useful to iterate the interface and make progress on the engine itself.

Fundamentally, however, the Site Editor edits individual templates or pages, making it a local interface rather than a global interface. Further, the contextual global styles sidebar panel (click a block to change the global styles for that block) is easily confused with the contextual local block inspector. You might have the global styles sidebar open, click a paragraph wanting to change the font size, and click "Typography".

A solution to that can be to move the global styles out from the edit view, and into the site view.

Proposal

Mockup showing the site editor, edit view, with the Styles section selected, global styles inside.

In this view, the Style book can be the default view for the site editor, loaded in the frame on the right. The frame in this case, is not interactive, it's a visual preview of the styles that are chosen in the interactive panel.

This mockup relies on, and integrates design iterations to the Style book as tracked in #53431. In that issue, a curated "Overview" section of the style book is created to show the most important aspects of your website visual identity; color, typography, heading level sizes, etc.

  • If you click Typography, the frame preview updates to show an exploded view of all type styles of the site.
  • If you click Colors, the frame preview updates to show just a map of the color swatches.
  • If you drill into the block section, each individual block, perhaps even patterns that leverage this block, can be shown. This will, for example, be useful should we move in the direction of showing pseudo states as well, in this exploded view (see Standardized way to modify interactive states (:hover, :focus .etc) for blocks #38277 (comment))

For the moment, the visual mockup above assumes a 1:1 transplant of the existing global styles sidebar into site view. See more explorations in Figma, here and here. One of those explorations can be seen here, and can be part of a future evolution of this work:

styles.mp4

Related: #53483.

Activity

  1. added
    [Feature] Site Editor
    Global Styles
    on Oct 23, 2024
  2. richtabor commented on Oct 23, 2024

    @richtabor
    Member

    In this view, the Style book can be the default view for the site editor

    I'm not particularly confident in having style book as the default for this view. I would think that you'd want to see the effect of style changes on your site, rather than abstracted in style book.

  3. ramonjd commented on Oct 24, 2024

    @ramonjd
  4. tellthemachines commented on Oct 24, 2024

    @tellthemachines
    Contributor

    I'm all for moving global styles to a place where it's easier to access! I do think we have to be careful with screen real estate and the double sidebar. Looking at the figma links, this one looks like it might make best use of space:

    Image

    Alternatively, it could also work to have the whole global styles menu in the black sidebar and open up "browse styles" by default in the second sidebar (my shitty mockup below, sorry)

    Image

    Whichever way we go with this, we need to consider where the stylebook is going to live in the future.

    • Is the goal to transfer global styles completely to the left hand sidebar, eventually removing it from the right where it is now?
    • If so, the stylebook will also move the left sidebar, and that means we have to add the tabs and clickable interactions we aim to add as part of Style Book: Iterate on presentation and design #53431.

    Or

    • Is the current global styles going to stay forever where it is, with the full stylebook hidden inside it, while the version of global styles in the left hand sidebar shows only a reduced (non-tabbed, non-clickable) style book?

    I think we need to decide which way to go soon, otherwise we risk doing a ton of work on the stylebook that will later have to be changed or undone if we decide to move it somewhere else.

  5. youknowriad commented on Oct 24, 2024

    @youknowriad
    Contributor

    I think we need to acknowledge that the current mix of global styles and templates or global styles and document editing is bring unclarity to regular users.

    I understand the arguments about Changing global styles and wanting to see the changes in a given template/post...

    But for me, we've over optimized for this causing more confusion for regular users wanting to just change some obvious global styles (colors, backgrounds...), the common case over advanced users that know what they're doing when they open the global styles sidebar.

    For regular users, they mostly get confused about What is this sidebar in the editor even about, is it about the current selected block, the current selected document or global (unless you know your way around WordPress, and FSE, for most it's very hard to understand that it's global) and no snackbar, guide or whatever is going to change that, these are complementary and not the real solution to the problem. It is also really easy to be overwhelmed when you go into the editor when you only want to make some global styles changes.

    So, yeah, for me the only solution is to actually pull away the sidebar from the editor into its own global "styles" section. This doesn't come without challenges, but I think the confusion above is more important to solve than the challenges that come with moving this to a global place:


    Challenges:

    • What to show when you edit global styles: Yes, showing "style book" is not sufficient or is not ideal but IMO, for the common cases, it's better than forcing users to go to the editor. So practically speaking, I'm more than happy with shipping with stylebook as initial iteration (while keeping the current sidebar in the editor as we iterate for advanced use-cases). Also worth noting that this allows us to open the screen to classic themes, as these themes don't have templates that can load in an editor but they can still benefit from global styles and stylebook.
    • As a second step, I saw same Ideas about a full browse mode where you actually load the frontend in the "preview" and not an abstracted version (editor) and you allow the user to actually navigate the frontend normally without the addition of "style injection" into the frontend. This is also not without its own challenges but it's worth exploring.
    • An intermediary step could be to offer a toggle in this "global styles" focused editor to switch between "home page" and "style book".
    • Advanced usage: I think what would be great as well, would be to allow themes to build their own "style book" / "design system kind of showcase" and use it in this section.

    All these become possible if we start thinking about this section as an "editor focused on global styles" which free us from thinking about templates, pages... and I believe clarify things for the users and simplifies the mental model.


    Another challenge raised above is about the sidebar design. I think that's an ok tradeoff to embrace for now, I agree it's not ideal, but the same issue exists for "list views" for pages and we didn't see too much dramatic feedback about it. It deserves a unified solution rather than one that is specific to styles.

    • The unified solution could be to "ditch" this middle sidebar entirely but that requires rethinking the design of these middle sidebars.
    • It may be simpler for global styles to move everything to the "black" sidebar. The challenge there is that our UI components are not yet capable of rendering in a dark background cleanly yet.
  6. tellthemachines commented on Oct 24, 2024

    @tellthemachines
    Contributor

    The challenge there is that our UI components are not yet capable of rendering in a dark background cleanly yet.

    How hard a problem would that be to solve though? I reckon it's worthwhile considering, especially now that this pattern of black sidebar + white sidebar seems to be spreading throughout the UI 😄

  7. youknowriad commented on Oct 24, 2024

    @youknowriad
    Contributor

    How hard a problem would that be to solve though? I reckon it's worthwhile considering, especially now that this pattern of black sidebar + white sidebar seems to be spreading throughout the UI

    I can't tell for sure, I know that we did experiment with the global styles in the "black area" with @jorgefilipecosta a long time ago, it was doable with some CSS hacks. It might be better today. So we won't know unless we try it (if designers think this is a good approach)

  8. jameskoster commented on Oct 24, 2024

    @jameskoster
    Contributor

    How hard a problem would that be to solve though?

    Themeable components is an important part of the admin redesign and design systems work. It will enable user personalisation through light/dark modes, contrast preferences, and so on. It's not a trivial task though cc @ciampo @mirka @tyxla.

    The unified solution could be to "ditch" this middle sidebar entirely but that requires rethinking the design of these middle sidebars.

    At its core, the dark sidebar is primarily for navigating through the admin, so elements of the Styles UX—such as switching between variations, colors, typography, and blocks—could theoretically be placed there (needs design exploration). However, I believe that forms should remain within the Content Frame (the middle sidebar). It's important to note that the Content Frame is the same container in which Data Views live. Ideally, we should align with these emerging conventions to maintain consistency and avoid ad hoc solutions that water down the overall UX. I appreciate that documenting layout would be helpful, it would be good to do this as a part of the design systems work.

    Initially it seems simplest to place the entire Styles panel inside the content frame, like the mockups in the OP. Moving the navigational pieces to the sidebar could happen (as mentioned above), but needs some design exploration.

    In terms of switching between site / style book, there is a mockup here:

    menu
  9. jasmussen commented on Oct 24, 2024

    @jasmussen
    ContributorAuthor

    We can potentially make the style vs. templates even more visible a switch, by making it a segmented control (if we can find good labels). But even then we have to acknowledge that in this site-view first version of styles, there's currently no interface for choosing which template you can see. It's just the homepage. Which has value of course, and is arguably sufficiently representative of "the site" to be useful. But I agree with the arguments presented, for why Style book is ultimately a better default, including these:

    I think we need to acknowledge that the current mix of global styles and templates or global styles and document editing is bring unclarity to regular users.

    I understand the arguments about Changing global styles and wanting to see the changes in a given template/post...

    But for me, we've over optimized for this causing more confusion for regular users wanting to just change some obvious global styles (colors, backgrounds...), the common case over advanced users that know what they're doing when they open the global styles sidebar.

    An added value of global styles in site view is that this can much more easily make the site editor with global styles available to classic themes, or even hybrid themes, because a style book can be useful for any one of those configurations.

    An additional benefit is that if we were to move towards the style book being the primary place where you can see and style every state of a block (current menu item, hover, active, focus), it may increase the prominence and discoverability:

    Style Book with States, i2

    The style book is a coffee-table book, a visual identity of your website. It shows every block, heading, color, and setup that you have available, even when those blocks are not used in your site yet.

  10. mtias commented on Oct 24, 2024

    @mtias
    Member

    @jameskoster also curious if instead of a dropdown with two options it could just be a segmented control with two options.

  11. changed the title [-]Styles panel: Show global styles, and style book by default, in site view[/-] [+]Dedicated Styles Screen[/+] on Oct 24, 2024
  12. 13 remaining items

  13. added
    Needs Accessibility Feedback
    on Oct 29, 2024
  14. jameskoster commented on Oct 29, 2024

    @jameskoster
    Contributor

    Were you imagining these both coexisting?

    Excellent question, one we should answer before redesigning the panels for sure. I see a lot of feedback that the Styles panel in the editor creates a lot of confusion, I sometimes get caught out by it myself! That said it should still be possible to reach global styles from the editor somehow.

    refine the responsiveness of the double sidebars.

    Agreed, though this is a global consideration. Saxon shared some ideas here.

    Sections of content, where in this case 'content' is a set of logically related controls, should alays be identified by a meaningful label.

    I'm not against labels for each section at all.

  15. jameskoster commented on Oct 29, 2024

    @jameskoster
    Contributor

    They all assume that moving global styles into the site view works, so we'll need some stepping stones to get there first, with a reduced set of variables.

    Agreed. Landing the PR associated with this issue feels like a good first step. I think it's just missing the Style Book toggle.

  16. ramonjd commented on Oct 29, 2024

    @ramonjd
    Member

    I think it's just missing the Style Book toggle.

    iI wasn't obvious to me at first, but I think I found it. Maybe I was expecting a different icon. 🤔

    2024-10-30.08.05.09.mp4
  17. annezazu commented on Oct 29, 2024

    @annezazu
    Contributor

    iI wasn't obvious to me at first, but I think I found it. Maybe I was expecting a different icon. 🤔

    This isn't obvious enough IMO. I could not find it until seeing this video :)

  18. ramonjd commented on Oct 29, 2024

    @ramonjd
    Member

    I'm thinking it could be moved to the header (if that's possible). We're still relying on the icon telling the story, it might be more accessible and faster to grok with a text button. 🤷🏻 I'll play around.

    Image

  19. tellthemachines commented on Oct 29, 2024

    @tellthemachines
    Contributor

    it might be more accessible and faster to grok with a text button

    It'll definitely be more accessible. Those icons all look the same to me 😅

  20. afercia commented on Oct 30, 2024

    @afercia
    Contributor

    This isn't obvious enough IMO. I could not find it until seeing this video :)
    Those icons all look the same to me

    Please use a text button.
    Icon buttons have inherent accessibility and usability problems. To be more clear: the proliferation of icon buttons is problematic.
    As reported several times in many other issues and PRs: icon buttons may add value in certain cases when they are limited to a set or well recognizable icons. However, wherever the UI provides enough space to show visible text, text buttons should be preferred.
    I'm not opposed to buttons that show an icon and visible text, as that would use the best from both worlds.

    I find particularly confusing icon buttons that 'switch' icon depending on the state. This has been reported as problematic several times as well. Buttons should not be used to communicate the state or the selected value. Instead, buttons must clearly communicate the underlying action. I do see this pattern is used in other places in the UI but I'd warn against it and strongly recommend to reconsider it.

  21. richtabor commented on Oct 31, 2024

    @richtabor
    Member

    iI wasn't obvious to me at first, but I think I found it. Maybe I was expecting a different icon. 🤔
    This isn't obvious enough IMO. I could not find it until seeing this video :)

    Same. I'm not a proponent of this one button toggle icon to switch between the two views. Do we have this pattern elsewhere?

  22. ramonjd commented on Oct 31, 2024

    @ramonjd
    Member

    I'm not a proponent of this one button toggle icon to switch between the two views

    It's going through iterations. I'll aim to implement @jameskoster's tip on the Menu component.

  23. jasmussen commented on Nov 1, 2024

    @jasmussen
    ContributorAuthor

    #65619 is close to landing. I shared a slightly updated mockup there, will copy it here as well:

    Image

    Same button, compact, lines up vertically with items in the list, same style as is used in similar contexts (including the document inspector, etc). Click to toggle between style book and templates.

    It's worth remembering what the goal is here:

    Details are important. But it's also easy to get caught up in looking far ahead, through style updates, the appearance of menu items, separators or not. All of those are valid and worth getting to, but it's useful to focus on the specific improvements at hand first, get this into the plugin so that it can be tested, and to help inform those future iterations so we move with intent.

    To that end, I would suggest putting the few final tweaks on #65619, and then moving all attention to improving the style book (#66517). After that, we can make progress on bringing these improvements to classic themes (#41119, #64409), which is oft-requested and can be a big win, and after that, allowing the styling of pseudo states (#38277 (comment)). This will significantly help block themes, that users are able to finally provide clear and contrastful focus styles, in the visual editor where we can show contrast warnings as aids. Default browser focus styles are not always sufficient.

    This will also not preclude future enhancements, as noted initially in this issue, which refer to space efficiency, merging columns, and providing theme packages to enable the styling controls in additional color contexts. As noted on details, we'll get to this, but perhaps best to focus on the more meaningful steps forward that we can take first.

  24. tellthemachines commented on Nov 6, 2024

    @tellthemachines
    Contributor

    Should this issue have been closed by #65619 or are we still planning to improve the double sidebar experience by moving the global styles navigation into the black sidebar?

    To that end, I would suggest putting the few final tweaks on #65619, and then moving all attention to improving the style book (#66517).

    With #65619 merged and with #66719 upcoming, the designs in #66517, which explicitly deal with a tabbed interface, are less applicable.

    I've started work on a landing section for the style book in #66545, so playing with that should be a good starting point for working out what this landing will look like with the style book in its new location. I'd appreciate feedback, ideas, designs on this!

  25. andrewserong commented on Nov 6, 2024

    @andrewserong
    Contributor

    Should this issue have been closed by #65619 or are we still planning to improve the double sidebar experience by moving the global styles navigation into the black sidebar?

    We've implemented the first stage, and there's quite a lot of discussion here, so closing seems appropriate to me. We could open up a follow up issue to tackle the next stage(s) of working on moving some things to the black sidebar and progressing the designs further?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesNeeds Accessibility Feedback[Feature] Site Editor[Feature] Style Book[Type] Overview

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions