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

LinkControl: Add control for adding blocks #50888

Closed
4 tasks
richtabor opened this issue May 23, 2023 · 4 comments · Fixed by #57756
Closed
4 tasks

LinkControl: Add control for adding blocks #50888

richtabor opened this issue May 23, 2023 · 4 comments · Fixed by #57756
Assignees
Labels
[Block] Navigation Link Affects the Navigation Link Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) Needs Dev Ready for, and needs developer efforts [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

richtabor commented May 23, 2023

Part of #50891

Currently, the Navigation Link block adds LinkControlTransforms to the foot of LinkControl.

Instead, let's simplify (while adding more functionality) by nesting the available blocks so that they are available after indicating the intent of adding a block.

I'm thinking a single "Add block" control that changes the state of LinkControl to a form of the quick inserter.

Tasks

  • Append "Add block" item to the foot of LinkControl, from Navigation Link block context only. Should be available on the initial state and when search results are rendered (no change from today).
  • Add "Back" button that when clicked reverts back to initial state of LinkControl.
  • Prioritize the Page Link, Custom Link, Submenu, Home Link, Site Logo, and Social Icons blocks.
  • Add "Browse all" button to open the block inserter in full (same as quick inserter).

Visual

Before After
CleanShot 2023-05-23 at 13 13 10 CleanShot 2023-05-23 at 13 13 28

Full flow

CleanShot 2023-05-23 at 13 34 57

Related

#47063

@richtabor richtabor added [Package] Components /packages/components [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Block] Navigation Link Affects the Navigation Link Block labels May 23, 2023
@richtabor richtabor changed the title LinkControl: Add control for inserting blocks LinkControl: Add control for adding blocks May 23, 2023
@richtabor richtabor mentioned this issue May 23, 2023
13 tasks
@getdave
Copy link
Contributor

getdave commented May 25, 2023

This seems good. It's specific to the Navigation Link and Submenu blocks so I'll bear that in mind.

@getdave getdave added the [Block] Submenu Affects the Submenu Block - for submenus in navigation label May 25, 2023
@mirka mirka added [Package] Block editor /packages/block-editor and removed [Package] Components /packages/components labels May 25, 2023
@richtabor richtabor added the Needs Dev Ready for, and needs developer efforts label May 30, 2023
@richtabor
Copy link
Member Author

and Submenu blocks so I'll bear that in mind.

You can add blocks to submenus?

@getdave
Copy link
Contributor

getdave commented Jun 6, 2023

and Submenu blocks so I'll bear that in mind.

You can add blocks to submenus?

Oh no actually you can't. Only "link" blocks. Ignore me 😄

@draganescu
Copy link
Contributor

draganescu commented Jan 11, 2024

What if we just show the inserter sidebar directly when add block is clicked?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Link Affects the Navigation Link Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) Needs Dev Ready for, and needs developer efforts [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants