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

Reusable blocks: Add to Block Manager #19400

Closed
wants to merge 4 commits into from

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Jan 3, 2020

Description

Closes #13390.

WIP

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@gziolo gziolo added the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Jan 3, 2020
@gziolo gziolo assigned mapk and gziolo Jan 3, 2020
@mapk
Copy link
Contributor

mapk commented Jan 4, 2020

The "Manage All Reusable Blocks" link has been removed from the Options popover.

Screen Shot 2020-01-03 at 4 57 24 PM

The Reusable blocks category is now added to the Block Manager along with the "Edit blocks" link.

Screen Shot 2020-01-03 at 4 58 04 PM

@@ -75,6 +75,10 @@
font-size: 0.9rem;
font-weight: 600;
}

> a {
float: right; //Aligning link to the right of category heading.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like using float changes only the visual appearance but not the tabbing order:
tab-order-block-manager

We need to find a different approach here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was wondering about that. float:right works easier this way, but tab order is off now. I'll fix this.

@mapk
Copy link
Contributor

mapk commented Jan 7, 2020

I've added flexbox to the category title to improve the tab order.

tab-order 2020-01-07 12_43_28

@mapk mapk added the [Status] In Progress Tracking issues with work in progress label Jan 30, 2020
@gziolo gziolo force-pushed the update/reusable-blocks-manager branch from faa3d6f to 981a4e2 Compare February 5, 2020 10:07
@gziolo gziolo force-pushed the update/reusable-blocks-manager branch from 2598057 to ec54604 Compare February 5, 2020 16:09
@gziolo
Copy link
Member Author

gziolo commented Feb 5, 2020

@mapk, I'm nearly there. I still need to apply filtering for Reusable Blocks in the inserter. Block Manager seems to work as intended. I didn't test it very extensively, I will resume tomorrow.

Screen Shot 2020-02-05 at 17 12 49
Screen Shot 2020-02-05 at 17 12 59

@gziolo
Copy link
Member Author

gziolo commented Feb 7, 2020

I must admit that I didn't anticipate the amount of refactoring necessary to apply this simple change. First, we had to ensure that reusable blocks are exposed in the Block Manager. I wrongly assumed that they are there. Now, it’s tricky to filter out hidden reusable blocks from the inserter, because the existing logic depends on the list of allowed blocks that can be exposed from the server and then merged with those hidden in the Block Manager by users.

It’s also very likely that we will want to make it possible to hide newly introduced block variations from the inserter as well. Ideally, we tackle reusable blocks in a way that makes it easy to follow-up with block variations. I prefer to not rush with this feature and include it first in the regular flow where it lands in the Gutenberg plugin first and is properly tested.

@mapk
Copy link
Contributor

mapk commented Mar 6, 2020

How's this one going, @gziolo ? Is there anything I can help with?

@gziolo
Copy link
Member Author

gziolo commented Mar 10, 2020

How's this one going, @gziolo ? Is there anything I can help with?

I need to revisit it, there is some challenge in resolving how settings are propagated between internal packages. I hope to get back to it later this month.

@mapk
Copy link
Contributor

mapk commented Apr 14, 2020

@gziolo any updates on this one?

@gziolo
Copy link
Member Author

gziolo commented Apr 15, 2020

@mapk I was busy with other tasks, it's still on my todo list 👍

@gziolo
Copy link
Member Author

gziolo commented Jul 8, 2020

I'm starting extended leave soon (3 months) and I won't be able to finish this task until I'm back. If anyone wants to take over this task, feel free to do so 🥇

@gziolo gziolo removed their assignment Jul 8, 2020
@afercia
Copy link
Contributor

afercia commented Sep 24, 2020

Seems I can't test this PR: there's no "Reusable blocks" section in the modal for me. I guess this PR is a bit behind.

@gziolo
Copy link
Member Author

gziolo commented Oct 27, 2020

@afercia I'm afraid you are right. Let's close it and start fresh.

@gziolo gziolo closed this Oct 27, 2020
@gziolo gziolo deleted the update/reusable-blocks-manager branch October 27, 2020 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find a better place for the "Manage All Reusable Blocks" link
3 participants