Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Reconsider adding a search template #256

Closed
carolinan opened this issue Nov 19, 2021 · 13 comments · Fixed by #320
Closed

Reconsider adding a search template #256

carolinan opened this issue Nov 19, 2021 · 13 comments · Fixed by #320

Comments

@carolinan
Copy link
Collaborator

In the site editor, when adding a new template, the user has the option to select between search and front page:

Template selection in the site editor when clicking on "Add new" in the template list view

If they select search, they are met with a blank template.
I think it would be easier for users to edit an existing template, if users want to make changes to the search results page.

@MaggieCabrera
Copy link
Collaborator

Shouldn't it inherit what's on index.html from just template hierarchy? I agree that TT2 should add a default search template because it should provide good defaults for most possible templates, but I'm thinking this is going to happen to a lot of themes and if the user doesn't add one, the frontend will show the fallback, why doesn't the editor do the same?

@carolinan
Copy link
Collaborator Author

It probably only checks if the template exists, not if it is exists but is blank.

@carolinan
Copy link
Collaborator Author

@MaggieCabrera Would you like to open a new Gutenberg issue for it? I am about to end my work week.

@MaggieCabrera
Copy link
Collaborator

@MaggieCabrera Would you like to open a new Gutenberg issue for it? I am about to end my work week.

yep, will do!

@MaggieCabrera
Copy link
Collaborator

Opened WordPress/gutenberg#36648 and I don't really know what to tag it to be honest

@kjellr
Copy link
Collaborator

kjellr commented Nov 19, 2021

Thanks for the issue. In the near term, I think adding a search.html template might make sense so that we can display the title of the search. (We can do that right? Does it use the Archive Title block?)

@Andrew-Starr
Copy link

Thanks for the issue. In the near term, I think adding a search.html template might make sense so that we can display the title of the search. (We can do that right? Does it use the Archive Title block?)

Sadly no, the Archive Title does nothing when used in a search context :(

@kjellr
Copy link
Collaborator

kjellr commented Nov 19, 2021

If that's the case, I'm not sure there's much benefit to adding a search template at this point.

@carolinan
Copy link
Collaborator Author

I think the benefit of not having a blank template in the site editor is bigger than the trouble of having to add a heading block?

@jameskoster
Copy link

Sadly no, the Archive Title does nothing when used in a search context :(

We should probably open an issue in core for that.

It is closely related to WordPress/gutenberg#36609 and could combine to form an "improving search" initiative.

@kjellr
Copy link
Collaborator

kjellr commented Nov 22, 2021

I think the benefit of not having a blank template in the site editor is bigger than the trouble of having to add a heading block?

Yes, but this should really be fixed upstream in #36648, not just in the theme. Let's leave this issue open to track the issue on our end, but push to have it fixed upstream.

@carolinan
Copy link
Collaborator Author

My worry is that there are a very large number of requests for things that needs to be addressed for 5.9,
while it should be fixed upstream, there are perhaps more important usability related problems with the editor and UX that needs to be prioritized.
An improved query title block can be added in Gutenberg at a later release, and it can be fully tested there until 6.0, or 6.1 if needed.

@kjellr
Copy link
Collaborator

kjellr commented Nov 23, 2021

It's true, but we now have a longer timeline, so we'll see. I'll milestone this issue so we can be sure to keep track of it either way.

@kjellr kjellr added this to the Beta 2 milestone Nov 23, 2021
@kjellr kjellr modified the milestones: Beta 2, Beta 3, Beta 4 (Tentative) Dec 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants