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

[Tracking] Block Manager Enhancements #28572

Open
2 of 4 tasks
ntsekouras opened this issue Jan 29, 2021 · 15 comments
Open
2 of 4 tasks

[Tracking] Block Manager Enhancements #28572

ntsekouras opened this issue Jan 29, 2021 · 15 comments
Labels
[Feature] Block Variations Block variations, including introducing new variations and variations as a feature General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@ntsekouras
Copy link
Contributor

ntsekouras commented Jan 29, 2021

Block Manager is the place where we can select which blocks we want to hide/show from the inserter in the editor.

There are enhancements that need to be made and this serves as a small tracking issue.

Regarding the redesign of Block Manager here is the gif from the original issue:
2020-11-18 18 44 58

@ntsekouras ntsekouras added General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels Jan 29, 2021
@ntsekouras ntsekouras changed the title [Overview] Block Manager Enhancements [Tracking] Block Manager Enhancements Jan 29, 2021
@bph
Copy link
Contributor

bph commented Jan 30, 2021

We recently took a site live were multiple team members collaborated designing the site and adding content, each aiming for the best outcome with blocks.

Some installed additional blocks from plugins to test and provide options or just do a proof of concept.

Before we took the site live, we noticed there are now 148 blocks available over 4 additional plugins + core.

We now have no way to find out which blocks were used over 40 pages and posts. I looked at a few Block managers plugins and none seems to be able to provide an answer to a fairly basic question:
Which blocks did we actually use throughout the site?

We would need the information to decide on which plugin can we safely uninstall.and which should we keep.

A revamp of Block managers could - and should- provide an answer.

Just a decision on switching off a block for a site that has been used for a while should be an educated decision to avoid that a used block is turned off inadvertently and can't be edited anymore.

@jimmy19742
Copy link

jimmy19742 commented Jan 31, 2021

@bph Dear Ms Birgit , I'm absolutely sure that Nick Hamze ( might not be spelled correctly) built such a plugin due to his personal encounter with this issue about an year ago. I will eloborate :He didn't know if he deleted a blocks plugin where any of the blocks shipped with it had been on his sites and much more. I am also absolutely sure that his plugin was covered by Justin Tadlodk that is WP Tavern.

I think it's proprietary and not in the official repo but on some of his sites. However I'm not absolutely sure about that. Why don't you( Gutenberg team) reach out to him and ask him? He's a skilled young React developer . I'm not!!! On the hand I have not seen him lately. On Twitter , I mean.

@susancycles
Copy link

susancycles commented Jan 31, 2021

"Which blocks did we actually use throughout the site?"

This would be so helpful. If you're getting rid of plugins that aren't being used enough to justify the weight they add to the site, it would be so much simpler if you knew where blocks are being used.

@skorasaurus
Copy link
Member

I don't know whether Nick Hamze has a plugin that describes what you're looking for but there's also one by Eddy Sims - https://github.com/eddysims/find-my-blocks

@bph
Copy link
Contributor

bph commented Feb 1, 2021

Thanks @jimmy19742 @susancycles and @skorasaurus 🎉
Thanks for the tip with the plugin.

If the Gutenberg team is going through the motions to refactor Block manager, might as well elevate the functionality from the earlier iteration and add useful information. 🙂

@bph
Copy link
Contributor

bph commented Feb 1, 2021

A simple "found in 2 posts" next to the block might be sufficient.
Screen Shot 2021-02-01 at 2 12 49 PM

Example from the Find my blocks plugin
Screen Shot 2021-02-01 at 2 10 37 PM

@susancycles
Copy link

Identifying the number of instances is helpful if I want to remove unused blocks/collections, but I'll need to know where the instances are if I want to convert a page/post to a different block collection as I'm tidying things up down the road. I can see a two-step process where core tells me I've used a specific block X number of times, then using a plugin to locate them. Is that what you envision, @bph ?

@bph
Copy link
Contributor

bph commented Feb 2, 2021

Yes, @susancycles that's pretty much what we did. We consolidated the use of 3 different post grid blocks to one.

But I wouldn't need more help from the Interface. Once I know which blocks are actually used, I can use Search in the post / page admins to find out which particular block string is use in which post or pages.

An example: the list tells me we used the block gb-post-grid. The screenshot shows the search results right in the pages list.

Screen Shot 2021-02-02 at 7 53 09 AM

Having a link to the search would be great. I am ok with just having the information which block string I need to search for. That's just me though....

@susancycles
Copy link

Oh that's good thinking. That will work perfectly!

@ntsekouras
Copy link
Contributor Author

Thank you all for the interesting input/feedback. It seems that showing information about block usage is a needed feature. I'll add it in the PR's description for now and later create a ticket for it.

@Zealth57
Copy link

Zealth57 commented Feb 3, 2021

Knowing how many posts use a particular block seems like and edge case needed to know when to uninstall a plugin, not on every single page. I’m not sure how this would even be accomplished in a performant way across tens or hundreds of thousands of posts. Think about news site with tons of blocks and posts in the database having to maintain that count.

@bph
Copy link
Contributor

bph commented Feb 3, 2021

@Zealth57 It might just be that the site with tenth of thousands of posts is actually the edge case. I would think there are many more DIY Bloggers and Site owners or even smaller teams who can use this, to keep the Kitchen drawer chaos in check. 🥰

The 'Find My Blocks' plugin has a nice feature to switch off the information for core/blocks.

@Zealth57
Copy link

Zealth57 commented Feb 3, 2021

Sites with thousands of posts aren't edge cases, especially considering blocks will be used across pages, posts, and any custom post type you register. The plugin referenced here loops through every post, parses every block, and builds counts every time you edit or create a page. That couldn't be scalable at all and would waste resources for something I would consider niche. Is it a nice feature? Sure. But is it something 80%+ of users would use? I don't think so, and it should stay in plugin territory which one already exists rather than bake into core. If it was in core it wouldn't be a trivial task if it's done correctly. It should include cached counts similar to how taxonomy counts work. Taxonomy counts are cached because even at a few hundred or thousand posts you can't be counting stuff on the fly.

@ntsekouras
Copy link
Contributor Author

Hey 👋 - I've created a separate ticket for showing the blocks count here: #28693

Please continue there any related discussions to be grouped better. Thanks!

-cc @bph and @Zealth57

@CodingSamurai
Copy link

@Zealth57 It might just be that the site with tenth of thousands of posts is actually the edge case. I would think there are many more DIY Bloggers and Site owners or even smaller teams who can use this, to keep the Kitchen drawer chaos in check. 🥰

There may be more DIY Bloggers & small biz site owners but please do NOT discount the Enterprise WordPress users as some sort of "edge case". Hundreds of large enterprises are now investing in WordPress and WordPress has a bad enough reputation around performance that it does a GREAT disservice to handwave away performance impacts for large sites as an "edge case".

We have a site with over 500,000 posts and two others with tens of thousands of posts and we're not unique when large organizations like Vox Media and the White House are running on WordPress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Variations Block variations, including introducing new variations and variations as a feature General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

No branches or pull requests

7 participants