Skip to content

[ LinkControl ] Implement enhanced inline page creation flow#77696

Open
sarthaknagoshe2002 wants to merge 3 commits intoWordPress:trunkfrom
sarthaknagoshe2002:fix/issue-72626
Open

[ LinkControl ] Implement enhanced inline page creation flow#77696
sarthaknagoshe2002 wants to merge 3 commits intoWordPress:trunkfrom
sarthaknagoshe2002:fix/issue-72626

Conversation

@sarthaknagoshe2002
Copy link
Copy Markdown
Contributor

What?

Closes #72626

Adds the enhanced page creation flow (previously exclusive to the Navigation block) to the global LinkControl component with additional improvements.

Why?

The previous inline creation flow was confusing, it instantly created a draft page without confirmation and offered no control over the title or status. This aligns the default LinkControl with the superior UX currently found in the Navigation Link block.

How?

  • Added LinkControlPageCreator which asks the user for the "holy trinity" of quick page creation: Title, URL Slug (dynamically auto-populated as you type), and Status (Publish/Draft).
  • Delegated the actual saveEntityRecord database call back up to the block consumers (e.g., Button/Edit.js, inline.js) via onCreateSuggestion.
  • Disabled the old inline creation dropdown item when the new dedicated bottom button is active to prevent duplicate UI elements.
  • The old legacy controls can be still used by passing showCreateSuggestionInDropdown as true.

Testing Instructions

  1. Open a post or page in the editor.
  2. Add a Button block, or highlight text in a Paragraph and press Cmd/Ctrl + K.
  3. Type a non-existent page name in the link search box.
  4. Click the new + Create page button at the bottom of the popover.
  5. Verify the new sub-view that opens and the Title is pre-populated.
  6. Verify the URL Slug auto-populates with a leading slash (e.g., /my-page) as you type, unless manually edited.
  7. Toggle the "Publish immediately" checkbox, click "Create", and verify the link is applied and the page was created in the backend with the correct status and slug.

Screenshots or screencast

Before After
Screenshot 2026-04-27 at 7 19 26 PM Screenshot 2026-04-27 at 7 20 54 PM
Screenshot 2026-04-27 at 7 20 13 PM Screenshot 2026-04-27 at 7 21 22 PM

@github-actions github-actions Bot added [Package] Block library /packages/block-library [Package] Format library /packages/format-library [Package] Block editor /packages/block-editor labels Apr 27, 2026
@sarthaknagoshe2002 sarthaknagoshe2002 marked this pull request as ready for review April 27, 2026 15:10
@github-actions
Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: [Package] Block library, [Package] Format library, [Package] Block editor.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: getdave <get_dave@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Package] Block editor /packages/block-editor [Package] Block library /packages/block-library [Package] Format library /packages/format-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Page Creation flow from Nav Link Block in default LinkControl

2 participants