Skip to content

Enable global Control Panel search via plone.restapi searchable text - 1981#1982

Open
Manik-Khajuria-5 wants to merge 3 commits intoplone:mainfrom
Manik-Khajuria-5:SearchableText
Open

Enable global Control Panel search via plone.restapi searchable text - 1981#1982
Manik-Khajuria-5 wants to merge 3 commits intoplone:mainfrom
Manik-Khajuria-5:SearchableText

Conversation

@Manik-Khajuria-5
Copy link

@Manik-Khajuria-5 Manik-Khajuria-5 commented Feb 9, 2026

Fixes #1981:


Summary

This PR adds a single Control Panel REST API endpoint that exposes aggregated searchable text for all control panel settings.
The endpoint returns panel titles,as searchable text, enabling efficient global Control Panel search without fetching individual schemas on the frontend.


References


  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

screenshot-2026-02-09_21-22-19
screenshot-2026-02-09_21-22-30

Closes #1981

@mister-roboto
Copy link

@Manik-Khajuria-5 thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@Manik-Khajuria-5
Copy link
Author

@jenkins-plone-org please run jobs

@Manik-Khajuria-5
Copy link
Author

Manik-Khajuria-5 commented Feb 9, 2026

@stevepiercy can u help why docs test is failig I have included it

@Manik-Khajuria-5
Copy link
Author

@davisagli I’ve opened a PR that adds a backend endpoint returning aggregated searchable text for Control Panel settings, following the discussion in the Volto issue

@stevepiercy
Copy link
Contributor

@Manik-Khajuria-5 sorry, I have no idea. What did you try? What do the error messages say and advise you to do? It's a good idea to run the tests locally and follow the guidelines from https://6.docs.plone.org/plone.restapi/docs/source/contributing/index.html.

@Manik-Khajuria-5
Copy link
Author

okay will try to improve locally it was working fine

for rule in registered_rules:
if isinstance(rule, dict):
if rule.get("title"):
text_parts.append(rule["title"])
Copy link
Member

Choose a reason for hiding this comment

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

Don't add special cases for the dexterity types and content rules control panels here.

Instead, give those control panel classes (in types.py and rules.py) their own get_searchable_text method which calls super() and then adds additional text.

),
"title": self.controlpanel.title,
"group": self.controlpanel.group,
"searchable_text": self.controlpanel.get_searchable_text(),
Copy link
Member

Choose a reason for hiding this comment

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

Be careful and make sure it doesn't break if the control panel doesn't have this method (there can be other control panels from addons which haven't been updated to add the new method).

@davisagli
Copy link
Member

I think some of the CI failures were due to a github incident in progress. So let's see what happens next time you update the PR.

@Manik-Khajuria-5
Copy link
Author

@davisagli Thanks for review I will update PR shortly as per changes recomended

@Manik-Khajuria-5
Copy link
Author

Manik-Khajuria-5 commented Feb 10, 2026

@davisagli Implemented the changes successfully Should I work on frontend issue now for searchable text?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable global Control Panel search using plone.restapi searchable text

4 participants