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

Search Results Title block: Rename title #60701

Open
paaljoachim opened this issue Apr 12, 2024 · 6 comments
Open

Search Results Title block: Rename title #60701

paaljoachim opened this issue Apr 12, 2024 · 6 comments
Labels
[Block] Query Title Affects the Query Title Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Enhancement A suggestion for improvement.

Comments

@paaljoachim
Copy link
Contributor

What problem does this address?

One can not rename the title "Search Results for" seen in the Search page.

Screenshot 2024-04-12 at 12 05 32

It seems locked.

What is your proposed solution?

The Query Loop block one can click into the words Previous Page / Next Page and rename it to anything one likes.
By default one sees this:

Screenshot 2024-04-12 at 12 10 52

Here is an example of renaming the Previous Page.

Screenshot 2024-04-12 at 12 10 14

It would be very helpful to be able to easily rename the Search Results Title to anything one chooses similar to renaming the Previous Page / Next Page.

Thank you!

@carolinan

@paaljoachim paaljoachim added [Type] Enhancement A suggestion for improvement. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Apr 12, 2024
@carolinan carolinan added the [Block] Query Title Affects the Query Title Block label Apr 12, 2024
@jasmussen
Copy link
Contributor

Definitely seems valid. Two things to keep in mind:

  • Ideally we can reuse an existing pattern for how to edit this title, the Next/Previous page components as you suggest are a good model to follow.
  • The "search term" piece can be a tricky aspect of this project, since that part of the heading is obviously meant to be replaced in the loop. This could easily become a rabbit hole in terms of tokens and otherwise, so it would be good to seek out a minimal solution here. Could the search term itself be made un-editable? I.e. you can edit the prefix and suffix, but neither delete nor edit the bit in the middle?

@paaljoachim
Copy link
Contributor Author

Could the search term itself be made un-editable? I.e. you can edit the prefix and suffix, but neither delete nor edit the bit in the middle?

Yes. That is also my exact thinking. Thank you Joen!

@paaljoachim paaljoachim added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Apr 17, 2024
@sunil25393
Copy link
Contributor

There are two titles, one for searched term, and another when searched term is empty. We might need option for that also.

@paaljoachim
Copy link
Contributor Author

@sunil25393
How does one see a empty searched term page on the frontend?

@paaljoachim
Copy link
Contributor Author

I have been told the following:
It looks like it requires modifying the query title block: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/query-title/edit.js

Adding a rich text component and content attribute or something.

@sunil25393
Copy link
Contributor

@sunil25393 How does one see a empty searched term page on the frontend?

i get it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Title Affects the Query Title Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants