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

Resolve PrivateInserter with standard Inserter #48824

Closed
getdave opened this issue Mar 7, 2023 · 6 comments
Closed

Resolve PrivateInserter with standard Inserter #48824

getdave opened this issue Mar 7, 2023 · 6 comments
Labels
[Block] Navigation Affects the Navigation Block [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.

Comments

@getdave
Copy link
Contributor

getdave commented Mar 7, 2023

In #48752 we created a PrivateInserter for usage in the Navigation Offcanvas to allow us to customise the ordering of blocks in the inserter.

We need to decide how to resolve this longer term so that there is no need for this private wrapper.

@getdave getdave added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Block] Navigation Affects the Navigation Block Needs Technical Feedback Needs testing from a developer perspective. labels Mar 7, 2023
@getdave
Copy link
Contributor Author

getdave commented Mar 7, 2023

cc @scruffian @ntsekouras

@kathrynwp kathrynwp added the [Type] Enhancement A suggestion for improvement. label Mar 7, 2023
@talldan
Copy link
Contributor

talldan commented Apr 17, 2023

What kind of technical feedback is needed?

@ntsekouras
Copy link
Contributor

I don't think the existence of the private wrapper is an issue and what we might want to question, is the actual orderInitialBlockItems API. Currently the ordering is in trunk and we could consider:

  1. Removing that API completely if it's not needed anymore. That would remove the wrapper too for now as there are no private APIs for the Inserter.
  2. Stabilize the current API(thus no need for the private wrapper for now too)
  3. Explore a different API to achieve the same result and stabilize that one(remove wrapper) or just replace orderInitialBlockItems as private API(keep the wrapper).

@getdave
Copy link
Contributor Author

getdave commented Apr 19, 2023

Yes what I'm saying is we have a Private inserter. Why do we need one? How can we make it so we don't need one.

Nik is right that orderInitialBlockItems is the issue. It's required to achieve specific functionality required by UX for the Nav block.

We don't want to open the block inserter up to "abuse" in terms of certain blocks being forced to the front.

That said, I don't think it would be possible to use the orderInitialBlockItems API to override the behaviour in the Editor itself as there aren't any extension points.

It's only useful if folks use their own custom implementation of <Inserter> in their own Plugin.

@scruffian
Copy link
Contributor

Connected to #49959

@youknowriad
Copy link
Contributor

This component doesn't exist anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants