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

Global Styles: display inline preview on per-block settings #42919

Closed
mtias opened this issue Aug 3, 2022 · 10 comments · Fixed by #45719
Closed

Global Styles: display inline preview on per-block settings #42919

mtias opened this issue Aug 3, 2022 · 10 comments · Fixed by #45719
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Dev Ready for, and needs developer efforts [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@mtias
Copy link
Member

mtias commented Aug 3, 2022

When editing the global settings for a block in the "per block" section of styles, it'd be useful to render a preview at the top of the sidebar panel including the block example and how it's affected by the settings. This is relevant because global styles allows editing blocks that might not be present on the current page being previewed.

It currently looks like this:

image

Here's what a preview for Paragraph & Image could look like:

GS _ Blocks

  • Same 152px height for the top level preview as that of the GS style card
  • Uses the example content added for each block, but in cropped or curated (rather than zoomed) ways to show the correct font sizes applied

Upon diving deep into the structure, we can add a small preview button — the eye — to let you see a preview just like they work for style variations:

GS _ Blocks-1


Issue was updated Sep. 28

@mtias mtias added [Type] Task Issues or PRs that have been broken down into an individual action to take Needs Design Needs design efforts. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Aug 3, 2022
@jasmussen

This comment was marked as resolved.

@jasmussen jasmussen added Needs Dev Ready for, and needs developer efforts and removed Needs Design Needs design efforts. labels Sep 28, 2022
@jasmussen
Copy link
Contributor

For anyone subscribed, this issue has been updated with design ready for a dev to pick up!

@noisysocks
Copy link
Member

I'll plop this on my todo list since it's near to what I've been working on 🙂

@noisysocks noisysocks self-assigned this Sep 28, 2022
@mtias mtias mentioned this issue Oct 7, 2022
57 tasks
@annezazu
Copy link
Contributor

@noisysocks are you still planning to dig in here? Just doing a sweep of the various items on the phase 2 issue and wanted to ensure this was still assigned 💪🏼

@noisysocks
Copy link
Member

Yes it's next on my list. Realistically I won't be able to start on it until 21 November. If there's a dev who has more immediate availability feel free to take it from me.

@priethor
Copy link
Contributor

priethor commented Nov 2, 2022

Thanks, @noisysocks ! I'm unassigning the issue for now so that it doesn't appear as taken pm the Phase 2 board; feel free to reassign when you can start on it!

@madhusudhand
Copy link
Member

@noisysocks @priethor I have created a very primitive version of the component here #45507 to demo box-shadow in live action. I will extract the code and create a Draft PR here.

@madhusudhand madhusudhand self-assigned this Nov 11, 2022
@priethor priethor moved this from 💻 Needs development to 🏗 In progress in Gutenberg Phase 2: Customization Nov 12, 2022
@madhusudhand
Copy link
Member

madhusudhand commented Nov 15, 2022

While #45719 addresses the Block Preview at Level 1, how shall it behave upon diving deep into the block structure?

image

Questions to design:

  • Is it a pop over on click of 👁️ icon?
  • if so, can it be pinned?
    (in scenarios such as box-shadow, having a live preview always visible is important to set right shadow values)

CC: @WordPress/gutenberg-design

@jasmussen
Copy link
Contributor

Good question. In your box-shadow example (fresh designs herer), but also for a recent style variation example in #44417, it's actually useful to have that same top preview present not just on level 1 but on all levels.

Would it be possible to keep this preview on all those sub-levels as a starting point, omit the eye for now, and then we can evaluate how that works and see if we need the eye after all?

@mtias
Copy link
Member Author

mtias commented Nov 15, 2022

Would it be possible to keep this preview on all those sub-levels as a starting point, omit the eye for now, and then we can evaluate how that works and see if we need the eye after all?

Let's get the preview for the top level first merged, then follow up with the sub-levels.

Repository owner moved this from 🏗 In progress to ✅ Done in Gutenberg Phase 2: Customization Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Dev Ready for, and needs developer efforts [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants