Skip to content

Commit

Permalink
Show initial suggestions in rich text Link UI (#57743)
Browse files Browse the repository at this point in the history
* Show suggestions for rich text links

* Set default search query for initial suggestions to be for pages

* Revert "Set default search query for initial suggestions to be for pages"

This reverts commit b7cb1fe.

* Limit change to RichText only

* Colocate related props
  • Loading branch information
getdave authored Jan 24, 2024
1 parent 37ec4b6 commit ed46eac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/format-library/src/link/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ function InlineLinkUI( {
createSuggestionButtonText={ createButtonText }
hasTextControl
settings={ LINK_SETTINGS }
showInitialSuggestions={ true }
suggestionsQuery={ {
// always show Pages as initial suggestions
initialSuggestionsSearchOptions: {
type: 'post',
subtype: 'page',
perPage: 20,
},
} }
/>
</Popover>
);
Expand Down

1 comment on commit ed46eac

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in ed46eac.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7639567814
📝 Reported issues:

Please sign in to comment.