Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Navigation panel: Add search to content menus #27280
Navigation panel: Add search to content menus #27280
Changes from 19 commits
8eabc5a
aa403d3
3763736
5dd0194
ab05739
0e993fd
ca9db07
82fe63f
36712a3
980d7da
01e5731
96f57bd
40336e1
bed56e4
eed8c0b
6849679
28a5ffd
7942cee
758453d
1ca70c5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my remark for posts below: https://github.com/WordPress/gutenberg/pull/27280/files#r563820929
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this will implicitly search the content of the posts too. My expectation was that the search will only be applied to post titles so as to make it consistent with existing template searching, but this might make sense too. What do you all think? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thought here. While I would expect it the component to search only by titles, returning results for some matching content may be nice! Although if we go with that we should probably ensure the results are prioritized with those matching titles to show up first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, there is no way to search only in the title. Is there? 🤔 We might need to come up with a custom endpoint if we want to search by title only or do the prioritization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think its a bad thing that we search content, its a feature not a bug! However, I do have a complaint about how it orders things. The results seem to be ordered based on the date of the post. So if I am look for 'example', the posts with the word 'example' in their title show up after more recent posts that have the word 'example' in their content:
I guess my recommendation would be to sort the results such that results with titles corresponding to the search are at the top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a commit which puts results with titles at the top.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Posts
is not included in the search results. Should we also include this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to omit it. Furthermore I'm not sure if we should be displaying it in posts menu anyway since it sounds more like page template to me. This should probably be reserved just for individual posts and not a collection of them.